# DMPlexCreateSubmesh
Extract a hypersurface from the mesh using vertices defined by a label 
## Synopsis
```
#include "petscdmplex.h"    
#include "petscdmlabel.h"   
PetscErrorCode DMPlexCreateSubmesh(DM dm, DMLabel vertexLabel, PetscInt value, PetscBool markedFaces, DM *subdm)
```

## Input Parameters

- ***dm           -*** The original mesh
- ***vertexLabel  -*** The DMLabel marking points contained in the surface
- ***value        -*** The label value to use
- ***markedFaces  -*** PETSC_TRUE if surface faces are marked in addition to vertices, PETSC_FALSE if only vertices are marked



## Output Parameter

- ***subdm -*** The surface mesh


Note: This function produces a DMLabel mapping original points in the submesh to their depth. This can be obtained using DMPlexGetSubpointMap().




## See Also
 `DMPlexGetSubpointMap()`, `DMGetLabel()`, `DMLabelSetValue()`

## Level
developer

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plexsubmesh.c.html#DMPlexCreateSubmesh_Uninterpolated">DMPlexCreateSubmesh_Uninterpolated in src/dm/impls/plex/plexsubmesh.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plexsubmesh.c.html#DMPlexCreateSubmesh_Interpolated">DMPlexCreateSubmesh_Interpolated in src/dm/impls/plex/plexsubmesh.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plexsubmesh.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)  
