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