xref: /petsc/src/vec/is/ao/aoimpl.h (revision 687625d7821820b2788de1552f57fee4fc227138)
11447629fSBarry Smith /*
21447629fSBarry Smith    This private file should not be included in users' code.
31447629fSBarry Smith */
41447629fSBarry Smith 
5*687625d7SJacob Faibussowitsch #ifndef PETSC_AOIMPL_H
6*687625d7SJacob Faibussowitsch #define PETSC_AOIMPL_H
71447629fSBarry Smith 
81447629fSBarry Smith #include <petscao.h>
9af0996ceSBarry Smith #include <petsc/private/petscimpl.h>
10665c2dedSJed Brown #include <petscviewer.h>
111447629fSBarry Smith 
120f51fdf8SToby Isaac PETSC_EXTERN PetscBool      AORegisterAllCalled;
1314acc2feSToby Isaac PETSC_EXTERN PetscErrorCode AORegisterAll(void);
140f51fdf8SToby Isaac 
151447629fSBarry Smith /*
161447629fSBarry Smith     Defines the abstract AO operations
171447629fSBarry Smith */
181447629fSBarry Smith typedef struct _AOOps *AOOps;
191447629fSBarry Smith struct _AOOps {
201447629fSBarry Smith   /* Generic Operations */
211447629fSBarry Smith   PetscErrorCode (*view)(AO, PetscViewer);
221447629fSBarry Smith   PetscErrorCode (*destroy)(AO);
231447629fSBarry Smith   /* AO-Specific Operations */
241447629fSBarry Smith   PetscErrorCode (*petsctoapplication)(AO, PetscInt, PetscInt[]);
251447629fSBarry Smith   PetscErrorCode (*applicationtopetsc)(AO, PetscInt, PetscInt[]);
261447629fSBarry Smith   PetscErrorCode (*petsctoapplicationpermuteint)(AO, PetscInt, PetscInt[]);
271447629fSBarry Smith   PetscErrorCode (*applicationtopetscpermuteint)(AO, PetscInt, PetscInt[]);
281447629fSBarry Smith   PetscErrorCode (*petsctoapplicationpermutereal)(AO, PetscInt, PetscReal[]);
291447629fSBarry Smith   PetscErrorCode (*applicationtopetscpermutereal)(AO, PetscInt, PetscReal[]);
301447629fSBarry Smith };
311447629fSBarry Smith 
321447629fSBarry Smith struct _p_AO {
331447629fSBarry Smith   PETSCHEADER(struct _AOOps);
341447629fSBarry Smith   PetscInt N, n;    /* global, local ao size */
351447629fSBarry Smith   IS       isapp;   /* index set that defines an application ordering provided by user */
361447629fSBarry Smith   IS       ispetsc; /* index set that defines petsc ordering provided by user */
371447629fSBarry Smith   void    *data;    /* implementation-specific data */
381447629fSBarry Smith };
391447629fSBarry Smith 
401447629fSBarry Smith extern PetscLogEvent AO_PetscToApplication, AO_ApplicationToPetsc;
411447629fSBarry Smith 
42*687625d7SJacob Faibussowitsch #endif // PETSC_AOIMPL_H
43