Actual source code: petscdmdatypes.h
1: #ifndef PETSCDMDATYPES_H
2: #define PETSCDMDATYPES_H
4: #include <petscdmtypes.h>
6: /* SUBMANSEC = DMDA */
8: /*E
9: DMDAStencilType - Determines if the stencil extends only along the coordinate directions, or also
10: to the northeast, northwest etc
12: Level: beginner
14: .seealso: `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDACreate()`, `DMDASetStencilType()`
15: E*/
16: typedef enum {
17: DMDA_STENCIL_STAR,
18: DMDA_STENCIL_BOX
19: } DMDAStencilType;
21: /*E
22: DMDAInterpolationType - Defines the type of interpolation that will be returned by
23: `DMCreateInterpolation()`.
25: Level: beginner
27: .seealso: `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateInterpolation()`, `DMDASetInterpolationType()`, `DMDACreate()`
28: E*/
29: typedef enum {
30: DMDA_Q0,
31: DMDA_Q1
32: } DMDAInterpolationType;
34: /*E
35: DMDAElementType - Defines the type of elements that will be returned by
36: `DMDAGetElements()`
38: Level: beginner
40: .seealso: `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateInterpolation()`, `DMDASetInterpolationType()`,
41: `DMDASetElementType()`, `DMDAGetElements()`, `DMDARestoreElements()`, `DMDACreate()`
42: E*/
43: typedef enum {
44: DMDA_ELEMENT_P1,
45: DMDA_ELEMENT_Q1
46: } DMDAElementType;
48: /*S
49: DMDALocalInfo - C struct that contains information about a structured grid and a processors logical
50: location in it.
52: Level: beginner
54: Fortran Notes - This should be declared as
55: $ `DMDALocalInfo` :: info(DMDA_LOCAL_INFO_SIZE)
56: and the entries accessed via
57: $ info(DMDA_LOCAL_INFO_DIM)
58: $ info(DMDA_LOCAL_INFO_DOF) etc.
59: The entries bx,by,bz, st, and da are not accessible from Fortran.
61: .seealso: `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDestroy()`, `DM`, `DMDAGetLocalInfo()`, `DMDAGetInfo()`
62: S*/
63: typedef struct {
64: PetscInt dim, dof, sw;
65: PetscInt mx, my, mz; /* global number of grid points in each direction */
66: PetscInt xs, ys, zs; /* starting point of this processor, excluding ghosts */
67: PetscInt xm, ym, zm; /* number of grid points on this processor, excluding ghosts */
68: PetscInt gxs, gys, gzs; /* starting point of this processor including ghosts */
69: PetscInt gxm, gym, gzm; /* number of grid points on this processor including ghosts */
70: DMBoundaryType bx, by, bz; /* type of ghost nodes at boundary */
71: DMDAStencilType st;
72: DM da;
73: } DMDALocalInfo;
75: #endif