1*77c4ece6SBarry Smith /* $Id: is.h,v 1.22 1996/02/16 20:04:25 balay Exp bsmith $ */ 22eac72dbSBarry Smith 32eac72dbSBarry Smith /* 4f26ada1bSBarry Smith An index set is essentially a subset of the integers. They are used 5f26ada1bSBarry Smith for defining scatters and gathers. 62eac72dbSBarry Smith */ 72eac72dbSBarry Smith #if !defined(__IS_PACKAGE) 82eac72dbSBarry Smith #define __IS_PACKAGE 92eac72dbSBarry Smith #include "petsc.h" 102eac72dbSBarry Smith 114b0e389bSBarry Smith typedef enum {IS_SEQ=0, IS_STRIDE_SEQ=2} IndexSetType; 124b0e389bSBarry Smith 139e25ed09SBarry Smith #define IS_COOKIE PETSC_COOKIE+2 14f0479e8cSBarry Smith 152eac72dbSBarry Smith typedef struct _IS* IS; 162eac72dbSBarry Smith 17de7da479SBarry Smith extern int ISCreateSeq(MPI_Comm,int,int *,IS *); 18de7da479SBarry Smith extern int ISCreateStrideSeq(MPI_Comm,int,int,int,IS *); 194b0e389bSBarry Smith 204b0e389bSBarry Smith extern int ISDestroy(IS); 214b0e389bSBarry Smith 2220563c6bSBarry Smith extern int ISStrideGetInfo(IS,int *,int*); 232eac72dbSBarry Smith 24aabeff55SBarry Smith extern int ISSetPermutation(IS); 25*77c4ece6SBarry Smith extern int ISPermutation(IS,PetscTruth*); 2608480c60SBarry Smith extern int ISSetIdentity(IS); 27*77c4ece6SBarry Smith extern int ISIdentity(IS,PetscTruth*); 2808480c60SBarry Smith 29aabeff55SBarry Smith extern int ISGetIndices(IS,int **); 30aabeff55SBarry Smith extern int ISRestoreIndices(IS,int **); 31aabeff55SBarry Smith extern int ISGetSize(IS,int *); 32aabeff55SBarry Smith extern int ISInvertPermutation(IS,IS*); 33aabeff55SBarry Smith extern int ISView(IS,Viewer); 34*77c4ece6SBarry Smith extern int ISEqual(IS, IS, PetscTruth *); 350f453280SSatish Balay extern int ISSort(IS); 36*77c4ece6SBarry Smith extern int ISSorted(IS, PetscTruth *); 372eac72dbSBarry Smith #endif 38