ISEqual#
Compares if two index sets have the same set of indices.
Synopsis#
#include "petscis.h"
PetscErrorCode ISEqual(IS is1, IS is2, PetscBool *flg)
Collective
Input Parameters#
is1 - first index set to compare
is2 - second index set to compare
Output Parameter#
flg - output flag, either
PETSC_TRUE(if both index sets have the same indices), orPETSC_FALSEif the index sets differ by size or by the set of indices)
Note#
Unlike ISEqualUnsorted(), this routine sorts the contents of the index sets (only within each MPI rank) before
the comparison is made, so the order of the indices on a processor is immaterial.
Each processor has to have the same indices in the two sets, for example,
Processor
0 1
is1 = {0, 1} {2, 3}
is2 = {2, 3} {0, 1}
will return false.
See Also#
Level#
intermediate
Location#
Examples#
src/vec/is/is/tests/ex13.c
src/vec/is/is/tests/ex1.c
src/vec/is/is/tests/ex12.c
src/vec/is/is/tests/ex1f.F90
src/vec/is/is/tests/ex6.c
src/vec/is/is/tests/ex9.c
src/vec/is/tests/ex2.c
src/ksp/ksp/tutorials/ex71.c
src/dm/impls/plex/tests/ex18.c
src/ksp/pc/impls/bddc/tests/ex2.c
Index of all IS routines
Table of Contents for all manual pages
Index of all manual pages