xref: /petsc/include/petscdmplextypes.h (revision 6524c165f7ddaf30fd7457737f668f984c8ababf)
1*6524c165SJacob 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 
99318fe57SMatthew G. Knepley   Existing shapes include
109318fe57SMatthew G. Knepley $ DM_SHAPE_BOX         - The tensor product of intervals in dimension d
119318fe57SMatthew G. Knepley $ DM_SHAPE_BOX_SURFACE - The surface of a box in dimension d+1
129318fe57SMatthew G. Knepley $ DM_SHAPE_BALL        - The d-dimensional ball
139318fe57SMatthew G. Knepley $ DM_SHAPE_SPHERE      - The surface of the (d+1)-dimensional ball
149318fe57SMatthew G. Knepley $ DM_SHAPE_CYLINDER    - The tensor product of the interval and disk
15b7f5c055SJed Brown $ DM_SHAPE_SCHWARZ_P   - The Schwarz-P triply periodic minimal surface
16b7f5c055SJed Brown $ DM_SHAPE_GYROID      - The Gyroid triply periodic minimal surface
1705bd46c0SStefano Zampini $ DM_SHAPE_DOUBLET     - The mesh of two cells of a specified type
18669647acSMatthew G. Knepley $ DM_SHAPE_ANNULUS     - The area between two concentric spheres in dimension d
199318fe57SMatthew G. Knepley 
209318fe57SMatthew G. Knepley   Level: beginner
219318fe57SMatthew G. Knepley 
22db781477SPatrick Sanan .seealso: `DMPlexGetCellRefiner()`, `DMPlexSetCellRefiner()`, `DMRefine()`, `DMPolytopeType`
239318fe57SMatthew G. Knepley E*/
249371c9d4SSatish Balay typedef enum {
259371c9d4SSatish Balay   DM_SHAPE_BOX,
269371c9d4SSatish Balay   DM_SHAPE_BOX_SURFACE,
279371c9d4SSatish Balay   DM_SHAPE_BALL,
289371c9d4SSatish Balay   DM_SHAPE_SPHERE,
299371c9d4SSatish Balay   DM_SHAPE_CYLINDER,
309371c9d4SSatish Balay   DM_SHAPE_SCHWARZ_P,
319371c9d4SSatish Balay   DM_SHAPE_GYROID,
329371c9d4SSatish Balay   DM_SHAPE_DOUBLET,
33669647acSMatthew G. Knepley   DM_SHAPE_ANNULUS,
349371c9d4SSatish Balay   DM_SHAPE_UNKNOWN
359371c9d4SSatish Balay } DMPlexShape;
369318fe57SMatthew G. Knepley PETSC_EXTERN const char *const DMPlexShapes[];
379318fe57SMatthew G. Knepley 
385a107427SMatthew G. Knepley /*E
395a107427SMatthew G. Knepley   DMPlexCSRAlgorithm - The algorithm for building the adjacency graph in CSR format, usually for a mesh partitioner
405a107427SMatthew G. Knepley 
415a107427SMatthew G. Knepley   Existing shapes include
4287497f52SBarry Smith $ DM_PLEX_CSR_MAT     - Use `MatPartitioning` by first making a matrix
4387497f52SBarry Smith $ DM_PLEX_CSR_GRAPH   - Use the original `DMPLEX` and communicate along the boundary
4487497f52SBarry Smith $ DM_PLEX_CSR_OVERLAP - Build an overlapped `DMPLEX` and then locally compute
455a107427SMatthew G. Knepley 
465a107427SMatthew G. Knepley   Level: beginner
475a107427SMatthew G. Knepley 
48db781477SPatrick Sanan .seealso: `DMPlexCreatePartitionerGraph()`, `PetscPartitionerDMPlexPartition()`, `DMPlexDistribute()`
495a107427SMatthew G. Knepley E*/
509371c9d4SSatish Balay typedef enum {
519371c9d4SSatish Balay   DM_PLEX_CSR_MAT,
529371c9d4SSatish Balay   DM_PLEX_CSR_GRAPH,
539371c9d4SSatish Balay   DM_PLEX_CSR_OVERLAP
549371c9d4SSatish Balay } DMPlexCSRAlgorithm;
555a107427SMatthew G. Knepley PETSC_EXTERN const char *const DMPlexCSRAlgorithms[];
565a107427SMatthew G. Knepley 
57c50b2d26SMatthew G. Knepley typedef struct _p_DMPlexPointQueue *DMPlexPointQueue;
58c50b2d26SMatthew G. Knepley struct _p_DMPlexPointQueue {
59c50b2d26SMatthew G. Knepley   PetscInt  size;   /* Size of the storage array */
60c50b2d26SMatthew G. Knepley   PetscInt *points; /* Array of mesh points */
61c50b2d26SMatthew G. Knepley   PetscInt  front;  /* Index of the front of the queue */
62c50b2d26SMatthew G. Knepley   PetscInt  back;   /* Index of the back of the queue */
63c50b2d26SMatthew G. Knepley   PetscInt  num;    /* Number of enqueued points */
64c50b2d26SMatthew G. Knepley };
65c50b2d26SMatthew G. Knepley 
6686fe8405SMatthew G. Knepley #endif
67