1 /* $Id: ao.h,v 1.10 1997/10/20 16:59:05 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 #include "mat.h" 12 13 typedef enum {AO_BASIC=0, AO_ADVANCED=1} AOType; 14 15 #define AO_COOKIE PETSC_COOKIE+20 16 17 typedef struct _p_AO* AO; 18 19 extern int AOCreateBasic(MPI_Comm,int,int*,int*,AO*); 20 extern int AOCreateBasicIS(IS,IS,AO*); 21 22 extern int AOPetscToApplication(AO,int,int*); 23 extern int AOApplicationToPetsc(AO,int,int*); 24 extern int AOPetscToApplicationIS(AO,IS); 25 extern int AOApplicationToPetscIS(AO,IS); 26 27 extern int AODestroy(AO); 28 extern int AOView(AO,Viewer); 29 30 /* ----------------------------------------------------*/ 31 32 typedef enum {AODATA_BASIC=0, AODATA_ADVANCED=1} AODataType; 33 34 #define AODATA_COOKIE PETSC_COOKIE+24 35 36 typedef struct _p_AOData* AOData; 37 38 extern int AODataCreateBasic(MPI_Comm,int,AOData *); 39 40 extern int AODataKeyAdd(AOData,char*,int,int,int); 41 extern int AODataKeyAddLocalToGlobalMapping(AOData,char*,ISLocalToGlobalMapping); 42 extern int AODataKeyRemap(AOData,char *,AO); 43 44 extern int AODataSegmentAdd(AOData,char*,char *,int, int, int *,void *,PetscDataType); 45 extern int AODataSegmentAddIS(AOData,char*,char *,int, IS,void *,PetscDataType); 46 47 extern int AODataKeyGetInfo(AOData,char *,int *,int*,int *); 48 extern int AODataKeyGetInfoOwnership(AOData,char *,int *,int*); 49 extern int AODataSegmentGetInfo(AOData,char *,char *,int *,int *,int*,PetscDataType*); 50 51 extern int AODataSegmentGet(AOData,char *,char *,int,int*,void **); 52 extern int AODataSegmentRestore(AOData,char *,char *,int,int*,void **); 53 extern int AODataSegmentGetIS(AOData,char *,char *,IS,void **); 54 extern int AODataSegmentRestoreIS(AOData,char *,char *,IS,void **); 55 56 extern int AODataSegmentGetLocal(AOData,char *,char *,int,int*,void **); 57 extern int AODataSegmentRestoreLocal(AOData,char *,char *,int,int*,void **); 58 extern int AODataSegmentGetLocalIS(AOData,char *,char *,IS,void **); 59 extern int AODataSegmentRestoreLocalIS(AOData,char *,char *,IS,void **); 60 61 extern int AODataSegmentGetReduced(AOData,char *,char *,int,int*,IS *); 62 extern int AODataSegmentGetReducedIS(AOData,char *,char *,IS,IS *); 63 64 extern int AODataKeyGetNeighbors(AOData,char *,int,int*,IS *); 65 extern int AODataKeyGetNeighborsIS(AOData,char *,IS,IS *); 66 extern int AODataKeyGetAdjacency(AOData,char *,Mat*); 67 68 extern int AODataView(AOData,Viewer); 69 extern int AODataDestroy(AOData); 70 71 extern int AODataLoadBasic(Viewer,AOData *); 72 73 #endif 74 75 76