← Back to team overview

dolfin team mailing list archive

DofMap issue

 

On my 64bit Linux laptop, the following code (from DofMap.cpp) doesn't compile:

dolfin::uint DofMap::numNonZeroes()
{
  // Compute matrix sparsity pattern 
  computeMatrixSparsityPattern();

  uint nzmax = 0;
  for(int i = 0; i < _size[0]; ++i)
    nzmax = std::max(matrix_sparsity_pattern[i].size(), nzmax);

  return nzmax;
}

The trouble is in the std::max function call, not allowing a size_t and a
dolfin::uint as arguments. If I change the line 
  uint nzmax = 0;
to
  size_t nzmax = 0;
things work as expected. Does anyone else experience the same behaviour?

Ola


Follow ups