11447629fSBarry Smith /* 21447629fSBarry Smith This private file should not be included in users' code. 31447629fSBarry Smith */ 41447629fSBarry Smith 51447629fSBarry Smith #if !defined(__AOIMPL) 61447629fSBarry Smith #define __AOIMPL 71447629fSBarry Smith 81447629fSBarry Smith #include <petscao.h> 91447629fSBarry Smith #include <petsc-private/petscimpl.h> 10*665c2dedSJed Brown #include <petscviewer.h> 111447629fSBarry Smith 121447629fSBarry Smith /* 131447629fSBarry Smith Defines the abstract AO operations 141447629fSBarry Smith */ 151447629fSBarry Smith typedef struct _AOOps *AOOps; 161447629fSBarry Smith struct _AOOps { 171447629fSBarry Smith /* Generic Operations */ 181447629fSBarry Smith PetscErrorCode (*view)(AO, PetscViewer); 191447629fSBarry Smith PetscErrorCode (*destroy)(AO); 201447629fSBarry Smith /* AO-Specific Operations */ 211447629fSBarry Smith PetscErrorCode (*petsctoapplication)(AO, PetscInt, PetscInt[]); 221447629fSBarry Smith PetscErrorCode (*applicationtopetsc)(AO, PetscInt, PetscInt[]); 231447629fSBarry Smith PetscErrorCode (*petsctoapplicationpermuteint)(AO, PetscInt, PetscInt[]); 241447629fSBarry Smith PetscErrorCode (*applicationtopetscpermuteint)(AO, PetscInt, PetscInt[]); 251447629fSBarry Smith PetscErrorCode (*petsctoapplicationpermutereal)(AO, PetscInt, PetscReal[]); 261447629fSBarry Smith PetscErrorCode (*applicationtopetscpermutereal)(AO, PetscInt, PetscReal[]); 271447629fSBarry Smith }; 281447629fSBarry Smith 291447629fSBarry Smith struct _p_AO { 301447629fSBarry Smith PETSCHEADER(struct _AOOps); 311447629fSBarry Smith PetscInt N,n; /* global, local ao size */ 321447629fSBarry Smith IS isapp; /* index set that defines an application ordering provided by user */ 331447629fSBarry Smith IS ispetsc; /* index set that defines petsc ordering provided by user */ 341447629fSBarry Smith void *data; /* implementation-specific data */ 351447629fSBarry Smith }; 361447629fSBarry Smith 371447629fSBarry Smith extern PetscLogEvent AO_PetscToApplication, AO_ApplicationToPetsc; 381447629fSBarry Smith 391447629fSBarry Smith 401447629fSBarry Smith #endif 41