xref: /petsc/include/petscdmplextypes.h (revision f97672e55eacc8688507b9471cd7ec2664d7f203)
1 #if !defined(PETSCDMPLEXTYPES_H)
2 #define PETSCDMPLEXTYPES_H
3 
4 /*E
5   DMPlexShape - The domain shape used for automatic mesh creation.
6 
7   Existing shapes include
8 $ DM_SHAPE_BOX         - The tensor product of intervals in dimension d
9 $ DM_SHAPE_BOX_SURFACE - The surface of a box in dimension d+1
10 $ DM_SHAPE_BALL        - The d-dimensional ball
11 $ DM_SHAPE_SPHERE      - The surface of the (d+1)-dimensional ball
12 $ DM_SHAPE_CYLINDER    - The tensor product of the interval and disk
13 $ DM_SHAPE_SCHWARZ_P   - The Schwarz-P triply periodic minimal surface
14 $ DM_SHAPE_GYROID      - The Gyroid triply periodic minimal surface
15 $ DM_SHAPE_DOUBLET     - The mesh of two cells of a specified type
16 
17   Level: beginner
18 
19 .seealso: `DMPlexGetCellRefiner()`, `DMPlexSetCellRefiner()`, `DMRefine()`, `DMPolytopeType`
20 E*/
21 typedef enum {DM_SHAPE_BOX, DM_SHAPE_BOX_SURFACE, DM_SHAPE_BALL, DM_SHAPE_SPHERE, DM_SHAPE_CYLINDER, DM_SHAPE_SCHWARZ_P, DM_SHAPE_GYROID, DM_SHAPE_DOUBLET, DM_SHAPE_UNKNOWN} DMPlexShape;
22 PETSC_EXTERN const char * const DMPlexShapes[];
23 
24 /*E
25   DMPlexCSRAlgorithm - The algorithm for building the adjacency graph in CSR format, usually for a mesh partitioner
26 
27   Existing shapes include
28 $ DM_PLEX_CSR_MAT     - Use MatPartition by first making a matrix
29 $ DM_PLEX_CSR_GRAPH   - Use the original Plex and communicate along the boundary
30 $ DM_PLEX_CSR_OVERLAP - Build an overlapped Plex and then locally compute
31 
32   Level: beginner
33 
34 .seealso: `DMPlexCreatePartitionerGraph()`, `PetscPartitionerDMPlexPartition()`, `DMPlexDistribute()`
35 E*/
36 typedef enum {DM_PLEX_CSR_MAT, DM_PLEX_CSR_GRAPH, DM_PLEX_CSR_OVERLAP} DMPlexCSRAlgorithm;
37 PETSC_EXTERN const char * const DMPlexCSRAlgorithms[];
38 
39 typedef struct _p_DMPlexPointQueue *DMPlexPointQueue;
40 struct _p_DMPlexPointQueue {
41   PetscInt  size;   /* Size of the storage array */
42   PetscInt *points; /* Array of mesh points */
43   PetscInt  front;  /* Index of the front of the queue */
44   PetscInt  back;   /* Index of the back of the queue */
45   PetscInt  num;    /* Number of enqueued points */
46 };
47 
48 #endif
49