xref: /petsc/include/petscdmdatypes.h (revision bff4a2f0161c89c6cc121ba5e8b00c1191c71813)
11e25c274SJed Brown #if !defined(_PETSCDMDATYPES_H)
21e25c274SJed Brown #define _PETSCDMDATYPES_H
31e25c274SJed Brown 
41e25c274SJed Brown #include <petscdmtypes.h>
51e25c274SJed Brown 
61e25c274SJed Brown /*E
71e25c274SJed Brown     DMDAStencilType - Determines if the stencil extends only along the coordinate directions, or also
81e25c274SJed Brown       to the northeast, northwest etc
91e25c274SJed Brown 
101e25c274SJed Brown    Level: beginner
111e25c274SJed Brown 
121e25c274SJed Brown .seealso: DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMDACreate(), DMDASetStencilType()
131e25c274SJed Brown E*/
141e25c274SJed Brown typedef enum { DMDA_STENCIL_STAR,DMDA_STENCIL_BOX } DMDAStencilType;
151e25c274SJed Brown 
161e25c274SJed Brown /*E
171e25c274SJed Brown     DMDAInterpolationType - Defines the type of interpolation that will be returned by
181e25c274SJed Brown        DMCreateInterpolation.
191e25c274SJed Brown 
201e25c274SJed Brown    Level: beginner
211e25c274SJed Brown 
221e25c274SJed Brown .seealso: DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMCreateInterpolation(), DMDASetInterpolationType(), DMDACreate()
231e25c274SJed Brown E*/
241e25c274SJed Brown typedef enum { DMDA_Q0, DMDA_Q1 } DMDAInterpolationType;
251e25c274SJed Brown 
261e25c274SJed Brown /*E
271e25c274SJed Brown     DMDAElementType - Defines the type of elements that will be returned by
281e25c274SJed Brown        DMDAGetElements()
291e25c274SJed Brown 
301e25c274SJed Brown    Level: beginner
311e25c274SJed Brown 
321e25c274SJed Brown .seealso: DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMCreateInterpolation(), DMDASetInterpolationType(),
331e25c274SJed Brown           DMDASetElementType(), DMDAGetElements(), DMDARestoreElements(), DMDACreate()
341e25c274SJed Brown E*/
351e25c274SJed Brown typedef enum { DMDA_ELEMENT_P1, DMDA_ELEMENT_Q1 } DMDAElementType;
361e25c274SJed Brown 
371e25c274SJed Brown /*S
381e25c274SJed Brown      DMDALocalInfo - C struct that contains information about a structured grid and a processors logical
391e25c274SJed Brown               location in it.
401e25c274SJed Brown 
411e25c274SJed Brown    Level: beginner
421e25c274SJed Brown 
431e25c274SJed Brown   Concepts: distributed array
441e25c274SJed Brown 
451e25c274SJed Brown   Developer note: Then entries in this struct are int instead of PetscInt so that the elements may
461e25c274SJed Brown                   be extracted in Fortran as if from an integer array
471e25c274SJed Brown 
481e25c274SJed Brown .seealso:  DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMDestroy(), DM, DMDAGetLocalInfo(), DMDAGetInfo()
491e25c274SJed Brown S*/
501e25c274SJed Brown typedef struct {
511e25c274SJed Brown   PetscInt         dim,dof,sw;
521e25c274SJed Brown   PetscInt         mx,my,mz;    /* global number of grid points in each direction */
531e25c274SJed Brown   PetscInt         xs,ys,zs;    /* starting point of this processor, excluding ghosts */
541e25c274SJed Brown   PetscInt         xm,ym,zm;    /* number of grid points on this processor, excluding ghosts */
551e25c274SJed Brown   PetscInt         gxs,gys,gzs;    /* starting point of this processor including ghosts */
561e25c274SJed Brown   PetscInt         gxm,gym,gzm;    /* number of grid points on this processor including ghosts */
57*bff4a2f0SMatthew G. Knepley   DMBoundaryType   bx,by,bz; /* type of ghost nodes at boundary */
581e25c274SJed Brown   DMDAStencilType  st;
591e25c274SJed Brown   DM               da;
601e25c274SJed Brown } DMDALocalInfo;
611e25c274SJed Brown 
621e25c274SJed Brown #endif
63