xref: /petsc/include/petscis.h (revision c16cb8f2de640b3af1673495cb6d811eff24116a)
1*c16cb8f2SBarry Smith /* $Id: is.h,v 1.27 1996/07/02 18:09:25 bsmith 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 
11*c16cb8f2SBarry 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 *);
18*c16cb8f2SBarry 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 
37*c16cb8f2SBarry Smith extern int   ISBlockGetIndices(IS,int **);
38*c16cb8f2SBarry Smith extern int   ISBlockRestoreIndices(IS,int **);
39*c16cb8f2SBarry Smith extern int   ISBlockGetBlockSize(IS,int **);
40*c16cb8f2SBarry Smith 
41*c16cb8f2SBarry Smith extern int   ISStrideGetInfo(IS,int *,int*);
42*c16cb8f2SBarry Smith 
43a2ce50c7SBarry Smith #endif
44