Actual source code: petscdmplextypes.h

  1: #pragma once

  3: /* MANSEC = DM */
  4: /* SUBMANSEC = DMPlex */

  6: /*E
  7:   DMPlexShape - The domain shape used for automatic mesh creation.

  9:   Values:
 10: + `DM_SHAPE_BOX`         - The tensor product of intervals in dimension d
 11: . `DM_SHAPE_BOX_SURFACE` - The surface of a box in dimension d+1
 12: . `DM_SHAPE_BALL`        - The d-dimensional ball
 13: . `DM_SHAPE_SPHERE`      - The surface of the (d+1)-dimensional ball
 14: . `DM_SHAPE_CYLINDER`    - The tensor product of the interval and disk
 15: . `DM_SHAPE_SCHWARZ_P`   - The Schwarz-P triply periodic minimal surface
 16: . `DM_SHAPE_GYROID`      - The Gyroid triply periodic minimal surface
 17: . `DM_SHAPE_DOUBLET`     - The mesh of two cells of a specified type
 18: . `DM_SHAPE_ANNULUS`     - The area between two concentric spheres in dimension d
 19: . `DM_SHAPE_HYPERCUBIC`  - The skeleton of the tensor product of the intervals
 20: . `DM_SHAPE_ZBOX`        - The box, tensor product of the intervals, in tensor order
 21: - `DM_SHAPE_DIIID`       - The poloidal cross-section of the DIII tokamak

 23:   Level: beginner

 25: .seealso: [](ch_dmbase), `DMPLEX`, `DMPlexGetCellRefiner()`, `DMPlexSetCellRefiner()`, `DMRefine()`, `DMPolytopeType`, `DMPlexCoordMap`
 26: E*/
 27: typedef enum {
 28:   DM_SHAPE_BOX,
 29:   DM_SHAPE_BOX_SURFACE,
 30:   DM_SHAPE_BALL,
 31:   DM_SHAPE_SPHERE,
 32:   DM_SHAPE_CYLINDER,
 33:   DM_SHAPE_SCHWARZ_P,
 34:   DM_SHAPE_GYROID,
 35:   DM_SHAPE_DOUBLET,
 36:   DM_SHAPE_ANNULUS,
 37:   DM_SHAPE_HYPERCUBIC,
 38:   DM_SHAPE_ZBOX,
 39:   DM_SHAPE_DIIID,
 40:   DM_SHAPE_UNKNOWN
 41: } DMPlexShape;
 42: PETSC_EXTERN const char *const DMPlexShapes[];

 44: /*E
 45:   DMPlexCoordMap - The coordinate mapping used for automatic mesh creation.

 47:   Values:
 48: + `DM_COORD_MAP_NONE`     - The identity map
 49: . `DM_COORD_MAP_ROTATE`   - Rotation about some axis
 50: . `DM_COORD_MAP_SHEAR`    - The shear (additive) map along some dimension
 51: . `DM_COORD_MAP_FLARE`    - The flare (multiplicative) map along some dimension
 52: . `DM_COORD_MAP_ANNULUS`  - The map from a rectangle to an annulus
 53: . `DM_COORD_MAP_SHELL`    - The map from a rectangular solid to an spherical shell
 54: . `DM_COORD_MAP_SINUSOID` - The map from a flat rectangle to a sinusoidal surface
 55: - `DM_COORD_MAP_TORUS`    - The map from a periodic cylinder to a torus

 57:   Level: beginner

 59: .seealso: [](ch_dmbase), `DMPLEX`, `DMPlexGetCellRefiner()`, `DMPlexSetCellRefiner()`, `DMRefine()`, `DMPolytopeType`, `DMPlexShape`
 60: E*/
 61: typedef enum {
 62:   DM_COORD_MAP_NONE,
 63:   DM_COORD_MAP_ROTATE,
 64:   DM_COORD_MAP_SHEAR,
 65:   DM_COORD_MAP_FLARE,
 66:   DM_COORD_MAP_ANNULUS,
 67:   DM_COORD_MAP_SHELL,
 68:   DM_COORD_MAP_SINUSOID,
 69:   DM_COORD_MAP_TORUS,
 70:   DM_COORD_MAP_UNKNOWN
 71: } DMPlexCoordMap;
 72: PETSC_EXTERN const char *const DMPlexCoordMaps[];

 74: /*E
 75:   DMPlexCSRAlgorithm - The algorithm for building the adjacency graph in CSR format, usually for a mesh partitioner

 77:   Values:
 78: + `DM_PLEX_CSR_MAT`     - Use `MatPartitioning` by first making a matrix
 79: . `DM_PLEX_CSR_GRAPH`   - Use the original `DMPLEX` and communicate along the boundary
 80: - `DM_PLEX_CSR_OVERLAP` - Build an overlapped `DMPLEX` and then locally compute

 82:   Level: beginner

 84: .seealso: [](ch_dmbase), `DMPLEX`, `DMPlexCreatePartitionerGraph()`, `PetscPartitionerDMPlexPartition()`, `DMPlexDistribute()`
 85: E*/
 86: typedef enum {
 87:   DM_PLEX_CSR_MAT,
 88:   DM_PLEX_CSR_GRAPH,
 89:   DM_PLEX_CSR_OVERLAP
 90: } DMPlexCSRAlgorithm;
 91: PETSC_EXTERN const char *const DMPlexCSRAlgorithms[];

 93: /*S
 94:   DMPlexPointQueue - Simple FIFO queue of `DMPLEX` mesh-point indices used by traversal helpers such as label propagation

 96:   Level: developer

 98: .seealso: `DMPLEX`, `DMPlexPointQueueCreate()`, `DMPlexPointQueueDestroy()`, `DMPlexPointQueueEnqueue()`, `DMPlexPointQueueDequeue()`, `DMPlexPointQueueEmpty()`
 99: S*/
100: typedef struct _n_DMPlexPointQueue *DMPlexPointQueue;
101: struct _n_DMPlexPointQueue {
102:   PetscInt  size;   /* Size of the storage array */
103:   PetscInt *points; /* Array of mesh points */
104:   PetscInt  front;  /* Index of the front of the queue */
105:   PetscInt  back;   /* Index of the back of the queue */
106:   PetscInt  num;    /* Number of enqueued points */
107: };