Actual source code: petscdmdatypes.h

  1: #pragma once

  3: #include <petscdmtypes.h>

  5: /* SUBMANSEC = DMDA */

  7: /*E
  8:     DMDAStencilType - Determines if the stencil extends only along the coordinate directions, or also
  9:                       to the northeast, northwest etc

 11:    Level: beginner

 13: .seealso: [](ch_dmbase), `DMDA`, `DMDA_STENCIL_BOX`, `DMDA_STENCIL_STAR`,`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDACreate()`, `DMDASetStencilType()`
 14: E*/
 15: typedef enum {
 16:   DMDA_STENCIL_STAR,
 17:   DMDA_STENCIL_BOX
 18: } DMDAStencilType;

 20: /*E
 21:     DMDAInterpolationType - Defines the type of interpolation that will be returned by
 22:                             `DMCreateInterpolation()`.

 24:    Level: beginner

 26: .seealso: [](ch_dmbase), `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateInterpolation()`, `DMDASetInterpolationType()`, `DMDACreate()`
 27: E*/
 28: typedef enum {
 29:   DMDA_Q0,
 30:   DMDA_Q1
 31: } DMDAInterpolationType;

 33: /*E
 34:    DMDAElementType - Defines the type of elements that will be returned by
 35:                      `DMDAGetElements()`

 37:    Level: beginner

 39: .seealso: [](ch_dmbase), `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateInterpolation()`, `DMDASetInterpolationType()`,
 40:           `DMDASetElementType()`, `DMDAGetElements()`, `DMDARestoreElements()`, `DMDACreate()`
 41: E*/
 42: typedef enum {
 43:   DMDA_ELEMENT_P1,
 44:   DMDA_ELEMENT_Q1
 45: } DMDAElementType;

 47: /*S
 48:   DMDALocalInfo - C struct that contains information about a structured grid and a processes logical
 49:                   location in it.

 51:   Level: beginner

 53:   Fortran Note:
 54:   This should be declared as
 55: $    `DMDALocalInfo` :: info(DMDA_LOCAL_INFO_SIZE)
 56:      and the entries accessed via
 57: .vb
 58:     info(DMDA_LOCAL_INFO_DIM)
 59:     info(DMDA_LOCAL_INFO_DOF) etc.
 60: .ve
 61:    The entries bx,by,bz, st, and da are not accessible from Fortran.

 63: .seealso: [](ch_dmbase), `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDestroy()`, `DM`, `DMDAGetLocalInfo()`, `DMDAGetInfo()`
 64: S*/
 65: typedef struct {
 66:   PetscInt        dim, dof, sw;
 67:   PetscInt        mx, my, mz;    /* global number of grid points in each direction */
 68:   PetscInt        xs, ys, zs;    /* starting point of this processor, excluding ghosts */
 69:   PetscInt        xm, ym, zm;    /* number of grid points on this processor, excluding ghosts */
 70:   PetscInt        gxs, gys, gzs; /* starting point of this processor including ghosts */
 71:   PetscInt        gxm, gym, gzm; /* number of grid points on this processor including ghosts */
 72:   DMBoundaryType  bx, by, bz;    /* type of ghost nodes at boundary */
 73:   DMDAStencilType st;
 74:   DM              da;
 75: } DMDALocalInfo;