11447629fSBarry Smith /* 21447629fSBarry Smith This private file should not be included in users' code. 31447629fSBarry Smith */ 41447629fSBarry Smith 5a4963045SJacob Faibussowitsch #pragma once 61447629fSBarry Smith 71447629fSBarry Smith #include <petscao.h> 8af0996ceSBarry Smith #include <petsc/private/petscimpl.h> 9665c2dedSJed Brown #include <petscviewer.h> 101447629fSBarry Smith 11da8c939bSJacob Faibussowitsch PETSC_INTERN PetscFunctionList AOList; 120f51fdf8SToby Isaac 131447629fSBarry Smith /* 141447629fSBarry Smith Defines the abstract AO operations 151447629fSBarry Smith */ 161447629fSBarry Smith typedef struct _AOOps *AOOps; 171447629fSBarry Smith struct _AOOps { 181447629fSBarry Smith /* Generic Operations */ 191447629fSBarry Smith PetscErrorCode (*view)(AO, PetscViewer); 201447629fSBarry Smith PetscErrorCode (*destroy)(AO); 211447629fSBarry Smith /* AO-Specific Operations */ 221447629fSBarry Smith PetscErrorCode (*petsctoapplication)(AO, PetscInt, PetscInt[]); 231447629fSBarry Smith PetscErrorCode (*applicationtopetsc)(AO, PetscInt, PetscInt[]); 241447629fSBarry Smith PetscErrorCode (*petsctoapplicationpermuteint)(AO, PetscInt, PetscInt[]); 251447629fSBarry Smith PetscErrorCode (*applicationtopetscpermuteint)(AO, PetscInt, PetscInt[]); 261447629fSBarry Smith PetscErrorCode (*petsctoapplicationpermutereal)(AO, PetscInt, PetscReal[]); 271447629fSBarry Smith PetscErrorCode (*applicationtopetscpermutereal)(AO, PetscInt, PetscReal[]); 281447629fSBarry Smith }; 291447629fSBarry Smith 301447629fSBarry Smith struct _p_AO { 311447629fSBarry Smith PETSCHEADER(struct _AOOps); 321447629fSBarry Smith PetscInt N, n; /* global, local ao size */ 331447629fSBarry Smith IS isapp; /* index set that defines an application ordering provided by user */ 34*f0b74427SPierre Jolivet IS ispetsc; /* index set that defines PETSc ordering provided by user */ 351447629fSBarry Smith void *data; /* implementation-specific data */ 361447629fSBarry Smith }; 371447629fSBarry Smith 381447629fSBarry Smith extern PetscLogEvent AO_PetscToApplication, AO_ApplicationToPetsc; 39