xref: /petsc/include/petscis.h (revision 70f55243aafb320636e2a54ff30cab5d1e8d3d7b)
1 /* $Id: is.h,v 1.28 1996/08/04 23:14:42 bsmith Exp bsmith $ */
2 
3 /*
4       An index set is a genralization of a subset of integers. They are used
5    for defining scatters and gathers.
6 */
7 #if !defined(__IS_PACKAGE)
8 #define __IS_PACKAGE
9 #include "petsc.h"
10 
11 typedef enum {IS_SEQ=0, IS_STRIDE_SEQ=1, IS_BLOCK_SEQ = 2} ISType;
12 
13 #define IS_COOKIE PETSC_COOKIE+2
14 
15 typedef struct _IS* IS;
16 
17 extern int   ISCreateSeq(MPI_Comm,int,int *,IS *);
18 extern int   ISCreateBlockSeq(MPI_Comm,int,int,int *,IS *);
19 extern int   ISCreateStrideSeq(MPI_Comm,int,int,int,IS *);
20 
21 extern int   ISDestroy(IS);
22 
23 extern int   ISSetPermutation(IS);
24 extern int   ISPermutation(IS,PetscTruth*);
25 extern int   ISSetIdentity(IS);
26 extern int   ISIdentity(IS,PetscTruth*);
27 
28 extern int   ISGetIndices(IS,int **);
29 extern int   ISRestoreIndices(IS,int **);
30 extern int   ISGetSize(IS,int *);
31 extern int   ISInvertPermutation(IS,IS*);
32 extern int   ISView(IS,Viewer);
33 extern int   ISEqual(IS, IS, PetscTruth *);
34 extern int   ISSort(IS);
35 extern int   ISSorted(IS, PetscTruth *);
36 
37 extern int   ISBlockGetIndices(IS,int **);
38 extern int   ISBlockRestoreIndices(IS,int **);
39 extern int   ISBlockGetBlockSize(IS,int **);
40 
41 extern int   ISStrideGetInfo(IS,int *,int*);
42 
43 #endif
44 
45 
46