xref: /petsc/src/vec/is/ao/aoimpl.h (revision 0f51fdf84cc2af9c6ef13eed784e698b930e50d2)
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 PETSC_EXTERN PetscBool AORegisterAllCalled;
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 
42 #endif
43