DMDAGetCorners#
Returns the global (x
,y
,z
) indices of the lower left corner and size of the local region, excluding ghost points.
Synopsis#
#include "petscdmda.h"
PetscErrorCode DMDAGetCorners(DM da, PeOp PetscInt *x, PeOp PetscInt *y, PeOp PetscInt *z, PeOp PetscInt *m, PeOp PetscInt *n, PeOp PetscInt *p)
Not Collective
Input Parameter#
da - the
DMDA
Output Parameters#
x - the corner index for the first dimension
y - the corner index for the second dimension (only used in 2D and 3D problems)
z - the corner index for the third dimension (only used in 3D problems)
m - the width in the first dimension
n - the width in the second dimension (only used in 2D and 3D problems)
p - the width in the third dimension (only used in 3D problems)
Notes#
Any of y
, z
, n
, and p
can be passed in as NULL
if not needed.
The corner information is independent of the number of degrees of
freedom per node set with the DMDACreateXX()
routine. Thus the x
, y
, and z
can be thought of as the lower left coordinates of the patch of values on process on a logical grid and m
, n
, and p
as the
extent of the patch, where each grid point has (potentially) several degrees of freedom.
See Also#
DMDA - Creating vectors for structured grids, DM
, DMDA
, DMDAGetGhostCorners()
, DMDAGetOwnershipRanges()
, DMStagGetCorners()
, DMSTAG
Level#
beginner
Location#
Examples#
src/ksp/ksp/tutorials/ex65.c
src/ksp/ksp/tutorials/ex14f.F90
src/ksp/ksp/tutorials/ex42.c
src/ksp/ksp/tutorials/ex45.c
src/ksp/ksp/tutorials/ex28.c
src/ksp/ksp/tutorials/ex32.c
src/ksp/ksp/tutorials/ex22f.F90
src/ksp/ksp/tutorials/ex69.c
src/ksp/ksp/tutorials/ex73.c
src/ksp/ksp/tutorials/ex45f.F90
Index of all DMDA routines
Table of Contents for all manual pages
Index of all manual pages