xref: /petsc/include/petscdmplextypes.h (revision 16a05f60a523f53ab316acaac9f77b7425611adc)
16524c165SJacob Faibussowitsch #ifndef PETSCDMPLEXTYPES_H
226bd1501SBarry Smith #define PETSCDMPLEXTYPES_H
386fe8405SMatthew G. Knepley 
4ac09b921SBarry Smith /* SUBMANSEC = DMPlex */
5ac09b921SBarry Smith 
69318fe57SMatthew G. Knepley /*E
79318fe57SMatthew G. Knepley   DMPlexShape - The domain shape used for automatic mesh creation.
89318fe57SMatthew G. Knepley 
9*16a05f60SBarry Smith   Values:
10*16a05f60SBarry Smith + `DM_SHAPE_BOX`         - The tensor product of intervals in dimension d
11*16a05f60SBarry Smith . `DM_SHAPE_BOX_SURFACE` - The surface of a box in dimension d+1
12*16a05f60SBarry Smith . `DM_SHAPE_BALL`        - The d-dimensional ball
13*16a05f60SBarry Smith . `DM_SHAPE_SPHERE`      - The surface of the (d+1)-dimensional ball
14*16a05f60SBarry Smith . `DM_SHAPE_CYLINDER`    - The tensor product of the interval and disk
15*16a05f60SBarry Smith . `DM_SHAPE_SCHWARZ_P`   - The Schwarz-P triply periodic minimal surface
16*16a05f60SBarry Smith . `DM_SHAPE_GYROID`      - The Gyroid triply periodic minimal surface
17*16a05f60SBarry Smith . `DM_SHAPE_DOUBLET`     - The mesh of two cells of a specified type
18*16a05f60SBarry Smith . `DM_SHAPE_ANNULUS`     - The area between two concentric spheres in dimension d
19*16a05f60SBarry Smith - `DM_SHAPE_HYPERCUBIC`  - The skeleton of the tensor product of the intervals
209318fe57SMatthew G. Knepley 
219318fe57SMatthew G. Knepley   Level: beginner
229318fe57SMatthew G. Knepley 
23db781477SPatrick Sanan .seealso: `DMPlexGetCellRefiner()`, `DMPlexSetCellRefiner()`, `DMRefine()`, `DMPolytopeType`
249318fe57SMatthew G. Knepley E*/
259371c9d4SSatish Balay typedef enum {
269371c9d4SSatish Balay   DM_SHAPE_BOX,
279371c9d4SSatish Balay   DM_SHAPE_BOX_SURFACE,
289371c9d4SSatish Balay   DM_SHAPE_BALL,
299371c9d4SSatish Balay   DM_SHAPE_SPHERE,
309371c9d4SSatish Balay   DM_SHAPE_CYLINDER,
319371c9d4SSatish Balay   DM_SHAPE_SCHWARZ_P,
329371c9d4SSatish Balay   DM_SHAPE_GYROID,
339371c9d4SSatish Balay   DM_SHAPE_DOUBLET,
34669647acSMatthew G. Knepley   DM_SHAPE_ANNULUS,
35cfb853baSMatthew G. Knepley   DM_SHAPE_HYPERCUBIC,
365dca41c3SJed Brown   DM_SHAPE_ZBOX,
379371c9d4SSatish Balay   DM_SHAPE_UNKNOWN
389371c9d4SSatish Balay } DMPlexShape;
399318fe57SMatthew G. Knepley PETSC_EXTERN const char *const DMPlexShapes[];
409318fe57SMatthew G. Knepley 
415a107427SMatthew G. Knepley /*E
425a107427SMatthew G. Knepley   DMPlexCSRAlgorithm - The algorithm for building the adjacency graph in CSR format, usually for a mesh partitioner
435a107427SMatthew G. Knepley 
44*16a05f60SBarry Smith   Values:
45*16a05f60SBarry Smith + `DM_PLEX_CSR_MAT`     - Use `MatPartitioning` by first making a matrix
46*16a05f60SBarry Smith . `DM_PLEX_CSR_GRAPH`   - Use the original `DMPLEX` and communicate along the boundary
47*16a05f60SBarry Smith - `DM_PLEX_CSR_OVERLAP` - Build an overlapped `DMPLEX` and then locally compute
485a107427SMatthew G. Knepley 
495a107427SMatthew G. Knepley   Level: beginner
505a107427SMatthew G. Knepley 
51db781477SPatrick Sanan .seealso: `DMPlexCreatePartitionerGraph()`, `PetscPartitionerDMPlexPartition()`, `DMPlexDistribute()`
525a107427SMatthew G. Knepley E*/
539371c9d4SSatish Balay typedef enum {
549371c9d4SSatish Balay   DM_PLEX_CSR_MAT,
559371c9d4SSatish Balay   DM_PLEX_CSR_GRAPH,
569371c9d4SSatish Balay   DM_PLEX_CSR_OVERLAP
579371c9d4SSatish Balay } DMPlexCSRAlgorithm;
585a107427SMatthew G. Knepley PETSC_EXTERN const char *const DMPlexCSRAlgorithms[];
595a107427SMatthew G. Knepley 
60c50b2d26SMatthew G. Knepley typedef struct _p_DMPlexPointQueue *DMPlexPointQueue;
61c50b2d26SMatthew G. Knepley struct _p_DMPlexPointQueue {
62c50b2d26SMatthew G. Knepley   PetscInt  size;   /* Size of the storage array */
63c50b2d26SMatthew G. Knepley   PetscInt *points; /* Array of mesh points */
64c50b2d26SMatthew G. Knepley   PetscInt  front;  /* Index of the front of the queue */
65c50b2d26SMatthew G. Knepley   PetscInt  back;   /* Index of the back of the queue */
66c50b2d26SMatthew G. Knepley   PetscInt  num;    /* Number of enqueued points */
67c50b2d26SMatthew G. Knepley };
68c50b2d26SMatthew G. Knepley 
6986fe8405SMatthew G. Knepley #endif
70