Date: 2026-06-01T23:13:16+00:00

Actual source code: petscdmdatypes.h

      1: #pragma once

      3: #include <petscdmtypes.h>

      5: /* MANSEC = DM */
      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: [](ch_dmbase), `DMDA`, `DMDA_STENCIL_BOX`, `DMDA_STENCIL_STAR`, `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: [](ch_dmbase), `DMDA`, `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: [](ch_dmbase), `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;

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

     51:   Level: beginner

     53:   Fortran Note:
     54:   This is a derived type whose entries can be directly accessed

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