#include "petscdmlabel.h" #include "petscsection.h" PetscErrorCode DMLabelCompare(MPI_Comm comm, DMLabel l0, DMLabel l1, PetscBool *equal, char **message)Collective on comm
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 |
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.