PETSc version 3.17.4
Fix/Edit manual page

ISGeneralSetIndicesFromMask

Sets the indices for an ISGENERAL index set using a boolean mask

Synopsis

#include "petscis.h"  
PetscErrorCode ISGeneralSetIndicesFromMask(IS is,PetscInt rstart,PetscInt rend,const PetscBool mask[])
Collective on IS

Input Parameters

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

Notes

The mask array may be freed by the user after this call.

Example

 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.

See Also

ISCreateGeneral(), ISGeneralSetIndices(), ISGENERAL

Level

beginner

Location

src/vec/is/is/impls/general/general.c

Implementations

ISGeneralSetIndicesFromMask_General in src/vec/is/is/impls/general/general.c

Index of all IS routines
Table of Contents for all manual pages
Index of all manual pages