11447629fSBarry Smith /* 21447629fSBarry Smith This private file should not be included in users' code. 31447629fSBarry Smith */ 41447629fSBarry Smith 5687625d7SJacob Faibussowitsch #ifndef PETSC_AOIMPL_H 6687625d7SJacob 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 12*da8c939bSJacob Faibussowitsch PETSC_INTERN PetscFunctionList AOList; 130f51fdf8SToby Isaac 141447629fSBarry Smith /* 151447629fSBarry Smith Defines the abstract AO operations 161447629fSBarry Smith */ 171447629fSBarry Smith typedef struct _AOOps *AOOps; 181447629fSBarry Smith struct _AOOps { 191447629fSBarry Smith /* Generic Operations */ 201447629fSBarry Smith PetscErrorCode (*view)(AO, PetscViewer); 211447629fSBarry Smith PetscErrorCode (*destroy)(AO); 221447629fSBarry Smith /* AO-Specific Operations */ 231447629fSBarry Smith PetscErrorCode (*petsctoapplication)(AO, PetscInt, PetscInt[]); 241447629fSBarry Smith PetscErrorCode (*applicationtopetsc)(AO, PetscInt, PetscInt[]); 251447629fSBarry Smith PetscErrorCode (*petsctoapplicationpermuteint)(AO, PetscInt, PetscInt[]); 261447629fSBarry Smith PetscErrorCode (*applicationtopetscpermuteint)(AO, PetscInt, PetscInt[]); 271447629fSBarry Smith PetscErrorCode (*petsctoapplicationpermutereal)(AO, PetscInt, PetscReal[]); 281447629fSBarry Smith PetscErrorCode (*applicationtopetscpermutereal)(AO, PetscInt, PetscReal[]); 291447629fSBarry Smith }; 301447629fSBarry Smith 311447629fSBarry Smith struct _p_AO { 321447629fSBarry Smith PETSCHEADER(struct _AOOps); 331447629fSBarry Smith PetscInt N, n; /* global, local ao size */ 341447629fSBarry Smith IS isapp; /* index set that defines an application ordering provided by user */ 351447629fSBarry Smith IS ispetsc; /* index set that defines petsc ordering provided by user */ 361447629fSBarry Smith void *data; /* implementation-specific data */ 371447629fSBarry Smith }; 381447629fSBarry Smith 391447629fSBarry Smith extern PetscLogEvent AO_PetscToApplication, AO_ApplicationToPetsc; 401447629fSBarry Smith 41687625d7SJacob Faibussowitsch #endif // PETSC_AOIMPL_H 42