xref: /petsc/include/petscis.h (revision 7588ac453a7d7d872c5aec6f94f91e06c2178d20)
1*7588ac45SBarry Smith /* $Id: is.h,v 1.28 1996/08/04 23:14:42 bsmith Exp bsmith $ */
22eac72dbSBarry Smith 
32eac72dbSBarry Smith /*
4*7588ac45SBarry 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 
11c16cb8f2SBarry Smith typedef enum {IS_SEQ=0, IS_STRIDE_SEQ=1, IS_BLOCK_SEQ = 2} ISType;
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 *);
18c16cb8f2SBarry Smith extern int   ISCreateBlockSeq(MPI_Comm,int,int,int *,IS *);
19de7da479SBarry Smith extern int   ISCreateStrideSeq(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 
37c16cb8f2SBarry Smith extern int   ISBlockGetIndices(IS,int **);
38c16cb8f2SBarry Smith extern int   ISBlockRestoreIndices(IS,int **);
39c16cb8f2SBarry Smith extern int   ISBlockGetBlockSize(IS,int **);
40c16cb8f2SBarry Smith 
41c16cb8f2SBarry Smith extern int   ISStrideGetInfo(IS,int *,int*);
42c16cb8f2SBarry Smith 
43a2ce50c7SBarry Smith #endif
44*7588ac45SBarry Smith 
45*7588ac45SBarry Smith 
46