# DMPLEX
"plex" - A `DM` object that encapsulates an unstructured mesh, or CW Complex, which can be expressed using a Hasse Diagram. In the local representation, Vecs contain all unknowns in the interior and shared boundary. This is specified by a PetscSection object. Ownership in the global representation is determined by ownership of the underlying `DMPLEX` points. This is specified by another `PetscSection` object. 
## Options Database Keys

- ***-dm_refine_pre                     -*** Refine mesh before distribution
+ -dm_refine_uniform_pre             - Choose uniform or generator-based refinement
+ -dm_refine_volume_limit_pre        - Cell volume limit after pre-refinement using generator
- ***-dm_distribute                     -*** Distribute mesh across processes
- ***-dm_distribute_overlap             -*** Number of cells to overlap for distribution
- ***-dm_refine                         -*** Refine mesh after distribution
- ***-dm_plex_hash_location             -*** Use grid hashing for point location
- ***-dm_plex_hash_box_faces <n,m,p>    -*** The number of divisions in each direction of the grid hash
- ***-dm_plex_partition_balance         -*** Attempt to evenly divide points on partition boundary between processes
- ***-dm_plex_remesh_bd                 -*** Allow changes to the boundary on remeshing
- ***-dm_plex_max_projection_height     -*** Maximum mesh point height used to project locally
- ***-dm_plex_regular_refinement        -*** Use special nested projection algorithm for regular refinement
- ***-dm_plex_check_all                 -*** Perform all shecks below
- ***-dm_plex_check_symmetry            -*** Check that the adjacency information in the mesh is symmetric
- ***-dm_plex_check_skeleton <celltype> -*** Check that each cell has the correct number of vertices
- ***-dm_plex_check_faces <celltype>    -*** Check that the faces of each cell give a vertex order this is consistent with what we expect from the cell type
- ***-dm_plex_check_geometry            -*** Check that cells have positive volume
- ***-dm_view :mesh.tex:ascii_latex     -*** View the mesh in LaTeX/TikZ
- ***-dm_plex_view_scale <num>          -*** Scale the TikZ
- ***-dm_plex_print_fem <num>           -*** View FEM assembly information, such as element vectors and matrices





## See Also
 [](chapter_unstructured), `DM`, `DMPLEX`, `DMType`, `DMPlexCreate()`, `DMCreate()`, `DMSetType()`, `PetscSection`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plexcreate.c.html#DMPLEX">src/dm/impls/plex/plexcreate.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex1.c.html">src/dm/impls/plex/tutorials/ex1.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex10.c.html">src/dm/impls/plex/tutorials/ex10.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex11.c.html">src/dm/impls/plex/tutorials/ex11.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex14.c.html">src/dm/impls/plex/tutorials/ex14.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex1f90.F90.html">src/dm/impls/plex/tutorials/ex1f90.F90.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex5.c.html">src/dm/impls/plex/tutorials/ex5.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex6.c.html">src/dm/impls/plex/tutorials/ex6.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex7.c.html">src/dm/impls/plex/tutorials/ex7.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex8.c.html">src/dm/impls/plex/tutorials/ex8.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex9.c.html">src/dm/impls/plex/tutorials/ex9.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/forest/tutorials/ex1.c.html">src/dm/impls/forest/tutorials/ex1.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plexcreate.c)


[Index of all DMPlex routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
