1*537820f0SBarry Smith /* $Id: is.h,v 1.29 1996/08/05 03:49:27 bsmith Exp bsmith $ */ 22eac72dbSBarry Smith 32eac72dbSBarry Smith /* 47588ac45SBarry Smith An index set is a genralization of a subset of 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 11*537820f0SBarry Smith typedef enum {IS_GENERAL=0, IS_STRIDE=1, IS_BLOCK = 2} ISType; 124b0e389bSBarry Smith 139e25ed09SBarry Smith #define IS_COOKIE PETSC_COOKIE+2 14f0479e8cSBarry Smith 152eac72dbSBarry Smith typedef struct _IS* IS; 162eac72dbSBarry Smith 17*537820f0SBarry Smith extern int ISCreateGeneral(MPI_Comm,int,int *,IS *); 18*537820f0SBarry Smith extern int ISCreateBlock(MPI_Comm,int,int,int *,IS *); 19*537820f0SBarry Smith extern int ISCreateStride(MPI_Comm,int,int,int,IS *); 204b0e389bSBarry Smith 214b0e389bSBarry Smith extern int ISDestroy(IS); 224b0e389bSBarry Smith 23aabeff55SBarry Smith extern int ISSetPermutation(IS); 2477c4ece6SBarry Smith extern int ISPermutation(IS,PetscTruth*); 2508480c60SBarry Smith extern int ISSetIdentity(IS); 2677c4ece6SBarry Smith extern int ISIdentity(IS,PetscTruth*); 2708480c60SBarry Smith 28aabeff55SBarry Smith extern int ISGetIndices(IS,int **); 29aabeff55SBarry Smith extern int ISRestoreIndices(IS,int **); 30aabeff55SBarry Smith extern int ISGetSize(IS,int *); 31aabeff55SBarry Smith extern int ISInvertPermutation(IS,IS*); 32aabeff55SBarry Smith extern int ISView(IS,Viewer); 3377c4ece6SBarry Smith extern int ISEqual(IS, IS, PetscTruth *); 340f453280SSatish Balay extern int ISSort(IS); 3577c4ece6SBarry Smith extern int ISSorted(IS, PetscTruth *); 36612dd529SBarry Smith 37*537820f0SBarry Smith extern int ISBlock(IS,PetscTruth*); 38c16cb8f2SBarry Smith extern int ISBlockGetIndices(IS,int **); 39c16cb8f2SBarry Smith extern int ISBlockRestoreIndices(IS,int **); 40*537820f0SBarry Smith extern int ISBlockGetSize(IS,int *); 41*537820f0SBarry Smith extern int ISBlockGetBlockSize(IS,int *); 42c16cb8f2SBarry Smith 43*537820f0SBarry Smith extern int ISStride(IS,PetscTruth*); 44c16cb8f2SBarry Smith extern int ISStrideGetInfo(IS,int *,int*); 45c16cb8f2SBarry Smith 46a2ce50c7SBarry Smith #endif 477588ac45SBarry Smith 487588ac45SBarry Smith 49