#include "petscis.h" PetscErrorCode ISGeneralSetIndicesFromMask(IS is,PetscInt rstart,PetscInt rend,const PetscBool mask[])Collective on IS
is | - the index set | |
rstart | - the range start index (inclusive) | |
rend | - the range end index (exclusive) | |
mask | - the boolean mask array of length rend-rstart, indices will be set for each PETSC_TRUE value in the array |
PetscBool mask[] = {PETSC_FALSE, PETSC_TRUE, PETSC_FALSE, PETSC_FALSE, PETSC_TRUE};
ISGeneralSetIndicesFromMask(is,10,15,mask);will feed the IS with indices
{11, 14}locally.