xref: /petsc/include/petscdmdatypes.h (revision ac09b9214d23ea9ad238aa607de9fa447fd4e91b)
126bd1501SBarry Smith #if !defined(PETSCDMDATYPES_H)
226bd1501SBarry Smith #define PETSCDMDATYPES_H
31e25c274SJed Brown 
41e25c274SJed Brown #include <petscdmtypes.h>
51e25c274SJed Brown 
6*ac09b921SBarry Smith /* SUBMANSEC = DMDA */
7*ac09b921SBarry Smith 
81e25c274SJed Brown /*E
91e25c274SJed Brown     DMDAStencilType - Determines if the stencil extends only along the coordinate directions, or also
101e25c274SJed Brown       to the northeast, northwest etc
111e25c274SJed Brown 
121e25c274SJed Brown    Level: beginner
131e25c274SJed Brown 
14db781477SPatrick Sanan .seealso: `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDACreate()`, `DMDASetStencilType()`
151e25c274SJed Brown E*/
161e25c274SJed Brown typedef enum { DMDA_STENCIL_STAR,DMDA_STENCIL_BOX } DMDAStencilType;
171e25c274SJed Brown 
181e25c274SJed Brown /*E
191e25c274SJed Brown     DMDAInterpolationType - Defines the type of interpolation that will be returned by
201e25c274SJed Brown        DMCreateInterpolation.
211e25c274SJed Brown 
221e25c274SJed Brown    Level: beginner
231e25c274SJed Brown 
24db781477SPatrick Sanan .seealso: `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateInterpolation()`, `DMDASetInterpolationType()`, `DMDACreate()`
251e25c274SJed Brown E*/
261e25c274SJed Brown typedef enum { DMDA_Q0, DMDA_Q1 } DMDAInterpolationType;
271e25c274SJed Brown 
281e25c274SJed Brown /*E
291e25c274SJed Brown     DMDAElementType - Defines the type of elements that will be returned by
301e25c274SJed Brown        DMDAGetElements()
311e25c274SJed Brown 
321e25c274SJed Brown    Level: beginner
331e25c274SJed Brown 
34db781477SPatrick Sanan .seealso: `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateInterpolation()`, `DMDASetInterpolationType()`,
35db781477SPatrick Sanan           `DMDASetElementType()`, `DMDAGetElements()`, `DMDARestoreElements()`, `DMDACreate()`
361e25c274SJed Brown E*/
371e25c274SJed Brown typedef enum { DMDA_ELEMENT_P1, DMDA_ELEMENT_Q1 } DMDAElementType;
381e25c274SJed Brown 
391e25c274SJed Brown /*S
401e25c274SJed Brown      DMDALocalInfo - C struct that contains information about a structured grid and a processors logical
411e25c274SJed Brown               location in it.
421e25c274SJed Brown 
431e25c274SJed Brown    Level: beginner
441e25c274SJed Brown 
45d3187782SBarry Smith   Fortran Notes - This should be declared as
46d3187782SBarry Smith $    DMDALocalInfo :: info(DMDA_LOCAL_INFO_SIZE)
47d3187782SBarry Smith      and the entries accessed via
4857a8e1ddSBarry Smith $    info(DMDA_LOCAL_INFO_DIM)
4957a8e1ddSBarry Smith $    info(DMDA_LOCAL_INFO_DOF) etc.
50d3187782SBarry Smith    The entries bx,by,bz, st, and da are not accessible from Fortran.
511e25c274SJed Brown 
52db781477SPatrick Sanan .seealso: `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDestroy()`, `DM`, `DMDAGetLocalInfo()`, `DMDAGetInfo()`
531e25c274SJed Brown S*/
541e25c274SJed Brown typedef struct {
551e25c274SJed Brown   PetscInt         dim,dof,sw;
561e25c274SJed Brown   PetscInt         mx,my,mz;    /* global number of grid points in each direction */
571e25c274SJed Brown   PetscInt         xs,ys,zs;    /* starting point of this processor, excluding ghosts */
581e25c274SJed Brown   PetscInt         xm,ym,zm;    /* number of grid points on this processor, excluding ghosts */
591e25c274SJed Brown   PetscInt         gxs,gys,gzs;    /* starting point of this processor including ghosts */
601e25c274SJed Brown   PetscInt         gxm,gym,gzm;    /* number of grid points on this processor including ghosts */
61bff4a2f0SMatthew G. Knepley   DMBoundaryType   bx,by,bz; /* type of ghost nodes at boundary */
621e25c274SJed Brown   DMDAStencilType  st;
631e25c274SJed Brown   DM               da;
641e25c274SJed Brown } DMDALocalInfo;
651e25c274SJed Brown 
661e25c274SJed Brown #endif
67