1 /* 2 This private file should not be included in users' code. 3 */ 4 5 #ifndef PETSC_AOIMPL_H 6 #define PETSC_AOIMPL_H 7 8 #include <petscao.h> 9 #include <petsc/private/petscimpl.h> 10 #include <petscviewer.h> 11 12 PETSC_INTERN PetscFunctionList AOList; 13 14 /* 15 Defines the abstract AO operations 16 */ 17 typedef struct _AOOps *AOOps; 18 struct _AOOps { 19 /* Generic Operations */ 20 PetscErrorCode (*view)(AO, PetscViewer); 21 PetscErrorCode (*destroy)(AO); 22 /* AO-Specific Operations */ 23 PetscErrorCode (*petsctoapplication)(AO, PetscInt, PetscInt[]); 24 PetscErrorCode (*applicationtopetsc)(AO, PetscInt, PetscInt[]); 25 PetscErrorCode (*petsctoapplicationpermuteint)(AO, PetscInt, PetscInt[]); 26 PetscErrorCode (*applicationtopetscpermuteint)(AO, PetscInt, PetscInt[]); 27 PetscErrorCode (*petsctoapplicationpermutereal)(AO, PetscInt, PetscReal[]); 28 PetscErrorCode (*applicationtopetscpermutereal)(AO, PetscInt, PetscReal[]); 29 }; 30 31 struct _p_AO { 32 PETSCHEADER(struct _AOOps); 33 PetscInt N, n; /* global, local ao size */ 34 IS isapp; /* index set that defines an application ordering provided by user */ 35 IS ispetsc; /* index set that defines petsc ordering provided by user */ 36 void *data; /* implementation-specific data */ 37 }; 38 39 extern PetscLogEvent AO_PetscToApplication, AO_ApplicationToPetsc; 40 41 #endif // PETSC_AOIMPL_H 42