DMDACoor3d#
Structure for holding 3d (x, y and z) coordinates coordinates when working with DMDA
Synopsis#
.vb
DMDACoor3d ***coors;
Vec vcoors;
DM cda;
DMGetCoordinates(da,&vcoors);
DMGetCoordinateDM(da,&cda);
DMDAVecGetArray(cda,vcoors,&coors);
DMDAGetCorners(cda,&mstart,&nstart,&pstart,&m,&n,&p)
for (i=mstart; i<mstart+m; i++) {
for (j=nstart; j<nstart+n; j++) {
for (k=pstart; k<pstart+p; k++) {
x = coors[k][j][i].x;
y = coors[k][j][i].y;
z = coors[k][j][i].z;
......
}
}
DMDAVecRestoreArray(dac,vcoors,&coors);
.ve
See Also#
DM Basics, DMDA
, DMDACoor2d
, DMDAVecRestoreArray()
, DMDAVecGetArray()
, DMGetCoordinateDM()
, DMGetCoordinates()
Level#
intermediate
Location#
Examples#
src/dm/tutorials/ex3.c
src/ksp/ksp/tutorials/ex42.c
Index of all DMDA routines
Table of Contents for all manual pages
Index of all manual pages