DMLabelCompare#
Compare two DMLabel objects
Synopsis#
#include "petscdmlabel.h"
#include "petscsection.h"
PetscErrorCode DMLabelCompare(MPI_Comm comm, DMLabel l0, DMLabel l1, PetscBool *equal, char **message)
Collective on comm
Input Parameters#
comm - Comm over which to compare labels
l0 - First DMLabel
l1 - Second DMLabel
Output Parameters
equal - (Optional) Flag whether the two labels are equal
message - (Optional) Message describing the 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.
For the comparison, we ignore the order of stratum values, and strata with no points.
The communicator needs to be specified because currently DMLabel can live on PETSC_COMM_SELF even if the underlying DM is parallel.
Fortran Notes#
This function is currently not available from Fortran.
See Also#
DMCompareLabels()
, DMLabelGetNumValues()
, DMLabelGetDefaultValue()
, DMLabelGetNonEmptyStratumValuesIS()
, DMLabelGetStratumIS()
Level#
intermediate
Location#
Examples#
src/dm/label/tutorials/ex1.c.html
Index of all DMLabel routines
Table of Contents for all manual pages
Index of all manual pages