: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
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscdm.h.html#DMCopyLabelsMode">include/petscdm.h</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/label/tutorials/ex1.c.html">src/dm/label/tutorials/ex1.c</A><BR>


---
[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)  
