petsc-3.4.4 2014-03-13

DMDACoor2d

Structure for holding 2d (x and y) coordinates.

Sample Usage

DMDACoor2d **coors; Vec vcoors; DM cda;

DMGetCoordinates(da,&vcoors); DMDAGetCoordinateDA(da,&cda); DMDAVecGetArray(cda,vcoors,&coors); DMDAGetCorners(cda,&mstart,&nstart,0,&m,&n,0) for (i=mstart; i<mstart+m; i++) { for (j=nstart; j<nstart+n; j++) { x = coors[j][i].x; y = coors[j][i].y; ...... } } DMDAVecRestoreArray(dac,vcoors,&coors);

See Also

DMDACoor3d, DMDAForEachPointBegin(), DMDAGetCoordinateDA(), DMGetCoordinates(), DMDAGetGhostCoordinates()

Level:intermediate
Location:
src/dm/impls/da/../../../../include/petscdmda.h
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages