xref: /petsc/include/petscis.h (revision f825625345827666547ab5e1686bcfbd53875185)
1*f8256253SLois Curfman McInnes /* $Id: is.h,v 1.30 1996/08/15 12:51:50 bsmith Exp curfman $ */
22eac72dbSBarry Smith 
32eac72dbSBarry Smith /*
4*f8256253SLois Curfman McInnes    An index set is a generalization of a subset of integers.  Index sets
5*f8256253SLois Curfman McInnes    are used 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 
11537820f0SBarry 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 
17537820f0SBarry Smith extern int   ISCreateGeneral(MPI_Comm,int,int *,IS *);
18537820f0SBarry Smith extern int   ISCreateBlock(MPI_Comm,int,int,int *,IS *);
19537820f0SBarry 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 
37537820f0SBarry Smith extern int   ISBlock(IS,PetscTruth*);
38c16cb8f2SBarry Smith extern int   ISBlockGetIndices(IS,int **);
39c16cb8f2SBarry Smith extern int   ISBlockRestoreIndices(IS,int **);
40537820f0SBarry Smith extern int   ISBlockGetSize(IS,int *);
41537820f0SBarry Smith extern int   ISBlockGetBlockSize(IS,int *);
42c16cb8f2SBarry Smith 
43537820f0SBarry Smith extern int   ISStride(IS,PetscTruth*);
44c16cb8f2SBarry Smith extern int   ISStrideGetInfo(IS,int *,int*);
45c16cb8f2SBarry Smith 
46a2ce50c7SBarry Smith #endif
477588ac45SBarry Smith 
487588ac45SBarry Smith 
49