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