[petsc-users] DMDACoor2d and DMDACoor3d in Fortran
Danyang Su
danyang.su at gmail.com
Sun Apr 27 15:40:06 CDT 2014
Hi Jed,
Thanks, the problem is solved.
call DMGetCoordinateDM(dmda_flow%da,cda,ierr)
call DMGetCoordinates(dmda_flow%da,gc,ierr)
call DMDAGetLocalBoundingBox(cda,lmin,lmax,ierr)
!this will return node index value in x,y,z dim
call DMDAGetLocalBoundingBox(dmda_flow%da,lmin,lmax,ierr)
!this will return coordinate value
Thanks and regards,
Danyang
On 27/04/2014 7:00 AM, Jed Brown wrote:
> 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.
More information about the petsc-users
mailing list