16524c165SJacob Faibussowitsch #ifndef PETSCDMDATYPES_H 226bd1501SBarry Smith #define PETSCDMDATYPES_H 31e25c274SJed Brown 41e25c274SJed Brown #include <petscdmtypes.h> 51e25c274SJed Brown 6ac09b921SBarry Smith /* SUBMANSEC = DMDA */ 7ac09b921SBarry 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 14*16a05f60SBarry Smith .seealso: `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDACreate()`, `DMDASetStencilType()` 151e25c274SJed Brown E*/ 169371c9d4SSatish Balay typedef enum { 179371c9d4SSatish Balay DMDA_STENCIL_STAR, 189371c9d4SSatish Balay DMDA_STENCIL_BOX 199371c9d4SSatish Balay } DMDAStencilType; 201e25c274SJed Brown 211e25c274SJed Brown /*E 221e25c274SJed Brown DMDAInterpolationType - Defines the type of interpolation that will be returned by 2387497f52SBarry Smith `DMCreateInterpolation()`. 241e25c274SJed Brown 251e25c274SJed Brown Level: beginner 261e25c274SJed Brown 27*16a05f60SBarry Smith .seealso: `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateInterpolation()`, `DMDASetInterpolationType()`, `DMDACreate()` 281e25c274SJed Brown E*/ 299371c9d4SSatish Balay typedef enum { 309371c9d4SSatish Balay DMDA_Q0, 319371c9d4SSatish Balay DMDA_Q1 329371c9d4SSatish Balay } DMDAInterpolationType; 331e25c274SJed Brown 341e25c274SJed Brown /*E 351e25c274SJed Brown DMDAElementType - Defines the type of elements that will be returned by 3687497f52SBarry Smith `DMDAGetElements()` 371e25c274SJed Brown 381e25c274SJed Brown Level: beginner 391e25c274SJed Brown 40*16a05f60SBarry Smith .seealso: `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateInterpolation()`, `DMDASetInterpolationType()`, 41db781477SPatrick Sanan `DMDASetElementType()`, `DMDAGetElements()`, `DMDARestoreElements()`, `DMDACreate()` 421e25c274SJed Brown E*/ 439371c9d4SSatish Balay typedef enum { 449371c9d4SSatish Balay DMDA_ELEMENT_P1, 459371c9d4SSatish Balay DMDA_ELEMENT_Q1 469371c9d4SSatish Balay } DMDAElementType; 471e25c274SJed Brown 481e25c274SJed Brown /*S 491e25c274SJed Brown DMDALocalInfo - C struct that contains information about a structured grid and a processors logical 501e25c274SJed Brown location in it. 511e25c274SJed Brown 521e25c274SJed Brown Level: beginner 531e25c274SJed Brown 54*16a05f60SBarry Smith Fortran Note: 55*16a05f60SBarry Smith This should be declared as 5687497f52SBarry Smith $ `DMDALocalInfo` :: info(DMDA_LOCAL_INFO_SIZE) 57d3187782SBarry Smith and the entries accessed via 5820f4b53cSBarry Smith .vb 5920f4b53cSBarry Smith info(DMDA_LOCAL_INFO_DIM) 6020f4b53cSBarry Smith info(DMDA_LOCAL_INFO_DOF) etc. 6120f4b53cSBarry Smith .ve 62d3187782SBarry Smith The entries bx,by,bz, st, and da are not accessible from Fortran. 631e25c274SJed Brown 64*16a05f60SBarry Smith .seealso: `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDestroy()`, `DM`, `DMDAGetLocalInfo()`, `DMDAGetInfo()` 651e25c274SJed Brown S*/ 661e25c274SJed Brown typedef struct { 671e25c274SJed Brown PetscInt dim, dof, sw; 681e25c274SJed Brown PetscInt mx, my, mz; /* global number of grid points in each direction */ 691e25c274SJed Brown PetscInt xs, ys, zs; /* starting point of this processor, excluding ghosts */ 701e25c274SJed Brown PetscInt xm, ym, zm; /* number of grid points on this processor, excluding ghosts */ 711e25c274SJed Brown PetscInt gxs, gys, gzs; /* starting point of this processor including ghosts */ 721e25c274SJed Brown PetscInt gxm, gym, gzm; /* number of grid points on this processor including ghosts */ 73bff4a2f0SMatthew G. Knepley DMBoundaryType bx, by, bz; /* type of ghost nodes at boundary */ 741e25c274SJed Brown DMDAStencilType st; 751e25c274SJed Brown DM da; 761e25c274SJed Brown } DMDALocalInfo; 771e25c274SJed Brown 781e25c274SJed Brown #endif 79