Actual source code: petscconvestimpl.h

  1: #ifndef PETSCCEIMPL_H
  2: #define PETSCCEIMPL_H

  4: #include <petscconvest.h>
  5: #include <petsc/private/petscimpl.h>

  7: typedef struct _PetscConvEstOps *PetscConvEstOps;
  8: struct _PetscConvEstOps {
  9:   PetscErrorCode (*setfromoptions)(PetscConvEst);
 10:   PetscErrorCode (*setup)(PetscConvEst);
 11:   PetscErrorCode (*view)(PetscConvEst, PetscViewer);
 12:   PetscErrorCode (*destroy)(PetscConvEst);
 13:   PetscErrorCode (*setsolver)(PetscConvEst, PetscObject);
 14:   PetscErrorCode (*initguess)(PetscConvEst, PetscInt, DM, Vec);
 15:   PetscErrorCode (*computeerror)(PetscConvEst, PetscInt, DM, Vec, PetscReal[]);
 16:   PetscErrorCode (*getconvrate)(PetscConvEst, PetscReal[]);
 17: };

 19: struct _p_PetscConvEst {
 20:   PETSCHEADER(struct _PetscConvEstOps);
 21:   /* Inputs */
 22:   DM          idm;      /* Initial grid */
 23:   PetscObject solver;   /* Solver */
 24:   PetscReal   r;        /* The refinement factor (spatial check requires r = 2) */
 25:   PetscInt    Nr;       /* The number of refinements */
 26:   PetscInt    Nf;       /* The number of fields in the DM */
 27:   PetscBool   noRefine; /* Debugging flag to disable refinement */
 28:   PetscErrorCode (**initGuess)(PetscInt, PetscReal, const PetscReal[], PetscInt, PetscScalar[], void *);
 29:   PetscErrorCode (**exactSol)(PetscInt, PetscReal, const PetscReal[], PetscInt, PetscScalar[], void *);
 30:   void **ctxs;
 31:   /* Outputs */
 32:   PetscLogEvent event;
 33:   PetscBool     monitor;
 34:   PetscInt     *dofs;
 35:   PetscReal    *errors;
 36: };

 38: #endif