[petsc-users] DMDACoor2d and DMDACoor3d in Fortran

Jed Brown jed at jedbrown.org
Sun Apr 27 09:00:30 CDT 2014


Danyang Su <danyang.su at gmail.com> writes:

> Hi Barry,
>
> Another question is about DMDAGetLocalBoundingBox in fortran.
>
> PetscErrorCode  DMDAGetLocalBoundingBox(DM da,PetscReal lmin[],PetscReal 
> lmax[])
>
> The first value of lmin and lmax (lmin(0)) are always zero,  

lmin and lmax are normal arrays of length 3.  In Fortran, you don't
access lmin(0).

> and lmin(1), lmin(2), and lmin(3) are for x, y, and z dimension,
> respectively.  And the returned value is index (local node index in x,
> y, z dim), not the coordinate. Correct?

It is the coordinate value, assuming you have set DMSetCoordinates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140427/4076d3bf/attachment.pgp>


More information about the petsc-users mailing list