xref: /petsc/include/petscdmplextypes.h (revision af27ebaa0199971c43fd2e2e162251afd1bcda49)
1a4963045SJacob Faibussowitsch #pragma once
286fe8405SMatthew G. Knepley 
3ac09b921SBarry Smith /* SUBMANSEC = DMPlex */
4ac09b921SBarry Smith 
59318fe57SMatthew G. Knepley /*E
69318fe57SMatthew G. Knepley   DMPlexShape - The domain shape used for automatic mesh creation.
79318fe57SMatthew G. Knepley 
816a05f60SBarry Smith   Values:
916a05f60SBarry Smith + `DM_SHAPE_BOX`         - The tensor product of intervals in dimension d
1016a05f60SBarry Smith . `DM_SHAPE_BOX_SURFACE` - The surface of a box in dimension d+1
1116a05f60SBarry Smith . `DM_SHAPE_BALL`        - The d-dimensional ball
1216a05f60SBarry Smith . `DM_SHAPE_SPHERE`      - The surface of the (d+1)-dimensional ball
1316a05f60SBarry Smith . `DM_SHAPE_CYLINDER`    - The tensor product of the interval and disk
1416a05f60SBarry Smith . `DM_SHAPE_SCHWARZ_P`   - The Schwarz-P triply periodic minimal surface
1516a05f60SBarry Smith . `DM_SHAPE_GYROID`      - The Gyroid triply periodic minimal surface
1616a05f60SBarry Smith . `DM_SHAPE_DOUBLET`     - The mesh of two cells of a specified type
1716a05f60SBarry Smith . `DM_SHAPE_ANNULUS`     - The area between two concentric spheres in dimension d
1816a05f60SBarry Smith - `DM_SHAPE_HYPERCUBIC`  - The skeleton of the tensor product of the intervals
199318fe57SMatthew G. Knepley 
209318fe57SMatthew G. Knepley   Level: beginner
219318fe57SMatthew G. Knepley 
22*af27ebaaSBarry Smith .seealso: [](ch_dmbase), `DMPLEX`, `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,
34cfb853baSMatthew G. Knepley   DM_SHAPE_HYPERCUBIC,
355dca41c3SJed Brown   DM_SHAPE_ZBOX,
369371c9d4SSatish Balay   DM_SHAPE_UNKNOWN
379371c9d4SSatish Balay } DMPlexShape;
389318fe57SMatthew G. Knepley PETSC_EXTERN const char *const DMPlexShapes[];
399318fe57SMatthew G. Knepley 
405a107427SMatthew G. Knepley /*E
415a107427SMatthew G. Knepley   DMPlexCSRAlgorithm - The algorithm for building the adjacency graph in CSR format, usually for a mesh partitioner
425a107427SMatthew G. Knepley 
4316a05f60SBarry Smith   Values:
4416a05f60SBarry Smith + `DM_PLEX_CSR_MAT`     - Use `MatPartitioning` by first making a matrix
4516a05f60SBarry Smith . `DM_PLEX_CSR_GRAPH`   - Use the original `DMPLEX` and communicate along the boundary
4616a05f60SBarry Smith - `DM_PLEX_CSR_OVERLAP` - Build an overlapped `DMPLEX` and then locally compute
475a107427SMatthew G. Knepley 
485a107427SMatthew G. Knepley   Level: beginner
495a107427SMatthew G. Knepley 
50*af27ebaaSBarry Smith .seealso: [](ch_dmbase), `DMPLEX`, `DMPlexCreatePartitionerGraph()`, `PetscPartitionerDMPlexPartition()`, `DMPlexDistribute()`
515a107427SMatthew G. Knepley E*/
529371c9d4SSatish Balay typedef enum {
539371c9d4SSatish Balay   DM_PLEX_CSR_MAT,
549371c9d4SSatish Balay   DM_PLEX_CSR_GRAPH,
559371c9d4SSatish Balay   DM_PLEX_CSR_OVERLAP
569371c9d4SSatish Balay } DMPlexCSRAlgorithm;
575a107427SMatthew G. Knepley PETSC_EXTERN const char *const DMPlexCSRAlgorithms[];
585a107427SMatthew G. Knepley 
59c50b2d26SMatthew G. Knepley typedef struct _p_DMPlexPointQueue *DMPlexPointQueue;
60c50b2d26SMatthew G. Knepley struct _p_DMPlexPointQueue {
61c50b2d26SMatthew G. Knepley   PetscInt  size;   /* Size of the storage array */
62c50b2d26SMatthew G. Knepley   PetscInt *points; /* Array of mesh points */
63c50b2d26SMatthew G. Knepley   PetscInt  front;  /* Index of the front of the queue */
64c50b2d26SMatthew G. Knepley   PetscInt  back;   /* Index of the back of the queue */
65c50b2d26SMatthew G. Knepley   PetscInt  num;    /* Number of enqueued points */
66c50b2d26SMatthew G. Knepley };
67