PETSc version 3.17.4
Fix/Edit manual page

# DMCompareLabels

Compare labels of two DMPlex meshes

### Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    #include "petscds.h"
    PetscErrorCode DMCompareLabels(DM dm0, DM dm1, PetscBool *equal, char **message)

Collective

### Input Parameters

| dm0 | - First DM object
| dm1 | - Second DM object

Output Parameters

| equal | - (Optional) Flag whether labels of dm0 and dm1 are the same
| message | - (Optional) Message describing the difference, or NULL if there is no difference

### Notes

The output flag equal is the same on all processes. If it is passed as NULL and difference is found, an error is thrown on all processes. Make sure to pass NULL on all processes.

The output message is set independently on each rank. It is set to NULL if no difference was found on the current rank. It must be freed by user. If message is passed as NULL and difference is found, the difference description is printed to stderr in synchronized manner. Make sure to pass NULL on all processes.

Labels are matched by name. If the number of labels and their names are equal, DMLabelCompare() is used to compare each pair of labels with the same name.

### Fortran Notes

This function is currently not available from Fortran.

### See Also

DMAddLabel(), DMCopyLabelsMode, DMLabelCompare()

### Level

intermediate

### Location

src/dm/interface/dm.c

### Examples

src/dm/label/tutorials/ex1.c.html
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages