# DMSetLabel
Replaces the label of a given name, or ignores it if the name is not present 
## Synopsis
```
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMSetLabel(DM dm, DMLabel label)
```
Not Collective


## Input Parameters

- ***dm    -*** The `DM` object
- ***label -*** The `DMLabel`, having the same name, to substitute



## Default labels in a `DMPLEX`

- ***"depth"       -*** Holds the depth (co-dimension) of each mesh point
- ***"celltype"    -*** Holds the topological type of each cell
- ***"ghost"       -*** If the DM is distributed with overlap, this marks the cells and faces in the overlap
- ***"Cell Sets"   -*** Mirrors the cell sets defined by GMsh and ExodusII
- ***"Face Sets"   -*** Mirrors the face sets defined by GMsh and ExodusII
- ***"Vertex Sets" -*** Mirrors the vertex sets defined by GMsh





## See Also
 `DMLabel`, `DMCreateLabel()`, `DMHasLabel()`, `DMPlexGetDepthLabel()`, `DMPlexGetCellType()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dm.c.html#DMSetLabel">src/dm/interface/dm.c</A>


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


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