Date: 2025-03-28T21:11:20+00:00

Actual source code: aoimpl.h

      1: /*
      2:    This private file should not be included in users' code.
      3: */

      5: #pragma once

      7: #include <petscao.h>
      8: #include <petsc/private/petscimpl.h>
      9: #include <petscviewer.h>

     11: PETSC_INTERN PetscFunctionList AOList;

     13: /*
     14:     Defines the abstract AO operations
     15: */
     16: typedef struct _AOOps *AOOps;
     17: struct _AOOps {
     18:   /* Generic Operations */
     19:   PetscErrorCode (*view)(AO, PetscViewer);
     20:   PetscErrorCode (*destroy)(AO);
     21:   /* AO-Specific Operations */
     22:   PetscErrorCode (*petsctoapplication)(AO, PetscInt, PetscInt[]);
     23:   PetscErrorCode (*applicationtopetsc)(AO, PetscInt, PetscInt[]);
     24:   PetscErrorCode (*petsctoapplicationpermuteint)(AO, PetscInt, PetscInt[]);
     25:   PetscErrorCode (*applicationtopetscpermuteint)(AO, PetscInt, PetscInt[]);
     26:   PetscErrorCode (*petsctoapplicationpermutereal)(AO, PetscInt, PetscReal[]);
     27:   PetscErrorCode (*applicationtopetscpermutereal)(AO, PetscInt, PetscReal[]);
     28: };

     30: struct _p_AO {
     31:   PETSCHEADER(struct _AOOps);
     32:   PetscInt N, n;    /* global, local ao size */
     33:   IS       isapp;   /* index set that defines an application ordering provided by user */
     34:   IS       ispetsc; /* index set that defines petsc ordering provided by user */
     35:   void    *data;    /* implementation-specific data */
     36: };

     38: extern PetscLogEvent AO_PetscToApplication, AO_ApplicationToPetsc;