Actual source code: petscpvode.h

  2: /*
  3:     Provides a PETSc interface to PVODE. Alan Hindmarsh's parallel ODE
  4:    solver developed at LLNL.
  5: */


 10:  #include src/ts/tsimpl.h
 11:  #include src/ksp/pc/pcimpl.h
 12:  #include src/mat/matimpl.h

 14: /*
 15:    Include files specific for PVODE
 16: */
 17: #if defined(PETSC_HAVE_PVODE)

 20: #include "sundialstypes.h"
 21: #include "cvode.h"
 22: #include "nvector.h"
 23: #include "nvector_parallel.h"
 24: #include "iterativ.h"
 25: #include "cvspgmr.h"

 28: typedef struct {
 29:   Vec  update;    /* work vector where new solution is formed */
 30:   Vec  func;      /* work vector where F(t[i],u[i]) is stored */
 31:   Vec  rhs;       /* work vector for RHS; vec_sol/dt */

 33:   Vec  w1,w2;     /* work space vectors for function evaluation */


 36:   PetscTruth  exact_final_time; /* force PVode to interpolate solution to exactly final time
 37:                                    requested by user (default) */

 39:   /*
 40:      PETSc peconditioner objects used by PVODE
 41:   */
 42: 
 43:   Mat  pmat;                         /* preconditioner Jacobian */
 44:   PC   pc;                           /* the PC context */
 45:   int  cvode_type;                   /* the PVODE method, BDF  or ADAMS   */
 46:   TSPVodeGramSchmidtType gtype;
 47:   int                    restart;
 48:   double                 linear_tol;

 50:   /*
 51:      Variables used by PVode 
 52:   */

 54:   MPI_Comm comm_pvode;
 55:   long int iopt[OPT_SIZE];
 56:   double   ropt[OPT_SIZE];
 57:   double   reltol;
 58:   double   abstol;          /* only for using SS flag in PVODE */
 59:   N_Vector y;               /* current solution */
 60:   void     *mem;            /* time integrater context */

 62:   int      nonlinear_solves,linear_solves; /* since creation of object */
 63: } TS_PVode;

 65: #endif

 67: #endif