:orphan: # DMHasLabel Determine whether the `DM` has a label of a given name ## Synopsis ``` #include "petscdm.h" #include "petscdmlabel.h" #include "petscds.h" PetscErrorCode DMHasLabel(DM dm, const char name[], PetscBool *hasLabel) ``` Not Collective ## Input Parameters - ***dm -*** The `DM` object - ***name -*** The label name ## Output Parameter - ***hasLabel -*** `PETSC_TRUE` if the label is present ## See Also [](ch_dmbase), `DM`, `DMLabel`, `DMGetLabel()`, `DMGetLabelByNum()`, `DMCreateLabel()`, `DMGetLabelValue()`, `DMSetLabelValue()`, `DMGetStratumIS()` ## Level intermediate ## Location src/dm/interface/dm.c ## Examples src/dm/impls/plex/tutorials/ex10.c
src/snes/tutorials/ex12.c
src/ts/tutorials/ex11_sa.c
src/ts/tutorials/ex48.c
--- [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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)