xref: /petsc/src/vec/is/ao/aoimpl.h (revision 82c86c8f8a181c1295b98e018a5a0771744eccf1)
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 
11 /*
12     Defines the abstract AO operations
13 */
14 typedef struct _AOOps *AOOps;
15 struct _AOOps {
16   /* Generic Operations */
17   PetscErrorCode (*view)(AO, PetscViewer);
18   PetscErrorCode (*destroy)(AO);
19   /* AO-Specific Operations */
20   PetscErrorCode (*petsctoapplication)(AO, PetscInt, PetscInt[]);
21   PetscErrorCode (*applicationtopetsc)(AO, PetscInt, PetscInt[]);
22   PetscErrorCode (*petsctoapplicationpermuteint)(AO, PetscInt, PetscInt[]);
23   PetscErrorCode (*applicationtopetscpermuteint)(AO, PetscInt, PetscInt[]);
24   PetscErrorCode (*petsctoapplicationpermutereal)(AO, PetscInt, PetscReal[]);
25   PetscErrorCode (*applicationtopetscpermutereal)(AO, PetscInt, PetscReal[]);
26 };
27 
28 struct _p_AO {
29   PETSCHEADER(struct _AOOps);
30   PetscInt N,n;                  /* global, local ao size */
31   IS       isapp;                /* index set that defines an application ordering provided by user */
32   IS       ispetsc;              /* index set that defines petsc ordering provided by user */
33   void     *data;                /* implementation-specific data */
34 };
35 
36 extern PetscLogEvent AO_PetscToApplication, AO_ApplicationToPetsc;
37 
38 
39 #endif
40