xref: /petsc/include/petscis.h (revision e78daa7df64465c5433a8e915d2a72f3bcad4f37)
1 /* $Id: is.h,v 1.30 1996/08/15 12:51:50 bsmith Exp curfman $ */
2 
3 /*
4    An index set is a generalization of a subset of integers.  Index sets
5    are used 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