xref: /petsc/include/petscis.h (revision 6a67db7e1512b5d9ff9ba8f94e48d05f0a9eae3d)
1 /* $Id: is.h,v 1.29 1996/08/05 03:49:27 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_GENERAL=0, IS_STRIDE=1, IS_BLOCK = 2} ISType;
12 
13 #define IS_COOKIE PETSC_COOKIE+2
14 
15 typedef struct _IS* IS;
16 
17 extern int   ISCreateGeneral(MPI_Comm,int,int *,IS *);
18 extern int   ISCreateBlock(MPI_Comm,int,int,int *,IS *);
19 extern int   ISCreateStride(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   ISBlock(IS,PetscTruth*);
38 extern int   ISBlockGetIndices(IS,int **);
39 extern int   ISBlockRestoreIndices(IS,int **);
40 extern int   ISBlockGetSize(IS,int *);
41 extern int   ISBlockGetBlockSize(IS,int *);
42 
43 extern int   ISStride(IS,PetscTruth*);
44 extern int   ISStrideGetInfo(IS,int *,int*);
45 
46 #endif
47 
48 
49