[petsc-users] local row calculation in 3D

Jed Brown jed at 59A2.org
Tue Apr 19 04:40:18 CDT 2011


On Tue, Apr 19, 2011 at 09:00, ilyas ilyas <ilyascfd at gmail.com> wrote:

> It does not work properly for all number of processors.


The "row" in ex14f.F is a local row, not a global row. The ComputeJacobian
in that file manually translates local rows to global rows using the map
returned by DAGetGlobalIndices(). Now you should just call
MatSetValuesLocal() with the local indices, or even easier,
 MatSetValuesStencil().

There is no easy way to determine the global index on your own (it is
hundreds of lines of code).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110419/dcdad897/attachment.htm>


More information about the petsc-users mailing list