xref: /petsc/include/petscis.h (revision bb74729cafbfcb6265ea097979a2a2cac4d11507)
12eac72dbSBarry Smith /*
2f8256253SLois Curfman McInnes    An index set is a generalization of a subset of integers.  Index sets
3f8256253SLois Curfman McInnes    are used for defining scatters and gathers.
42eac72dbSBarry Smith */
50a835dfdSSatish Balay #if !defined(__PETSCIS_H)
60a835dfdSSatish Balay #define __PETSCIS_H
72c8e378dSBarry Smith #include <petscsys.h>
82c8e378dSBarry Smith #include <petscsf.h>
92eac72dbSBarry Smith 
1097b48c8fSBarry Smith #define IS_FILE_CLASSID 1211218
11014dd563SJed Brown PETSC_EXTERN PetscClassId IS_CLASSID;
12f0479e8cSBarry Smith 
13014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISInitializePackage(const char[]);
142b6de112SBarry Smith 
155c20da3cSBarry Smith /*S
16f22f69f0SBarry Smith      IS - Abstract PETSc object that allows indexing.
175c20da3cSBarry Smith 
185c20da3cSBarry Smith    Level: beginner
195c20da3cSBarry Smith 
205c20da3cSBarry Smith   Concepts: indexing, stride
215c20da3cSBarry Smith 
225c20da3cSBarry Smith .seealso:  ISCreateGeneral(), ISCreateBlock(), ISCreateStride(), ISGetIndices(), ISDestroy()
235c20da3cSBarry Smith S*/
24f09e8eb9SSatish Balay typedef struct _p_IS* IS;
252eac72dbSBarry Smith 
2676bdecfbSBarry Smith /*J
2727bdab1eSBarry Smith     ISType - String with the name of a PETSc vector or the creation function
2827bdab1eSBarry Smith        with an optional dynamic library name, for example
2927bdab1eSBarry Smith        http://www.mcs.anl.gov/petsc/lib.a:myveccreate()
3027bdab1eSBarry Smith 
3127bdab1eSBarry Smith    Level: beginner
3227bdab1eSBarry Smith 
3327bdab1eSBarry Smith .seealso: ISSetType(), IS
3476bdecfbSBarry Smith J*/
3519fd82e9SBarry Smith typedef const char* ISType;
3627bdab1eSBarry Smith #define ISGENERAL      "general"
3727bdab1eSBarry Smith #define ISSTRIDE       "stride"
3827bdab1eSBarry Smith #define ISBLOCK        "block"
3927bdab1eSBarry Smith 
4027bdab1eSBarry Smith /* Dynamic creation and loading functions */
41140e18c1SBarry Smith PETSC_EXTERN PetscFunctionList ISList;
42014dd563SJed Brown PETSC_EXTERN PetscBool         ISRegisterAllCalled;
4319fd82e9SBarry Smith PETSC_EXTERN PetscErrorCode ISSetType(IS, ISType);
4419fd82e9SBarry Smith PETSC_EXTERN PetscErrorCode ISGetType(IS, ISType *);
45014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISRegister(const char[],const char[],const char[],PetscErrorCode (*)(IS));
46014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISRegisterAll(const char []);
47014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISRegisterDestroy(void);
48014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISCreate(MPI_Comm,IS*);
4927bdab1eSBarry Smith 
5027bdab1eSBarry Smith /*MC
51f2ba6396SBarry Smith   ISRegisterDynamic - Adds a new index set implementation
5227bdab1eSBarry Smith 
5327bdab1eSBarry Smith   Synopsis:
54f2ba6396SBarry Smith   #include "petscis.h"
5527bdab1eSBarry Smith   PetscErrorCode ISRegisterDynamic(const char *name, const char *path, const char *func_name, PetscErrorCode (*create_func)(IS))
5627bdab1eSBarry Smith 
5727bdab1eSBarry Smith   Not Collective
5827bdab1eSBarry Smith 
5927bdab1eSBarry Smith   Input Parameters:
6027bdab1eSBarry Smith + name        - The name of a new user-defined creation routine
6127bdab1eSBarry Smith . path        - The path (either absolute or relative) of the library containing this routine
6227bdab1eSBarry Smith . func_name   - The name of routine to create method context
6327bdab1eSBarry Smith - create_func - The creation routine itself
6427bdab1eSBarry Smith 
6527bdab1eSBarry Smith   Notes:
6627bdab1eSBarry Smith   ISRegisterDynamic() may be called multiple times to add several user-defined vectors
6727bdab1eSBarry Smith 
6827bdab1eSBarry Smith   If dynamic libraries are used, then the fourth input argument (routine_create) is ignored.
6927bdab1eSBarry Smith 
7027bdab1eSBarry Smith   Sample usage:
7127bdab1eSBarry Smith .vb
72bb7a0047SJed Brown     ISRegisterDynamic("my_is_name","/home/username/my_lib/lib/libO/solaris/libmy.a", "MyISCreate", MyISCreate);
7327bdab1eSBarry Smith .ve
7427bdab1eSBarry Smith 
7527bdab1eSBarry Smith   Then, your vector type can be chosen with the procedural interface via
7627bdab1eSBarry Smith .vb
7727bdab1eSBarry Smith     ISCreate(MPI_Comm, IS *);
78bb7a0047SJed Brown     ISSetType(IS,"my_is_name");
7927bdab1eSBarry Smith .ve
8027bdab1eSBarry Smith    or at runtime via the option
8127bdab1eSBarry Smith .vb
82bb7a0047SJed Brown     -is_type my_is_name
8327bdab1eSBarry Smith .ve
8427bdab1eSBarry Smith 
8527bdab1eSBarry Smith   Notes: $PETSC_ARCH occuring in pathname will be replaced with appropriate values.
8627bdab1eSBarry Smith          If your function is not being put into a shared library then use ISRegister() instead
8727bdab1eSBarry Smith 
88bb7a0047SJed Brown   This is no ISSetFromOptions() and the current implementations do not have a way to dynamically determine type, so
89bb7a0047SJed Brown   dynamic registration of custom IS types will be of limited use to users.
90bb7a0047SJed Brown 
91bb7a0047SJed Brown   Level: developer
9227bdab1eSBarry Smith 
9327bdab1eSBarry Smith .keywords: IS, register
9427bdab1eSBarry Smith .seealso: ISRegisterAll(), ISRegisterDestroy(), ISRegister()
9527bdab1eSBarry Smith M*/
9627bdab1eSBarry Smith #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
9727bdab1eSBarry Smith #define ISRegisterDynamic(a,b,c,d) ISRegister(a,b,c,0)
9827bdab1eSBarry Smith #else
9927bdab1eSBarry Smith #define ISRegisterDynamic(a,b,c,d) ISRegister(a,b,c,d)
10027bdab1eSBarry Smith #endif
10127bdab1eSBarry Smith 
102639f9d9dSBarry Smith /*
103639f9d9dSBarry Smith     Default index set data structures that PETSc provides.
104639f9d9dSBarry Smith */
105014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISCreateGeneral(MPI_Comm,PetscInt,const PetscInt[],PetscCopyMode,IS *);
106014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISGeneralSetIndices(IS,PetscInt,const PetscInt[],PetscCopyMode);
107014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISCreateBlock(MPI_Comm,PetscInt,PetscInt,const PetscInt[],PetscCopyMode,IS *);
108014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISBlockSetIndices(IS,PetscInt,PetscInt,const PetscInt[],PetscCopyMode);
109014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISCreateStride(MPI_Comm,PetscInt,PetscInt,PetscInt,IS *);
110014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISStrideSetStride(IS,PetscInt,PetscInt,PetscInt);
1114b0e389bSBarry Smith 
112014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISDestroy(IS*);
113014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISSetPermutation(IS);
114014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISPermutation(IS,PetscBool *);
115014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISSetIdentity(IS);
116014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISIdentity(IS,PetscBool *);
117014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISContiguousLocal(IS,PetscInt,PetscInt,PetscInt*,PetscBool*);
11808480c60SBarry Smith 
119014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISGetIndices(IS,const PetscInt *[]);
120014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISRestoreIndices(IS,const PetscInt *[]);
121014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISGetTotalIndices(IS,const PetscInt *[]);
122014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISRestoreTotalIndices(IS,const PetscInt *[]);
123014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISGetNonlocalIndices(IS,const PetscInt *[]);
124014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISRestoreNonlocalIndices(IS,const PetscInt *[]);
125014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISGetNonlocalIS(IS, IS *is);
126014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISRestoreNonlocalIS(IS, IS *is);
127014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISGetSize(IS,PetscInt *);
128014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISGetLocalSize(IS,PetscInt *);
129014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISInvertPermutation(IS,PetscInt,IS*);
130014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISView(IS,PetscViewer);
131014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISEqual(IS,IS,PetscBool  *);
132014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISSort(IS);
133014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISSorted(IS,PetscBool  *);
134014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISDifference(IS,IS,IS*);
135014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISSum(IS,IS,IS*);
136014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISExpand(IS,IS,IS*);
137612dd529SBarry Smith 
138014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISBlockGetIndices(IS,const PetscInt *[]);
139014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISBlockRestoreIndices(IS,const PetscInt *[]);
140014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISBlockGetLocalSize(IS,PetscInt *);
141014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISBlockGetSize(IS,PetscInt *);
142014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISGetBlockSize(IS,PetscInt*);
143014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISSetBlockSize(IS,PetscInt);
144c16cb8f2SBarry Smith 
145014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISStrideGetInfo(IS,PetscInt *,PetscInt*);
146c16cb8f2SBarry Smith 
147014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISToGeneral(IS);
14838f40f24SLois Curfman McInnes 
149014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISDuplicate(IS,IS*);
150014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISCopy(IS,IS);
151014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISAllGather(IS,IS*);
152014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISComplement(IS,PetscInt,PetscInt,IS*);
153014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISConcatenate(MPI_Comm,PetscInt,const IS[],IS*);
154*bb74729cSDmitry Karpeev PETSC_EXTERN PetscErrorCode ISListToPair(MPI_Comm,PetscInt, IS[],IS*,IS*);
155*bb74729cSDmitry Karpeev PETSC_EXTERN PetscErrorCode ISPairToList(IS,IS,PetscInt*, IS *[]);
156*bb74729cSDmitry Karpeev PETSC_EXTERN PetscErrorCode ISEmbed(IS,IS,PetscBool,IS*);
157014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISOnComm(IS,MPI_Comm,PetscCopyMode,IS*);
158d64ed03dSBarry Smith 
15956cd22aeSBarry Smith /* --------------------------------------------------------------------------*/
160014dd563SJed Brown PETSC_EXTERN PetscClassId IS_LTOGM_CLASSID;
16156cd22aeSBarry Smith 
1625c20da3cSBarry Smith /*S
163d9ffb7b8SBarry Smith    ISLocalToGlobalMapping - mappings from an arbitrary
16490f02eecSBarry Smith       local ordering from 0 to n-1 to a global PETSc ordering
165d4bb536fSBarry Smith       used by a vector or matrix.
166d4bb536fSBarry Smith 
1675c20da3cSBarry Smith    Level: intermediate
1685c20da3cSBarry Smith 
169d4bb536fSBarry Smith    Note: mapping from Local to Global is scalable; but Global
170eec0b4cfSBarry Smith   to Local may not be if the range of global values represented locally
171d4bb536fSBarry Smith   is very large.
17274637425SBarry Smith 
17374637425SBarry Smith    Note: the ISLocalToGlobalMapping is actually a private object; it is included
174992144d0SBarry Smith   here for the inline function ISLocalToGlobalMappingApply() to allow it to be inlined since
17574637425SBarry Smith   it is used so often.
17674637425SBarry Smith 
1775c20da3cSBarry Smith .seealso:  ISLocalToGlobalMappingCreate()
1785c20da3cSBarry Smith S*/
17974637425SBarry Smith struct _p_ISLocalToGlobalMapping{
180011f5a45SSatish Balay   PETSCHEADER(int);
18132dcc486SBarry Smith   PetscInt n;                  /* number of local indices */
18232dcc486SBarry Smith   PetscInt *indices;           /* global index of each local index */
18332dcc486SBarry Smith   PetscInt globalstart;        /* first global referenced in indices */
18432dcc486SBarry Smith   PetscInt globalend;          /* last + 1 global referenced in indices */
18532dcc486SBarry Smith   PetscInt *globals;           /* local index for each global index between start and end */
18674637425SBarry Smith };
187f09e8eb9SSatish Balay typedef struct _p_ISLocalToGlobalMapping* ISLocalToGlobalMapping;
1885c20da3cSBarry Smith 
1895c20da3cSBarry Smith /*E
1905c20da3cSBarry Smith     ISGlobalToLocalMappingType - Indicates if missing global indices are
1915c20da3cSBarry Smith 
1925c20da3cSBarry Smith    IS_GTOLM_MASK - missing global indices are replaced with -1
1935c20da3cSBarry Smith    IS_GTOLM_DROP - missing global indices are dropped
1945c20da3cSBarry Smith 
1955c20da3cSBarry Smith    Level: beginner
1965c20da3cSBarry Smith 
1975c20da3cSBarry Smith .seealso: ISGlobalToLocalMappingApply()
1985c20da3cSBarry Smith 
1995c20da3cSBarry Smith E*/
200987e4450SSatish Balay typedef enum {IS_GTOLM_MASK,IS_GTOLM_DROP} ISGlobalToLocalMappingType;
20190f02eecSBarry Smith 
202014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingCreate(MPI_Comm,PetscInt,const PetscInt[],PetscCopyMode,ISLocalToGlobalMapping*);
203014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingCreateIS(IS,ISLocalToGlobalMapping *);
204014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingCreateSF(PetscSF,PetscInt,ISLocalToGlobalMapping*);
205014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingView(ISLocalToGlobalMapping,PetscViewer);
206014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingDestroy(ISLocalToGlobalMapping*);
207014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingApplyIS(ISLocalToGlobalMapping,IS,IS*);
208014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISGlobalToLocalMappingApply(ISLocalToGlobalMapping,ISGlobalToLocalMappingType,PetscInt,const PetscInt[],PetscInt*,PetscInt[]);
209014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingGetSize(ISLocalToGlobalMapping,PetscInt*);
210014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingGetInfo(ISLocalToGlobalMapping,PetscInt*,PetscInt*[],PetscInt*[],PetscInt**[]);
211014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingRestoreInfo(ISLocalToGlobalMapping,PetscInt*,PetscInt*[],PetscInt*[],PetscInt**[]);
212014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingGetIndices(ISLocalToGlobalMapping,const PetscInt**);
213014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingRestoreIndices(ISLocalToGlobalMapping,const PetscInt**);
214014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingBlock(ISLocalToGlobalMapping,PetscInt,ISLocalToGlobalMapping*);
215014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingUnBlock(ISLocalToGlobalMapping,PetscInt,ISLocalToGlobalMapping*);
216014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISLocalToGlobalMappingConcatenate(MPI_Comm,PetscInt,const ISLocalToGlobalMapping[],ISLocalToGlobalMapping*);
21774637425SBarry Smith 
218fcfd50ebSBarry Smith #undef __FUNCT__
219fcfd50ebSBarry Smith #define __FUNCT__ "ISLocalToGlobalMappingApply"
220d0f46423SBarry Smith PETSC_STATIC_INLINE PetscErrorCode ISLocalToGlobalMappingApply(ISLocalToGlobalMapping mapping,PetscInt N,const PetscInt in[],PetscInt out[])
221d0f46423SBarry Smith {
22253ef36baSBarry Smith   PetscInt       i,Nmax = mapping->n;
22353ef36baSBarry Smith   const PetscInt *idx = mapping->indices;
224639ff905SBarry Smith 
225b7827b44SJed Brown   PetscFunctionBegin;
2261620fd73SBarry Smith   for (i=0; i<N; i++) {
227639ff905SBarry Smith     if (in[i] < 0) {
228639ff905SBarry Smith       out[i] = in[i];
229639ff905SBarry Smith       continue;
230639ff905SBarry Smith     }
231e32f2f54SBarry Smith     if (in[i] >= Nmax) SETERRQ3(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"Local index %D too large %D (max) at %D",in[i],Nmax,i);
2321620fd73SBarry Smith     out[i] = idx[in[i]];
2331620fd73SBarry Smith   }
2341620fd73SBarry Smith   PetscFunctionReturn(0);
23574637425SBarry Smith }
23690f02eecSBarry Smith 
23756cd22aeSBarry Smith /* --------------------------------------------------------------------------*/
238b9617806SBarry Smith /*E
239b9617806SBarry Smith     ISColoringType - determines if the coloring is for the entire parallel grid/graph/matrix
240b9617806SBarry Smith                      or for just the local ghosted portion
241b9617806SBarry Smith 
242b9617806SBarry Smith     Level: beginner
243b9617806SBarry Smith 
2448ee2e534SBarry Smith $   IS_COLORING_GLOBAL - does not include the colors for ghost points, this is used when the function
2458ee2e534SBarry Smith $                        is called synchronously in parallel. This requires generating a "parallel coloring".
2468ee2e534SBarry Smith $   IS_COLORING_GHOSTED - includes colors for ghost points, this is used when the function can be called
2478ee2e534SBarry Smith $                         seperately on individual processes with the ghost points already filled in. Does not
2488ee2e534SBarry Smith $                         require a "parallel coloring", rather each process colors its local + ghost part.
2498ee2e534SBarry Smith $                         Using this can result in much less parallel communication. In the paradigm of
2509a42bb27SBarry Smith $                         DMGetLocalVector() and DMGetGlobalVector() this could be called IS_COLORING_LOCAL
25173d7d85fSBarry Smith 
252e727c939SJed Brown .seealso: DMCreateColoring()
253b9617806SBarry Smith E*/
2548ee2e534SBarry Smith typedef enum {IS_COLORING_GLOBAL,IS_COLORING_GHOSTED} ISColoringType;
2556a6fc655SJed Brown PETSC_EXTERN const char *const ISColoringTypes[];
2566c09f170SSatish Balay typedef unsigned PETSC_IS_COLOR_VALUE_TYPE ISColoringValue;
257014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISAllGatherColors(MPI_Comm,PetscInt,ISColoringValue*,PetscInt*,ISColoringValue*[]);
258dde82324SBarry Smith 
2595c20da3cSBarry Smith /*S
260dde82324SBarry Smith      ISColoring - sets of IS's that define a coloring
261639f9d9dSBarry Smith               of the underlying indices
2625c20da3cSBarry Smith 
2635c20da3cSBarry Smith    Level: intermediate
2645c20da3cSBarry Smith 
2655c20da3cSBarry Smith     Notes:
266b9617806SBarry Smith         One should not access the *is records below directly because they may not yet
2675c20da3cSBarry Smith     have been created. One should use ISColoringGetIS() to make sure they are
2685c20da3cSBarry Smith     created when needed.
2695c20da3cSBarry Smith 
270a5057860SBarry Smith     Developer Note: this is not a PetscObject
271a5057860SBarry Smith 
2725c20da3cSBarry Smith .seealso:  ISColoringCreate(), ISColoringGetIS(), ISColoringView(), ISColoringGetIS()
2735c20da3cSBarry Smith S*/
27495fbd943SSatish Balay struct _n_ISColoring {
275a7cc72afSBarry Smith   PetscInt        refct;
276a7cc72afSBarry Smith   PetscInt        n;                /* number of colors */
2775c20da3cSBarry Smith   IS              *is;              /* for each color indicates columns */
278639f9d9dSBarry Smith   MPI_Comm        comm;
27908b6dcc0SBarry Smith   ISColoringValue *colors;          /* for each column indicates color */
28032dcc486SBarry Smith   PetscInt        N;                /* number of columns */
281b9617806SBarry Smith   ISColoringType  ctype;
282639f9d9dSBarry Smith };
28395fbd943SSatish Balay typedef struct _n_ISColoring* ISColoring;
284639f9d9dSBarry Smith 
285014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISColoringCreate(MPI_Comm,PetscInt,PetscInt,const ISColoringValue[],ISColoring*);
286014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISColoringDestroy(ISColoring*);
287014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISColoringView(ISColoring,PetscViewer);
288014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISColoringGetIS(ISColoring,PetscInt*,IS*[]);
289014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISColoringRestoreIS(ISColoring,IS*[]);
29049b734d2SBarry Smith PETSC_EXTERN PetscErrorCode ISColoringReference(ISColoring);
29149b734d2SBarry Smith PETSC_EXTERN PetscErrorCode ISColoringSetType(ISColoring,ISColoringType);
29249b734d2SBarry Smith 
2933a7fca6bSBarry Smith 
294dbef8a1cSBarry Smith /* --------------------------------------------------------------------------*/
295dbef8a1cSBarry Smith 
296014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISPartitioningToNumbering(IS,IS*);
297014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISPartitioningCount(IS,PetscInt,PetscInt[]);
298dbef8a1cSBarry Smith 
299014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISCompressIndicesGeneral(PetscInt,PetscInt,PetscInt,PetscInt,const IS[],IS[]);
300014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISCompressIndicesSorted(PetscInt,PetscInt,PetscInt,const IS[],IS[]);
301014dd563SJed Brown PETSC_EXTERN PetscErrorCode ISExpandIndicesGeneral(PetscInt,PetscInt,PetscInt,PetscInt,const IS[],IS[]);
302d9489beaSHong Zhang 
3039e03d832SJed Brown 
3049e03d832SJed Brown /* Reset __FUNCT__ in case the user does not define it themselves */
3059e03d832SJed Brown #undef __FUNCT__
3069e03d832SJed Brown #define __FUNCT__ "User provided function"
3079e03d832SJed Brown 
308a2ce50c7SBarry Smith #endif
309