xref: /petsc/include/petscdmplextypes.h (revision 8abb650a5b88c774f3837ef2cdee2b93ddbeb5dc)
1 #ifndef PETSCDMPLEXTYPES_H
2 #define PETSCDMPLEXTYPES_H
3 
4 /* SUBMANSEC = DMPlex */
5 
6 /*E
7   DMPlexShape - The domain shape used for automatic mesh creation.
8 
9   Existing shapes include
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 
21   Level: beginner
22 
23 .seealso: `DMPlexGetCellRefiner()`, `DMPlexSetCellRefiner()`, `DMRefine()`, `DMPolytopeType`
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_UNKNOWN
37 } DMPlexShape;
38 PETSC_EXTERN const char *const DMPlexShapes[];
39 
40 /*E
41   DMPlexCSRAlgorithm - The algorithm for building the adjacency graph in CSR format, usually for a mesh partitioner
42 
43   Existing shapes include
44 $ DM_PLEX_CSR_MAT     - Use `MatPartitioning` by first making a matrix
45 $ DM_PLEX_CSR_GRAPH   - Use the original `DMPLEX` and communicate along the boundary
46 $ DM_PLEX_CSR_OVERLAP - Build an overlapped `DMPLEX` and then locally compute
47 
48   Level: beginner
49 
50 .seealso: `DMPlexCreatePartitionerGraph()`, `PetscPartitionerDMPlexPartition()`, `DMPlexDistribute()`
51 E*/
52 typedef enum {
53   DM_PLEX_CSR_MAT,
54   DM_PLEX_CSR_GRAPH,
55   DM_PLEX_CSR_OVERLAP
56 } DMPlexCSRAlgorithm;
57 PETSC_EXTERN const char *const DMPlexCSRAlgorithms[];
58 
59 typedef struct _p_DMPlexPointQueue *DMPlexPointQueue;
60 struct _p_DMPlexPointQueue {
61   PetscInt  size;   /* Size of the storage array */
62   PetscInt *points; /* Array of mesh points */
63   PetscInt  front;  /* Index of the front of the queue */
64   PetscInt  back;   /* Index of the back of the queue */
65   PetscInt  num;    /* Number of enqueued points */
66 };
67 
68 #endif
69