1 /* $Id: ao.h,v 1.7 1997/10/01 22:47:58 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 39 extern int AODataAddKey(AOData,char*,int,int,int); 40 41 extern int AODataAddSegment(AOData,char*,char *,int, int, int *,void *,PetscDataType); 42 extern int AODataAddSegmentIS(AOData,char*,char *,int, IS,void *,PetscDataType); 43 44 extern int AODataGetInfoKey(AOData,char *,int *,int*,int *); 45 extern int AODataGetInfoKeyOwnership(AOData,char *,int *,int*); 46 extern int AODataGetInfoSegment(AOData,char *,char *,int *,int *,int*,PetscDataType*); 47 48 extern int AODataGetSegment(AOData,char *,char *,int,int*,void **); 49 extern int AODataRestoreSegment(AOData,char *,char *,int,int*,void **); 50 extern int AODataGetSegmentIS(AOData,char *,char *,IS,void **); 51 extern int AODataRestoreSegmentIS(AOData,char *,char *,IS,void **); 52 53 extern int AODataView(AOData,Viewer); 54 extern int AODataDestroy(AOData); 55 56 extern int AODataLoadBasic(Viewer,AOData *); 57 58 #endif 59 60 61