:orphan: # VecWhichEqual Creates an index set containing the indices where the vectors `Vec1` and `Vec2` have identical elements. ## Synopsis ``` #include "petscvec.h" PetscErrorCode VecWhichEqual(Vec Vec1, Vec Vec2, IS *S) ``` Collective ## Input Parameters - ***Vec1 -*** the first vector to compare - ***Vec2 -*** the second two vector to compare ## OutputParameter - ***S -*** The index set containing the indices i where vec1[i] == vec2[i] ## Note The two vectors must have the same parallel layout ## See Also `Vec` ## Level advanced ## Location src/vec/vec/utils/projection.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/utils/projection.c) [Index of all Vec routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)