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