Skip to main content
`Ctrl`+`K`

# 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

DM Basics, `DM`, `DMLabel`, `DMCreateLabel()`, `DMHasLabel()`, `DMPlexGetDepthLabel()`, `DMPlexGetCellType()`

## Level

intermediate

## Location

src/dm/interface/dm.c

Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages