1 #pragma once 2 3 /* SUBMANSEC = DMPlex */ 4 5 /*E 6 DMPlexShape - The domain shape used for automatic mesh creation. 7 8 Values: 9 + `DM_SHAPE_BOX` - The tensor product of intervals in dimension d 10 . `DM_SHAPE_BOX_SURFACE` - The surface of a box in dimension d+1 11 . `DM_SHAPE_BALL` - The d-dimensional ball 12 . `DM_SHAPE_SPHERE` - The surface of the (d+1)-dimensional ball 13 . `DM_SHAPE_CYLINDER` - The tensor product of the interval and disk 14 . `DM_SHAPE_SCHWARZ_P` - The Schwarz-P triply periodic minimal surface 15 . `DM_SHAPE_GYROID` - The Gyroid triply periodic minimal surface 16 . `DM_SHAPE_DOUBLET` - The mesh of two cells of a specified type 17 . `DM_SHAPE_ANNULUS` - The area between two concentric spheres in dimension d 18 - `DM_SHAPE_HYPERCUBIC` - The skeleton of the tensor product of the intervals 19 20 Level: beginner 21 22 .seealso: [](ch_dmbase), `DMPLEX`, `DMPlexGetCellRefiner()`, `DMPlexSetCellRefiner()`, `DMRefine()`, `DMPolytopeType`, `DMPlexCoordMap` 23 E*/ 24 typedef enum { 25 DM_SHAPE_BOX, 26 DM_SHAPE_BOX_SURFACE, 27 DM_SHAPE_BALL, 28 DM_SHAPE_SPHERE, 29 DM_SHAPE_CYLINDER, 30 DM_SHAPE_SCHWARZ_P, 31 DM_SHAPE_GYROID, 32 DM_SHAPE_DOUBLET, 33 DM_SHAPE_ANNULUS, 34 DM_SHAPE_HYPERCUBIC, 35 DM_SHAPE_ZBOX, 36 DM_SHAPE_UNKNOWN 37 } DMPlexShape; 38 PETSC_EXTERN const char *const DMPlexShapes[]; 39 40 /*E 41 DMPlexCoordMap - The coordinate mapping used for automatic mesh creation. 42 43 Values: 44 + `DM_COORD_MAP_NONE` - The identity map 45 . `DM_COORD_MAP_SHEAR` - The shear (additive) map along some dimension 46 . `DM_COORD_MAP_FLARE` - The flare (multiplicative) map along some dimension 47 . `DM_COORD_MAP_ANNULUS` - The map from a rectangle to an annulus 48 - `DM_COORD_MAP_SHELL` - The map from a rectangular solid to an spherical shell 49 50 Level: beginner 51 52 .seealso: [](ch_dmbase), `DMPLEX`, `DMPlexGetCellRefiner()`, `DMPlexSetCellRefiner()`, `DMRefine()`, `DMPolytopeType`, `DMPlexShape` 53 E*/ 54 typedef enum { 55 DM_COORD_MAP_NONE, 56 DM_COORD_MAP_SHEAR, 57 DM_COORD_MAP_FLARE, 58 DM_COORD_MAP_ANNULUS, 59 DM_COORD_MAP_SHELL, 60 DM_COORD_MAP_UNKNOWN 61 } DMPlexCoordMap; 62 PETSC_EXTERN const char *const DMPlexCoordMaps[]; 63 64 /*E 65 DMPlexCSRAlgorithm - The algorithm for building the adjacency graph in CSR format, usually for a mesh partitioner 66 67 Values: 68 + `DM_PLEX_CSR_MAT` - Use `MatPartitioning` by first making a matrix 69 . `DM_PLEX_CSR_GRAPH` - Use the original `DMPLEX` and communicate along the boundary 70 - `DM_PLEX_CSR_OVERLAP` - Build an overlapped `DMPLEX` and then locally compute 71 72 Level: beginner 73 74 .seealso: [](ch_dmbase), `DMPLEX`, `DMPlexCreatePartitionerGraph()`, `PetscPartitionerDMPlexPartition()`, `DMPlexDistribute()` 75 E*/ 76 typedef enum { 77 DM_PLEX_CSR_MAT, 78 DM_PLEX_CSR_GRAPH, 79 DM_PLEX_CSR_OVERLAP 80 } DMPlexCSRAlgorithm; 81 PETSC_EXTERN const char *const DMPlexCSRAlgorithms[]; 82 83 typedef struct _p_DMPlexPointQueue *DMPlexPointQueue; 84 struct _p_DMPlexPointQueue { 85 PetscInt size; /* Size of the storage array */ 86 PetscInt *points; /* Array of mesh points */ 87 PetscInt front; /* Index of the front of the queue */ 88 PetscInt back; /* Index of the back of the queue */ 89 PetscInt num; /* Number of enqueued points */ 90 }; 91