xref: /petsc/include/petscao.h (revision a591b6b46e402c1add0ff48140b824bb2ba2b2fc)
1 /* $Id: ao.h,v 1.5 1997/09/26 02:22:17 bsmith Exp bsmith $ */
2 
3 /*
4    An application ordering is mapping between application-centric
5   ordering (the ordering that is "natural" to the application) and
6   the parallel ordering that PETSc uses.
7 */
8 #if !defined(__AO_PACKAGE)
9 #define __AO_PACKAGE
10 #include "is.h"
11 
12 typedef enum {AO_BASIC=0, AO_ADVANCED=1} AOType;
13 
14 #define AO_COOKIE PETSC_COOKIE+20
15 
16 typedef struct _p_AO* AO;
17 
18 extern int AOCreateBasic(MPI_Comm,int,int*,int*,AO*);
19 extern int AOCreateBasicIS(MPI_Comm,IS,IS,AO*);
20 
21 extern int AOPetscToApplication(AO,int,int*);
22 extern int AOApplicationToPetsc(AO,int,int*);
23 extern int AOPetscToApplicationIS(AO,IS);
24 extern int AOApplicationToPetscIS(AO,IS);
25 
26 extern int AODestroy(AO);
27 extern int AOView(AO,Viewer);
28 
29 /* ----------------------------------------------------*/
30 
31 typedef enum {AODATA_BASIC=0, AODATA_ADVANCED=1} AODataType;
32 
33 #define AODATA_COOKIE PETSC_COOKIE+24
34 
35 typedef struct _p_AOData* AOData;
36 
37 extern int AODataCreateBasic(MPI_Comm,int,AOData *);
38 extern int AODataAdd(AOData,char*,int, int, int *,void *,PetscDataType);
39 extern int AODataAddIS(AOData,char*,int, IS,void *,PetscDataType);
40 extern int AODataGetSize(AOData,char *,int *,int*);
41 extern int AODataGet(AOData,char *,int,int*,void **);
42 extern int AODataRestore(AOData,char *,int,int*,void **);
43 extern int AODataGetIS(AOData,char *,IS,void **);
44 extern int AODataRestoreIS(AOData,char *,IS,void **);
45 extern int AODataView(AOData,Viewer);
46 extern int AODataDestroy(AOData);
47 
48 extern int AODataLoadBasic(Viewer,AOData *);
49 
50 #endif
51 
52 
53