ISCreateGeneral

Creates a data structure for an index set containing a list of integers.

Synopsis

#include "petscis.h"  
PetscErrorCode  ISCreateGeneral(MPI_Comm comm,PetscInt n,const PetscInt idx[],IS *is)
Collective on MPI_Comm

Input Parameters

comm - the MPI communicator
n - the length of the index set
idx - the list of integers

Output Parameter

is -the new index set

Notes

The index array is copied to internally allocated storage. After the call, the user can free the index array.

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

ISCreateGeneralWithArray(), ISCreateStride(), ISCreateBlock(), ISAllGather()

Level:beginner
Location:
src/vec/is/impls/general/general.c
Index of all IS routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/vec/is/examples/tutorials/ex1.c.html
src/vec/is/examples/tutorials/ex1f.F.html
src/vec/is/examples/tutorials/ex1f90.F.html
src/dm/da/examples/tutorials/ex6.c.html
src/dm/da/examples/tutorials/ex6f90.F.html