Skip to main content
`Ctrl`+`K`

# DMCopyLabelsMode

Determines how `DMCopyLabels()` behaves when there is a `DMLabel` in the source and destination `DM`s 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` - generate an error

## See Also

DM Basics, `DMLabel`, `DM`, `DMCompareLabels()`, `DMRemoveLabel()`

## Level

advanced

## Location

include/petscdm.h

## Examples

src/dm/label/tutorials/ex1.c

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