Skip to main content
`Ctrl`+`K`

# ISCreate

Create an index set object. `IS`, index sets, are PETSc objects used to do efficient indexing into other data structures such as `Vec` and `Mat`

## Synopsis

    #include "petscis.h"
    PetscErrorCode ISCreate(MPI_Comm comm, IS *is)

Collective

## Input Parameter

- comm - the MPI communicator

## Output Parameter

- is - the new index set

## Notes

When the communicator is not `MPI_COMM_SELF`, the operations on `is` are NOT conceptually the same as `MPI_Group` operations. The `IS` are then distributed sets of indices and thus certain operations on them are collective.

## See Also

Low-level Vector Communication, `IS`, `ISType()`, `ISSetType()`, `ISCreateGeneral()`, `ISCreateStride()`, `ISCreateBlock()`, `ISAllGather()`

## Level

beginner

## Location

src/vec/is/is/interface/isreg.c

## Examples

src/ksp/ksp/tutorials/ex27.c
src/ksp/ksp/tutorials/ex76f.F90
src/ksp/ksp/tutorials/ex76.c
src/ksp/ksp/tutorials/ex87.c

## Implementations

ISCreate_Block() in src/vec/is/is/impls/block/block.c
ISCreate_General() in src/vec/is/is/impls/general/general.c
ISCreate_Stride() in src/vec/is/is/impls/stride/stride.c

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