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

     21:   Level: beginner

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

     41: /*E
     42:   DMPlexCoordMap - The coordinate mapping used for automatic mesh creation.

     44:   Values:
     45: + `DM_COORD_MAP_NONE`     - The identity map
     46: . `DM_COORD_MAP_SHEAR`    - The shear (additive) map along some dimension
     47: . `DM_COORD_MAP_FLARE`    - The flare (multiplicative) map along some dimension
     48: . `DM_COORD_MAP_ANNULUS`  - The map from a rectangle to an annulus
     49: . `DM_COORD_MAP_SHELL`    - The map from a rectangular solid to an spherical shell
     50: - `DM_COORD_MAP_SINUSOID` - The map from a flat rectangle to a sinusoidal surface

     52:   Level: beginner

     54: .seealso: [](ch_dmbase), `DMPLEX`, `DMPlexGetCellRefiner()`, `DMPlexSetCellRefiner()`, `DMRefine()`, `DMPolytopeType`, `DMPlexShape`
     55: E*/
     56: typedef enum {
     57:   DM_COORD_MAP_NONE,
     58:   DM_COORD_MAP_SHEAR,
     59:   DM_COORD_MAP_FLARE,
     60:   DM_COORD_MAP_ANNULUS,
     61:   DM_COORD_MAP_SHELL,
     62:   DM_COORD_MAP_SINUSOID,
     63:   DM_COORD_MAP_UNKNOWN
     64: } DMPlexCoordMap;
     65: PETSC_EXTERN const char *const DMPlexCoordMaps[];

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

     70:   Values:
     71: + `DM_PLEX_CSR_MAT`     - Use `MatPartitioning` by first making a matrix
     72: . `DM_PLEX_CSR_GRAPH`   - Use the original `DMPLEX` and communicate along the boundary
     73: - `DM_PLEX_CSR_OVERLAP` - Build an overlapped `DMPLEX` and then locally compute

     75:   Level: beginner

     77: .seealso: [](ch_dmbase), `DMPLEX`, `DMPlexCreatePartitionerGraph()`, `PetscPartitionerDMPlexPartition()`, `DMPlexDistribute()`
     78: E*/
     79: typedef enum {
     80:   DM_PLEX_CSR_MAT,
     81:   DM_PLEX_CSR_GRAPH,
     82:   DM_PLEX_CSR_OVERLAP
     83: } DMPlexCSRAlgorithm;
     84: PETSC_EXTERN const char *const DMPlexCSRAlgorithms[];

     86: typedef struct _n_DMPlexPointQueue *DMPlexPointQueue;
     87: struct _n_DMPlexPointQueue {
     88:   PetscInt  size;   /* Size of the storage array */
     89:   PetscInt *points; /* Array of mesh points */
     90:   PetscInt  front;  /* Index of the front of the queue */
     91:   PetscInt  back;   /* Index of the back of the queue */
     92:   PetscInt  num;    /* Number of enqueued points */
     93: };