[petsc-users] question about DA

Jed Brown jedbrown at mcs.anl.gov
Sat Aug 27 16:54:44 CDT 2011


On Sat, Aug 27, 2011 at 16:49, Likun Tan <likunt at andrew.cmu.edu> wrote:

> I am sorry i still don't get what my problem is, i though when setting
> values to 2D, x, y, m and n will be reset, so the previous usage of the
> corner indices and width won't influence the later use.
>

The whole array is not duplicated onto every process, just the owned part
and perhaps ghosts. You have to make sure that the decompositions are
compatible and that you only index into the part of the array that your
process has access to. This is really unlikely to happen "by accident", so
you have to decide how you want the total volume decomposed and which parts
you want local. Part of this (typically, if you are going to integrate) is
to not decompose at all in the z direction. Once you ensure that everything
is compatible, you can have one accessor that gives you the array bounds for
the 3D part and use the 2D part in a compatible way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110827/3af5160b/attachment.htm>


More information about the petsc-users mailing list