:orphan: # 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; No Fortran Support ## 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 will be the same on all processes. If equal is passed as `NULL` and difference is found, an error is thrown on all processes. Make sure to pass equal is `NULL` on all processes or none of them. The output message is set independently on each rank. message must be freed with `PetscFree()` If message is passed as `NULL` and a difference is found, the difference description is printed to stderr in synchronized manner. Make sure to pass message as `NULL` on all processes or no 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. ## See Also [](ch_dmbase), `DM`, `DMLabel`, `DMAddLabel()`, `DMCopyLabelsMode`, `DMLabelCompare()` ## Level intermediate ## Location src/dm/interface/dm.c ## Examples src/dm/label/tutorials/ex1.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)