[petsc-users] DAGetMatrix()

Dave May dave.mayhem23 at gmail.com
Sun Feb 21 15:25:55 CST 2010


Hello,
  I have a question about the usage of DAGetMatrix().
Is there any possibility that the matrix preallocation and the indices
returned from DAGetGlobalIndices() are incompatible with each other?

To clarify my question, I use DAGetMatrix() with a DA created with the
lx,ly,lz (local nodes sizes) specified. The resulting DA is used to
represent a Q1 finite element mesh. I then use values return from
DAGetGlobalIndices() to define the equation number for each dof
associated with each element.   In the past I've used this approach in
parallel without any problems matrix preallocation issues, but I've
never specified lx,ly,lz before.

What I see now is that for certain grid resolutions and element
combinations, -info reports that additional non-zeros are having to be
allocated.

Is my function to compute the element node relationship screwed, or is
there an assumption about when and where DAGetMatrix() is valid. I
suspect the former, but looking through the numbers I cannot see any
problems.


Cheers,
  Dave


More information about the petsc-users mailing list