:orphan:
# DMCopyLabelsMode
Determines how `DMCopyLabels()` behaves when there is a `DMLabel` in the source and destination DMs with the same name
## Synopsis
```
typedef enum {
DM_COPY_LABELS_REPLACE,
DM_COPY_LABELS_KEEP,
DM_COPY_LABELS_FAIL
} DMCopyLabelsMode;
```
## Values
- ***`DM_COPY_LABELS_REPLACE` -*** replace label in destination by label from source
- ***`DM_COPY_LABELS_KEEP` -*** keep destination label
- ***`DM_COPY_LABELS_FAIL` -*** throw error
## See Also
`DMLabel`, `DM`, `DMCompareLabels()`, `DMRemoveLabel()`
## Level
advanced
## Location
include/petscdm.h
## Examples
src/dm/label/tutorials/ex1.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscdm.h)
[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)