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