Actual source code: petscpvode.h

  1: /*$Id: petscpvode.h,v 1.13 2000/05/08 15:09:13 balay Exp $*/

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


 11:  #include src/ts/tsimpl.h
 12:  #include src/sles/pc/pcimpl.h
 13:  #include src/mat/matimpl.h

 15: /*
 16:    Include files specific for PVODE
 17: */
 18: #if defined(PETSC_HAVE_PVODE) && !defined(__cplusplus) 
 19: #include "sundialstypes.h"
 20: #include "cvode.h"
 21: #include "nvector.h"
 22: #include "nvector_parallel.h"
 23: #include "iterativ.h"
 24: #include "cvspgmr.h"


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

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


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

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

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

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

 60:   int      nonlinear_solves,linear_solves; /* since creation of object */
 61: } TS_PVode;

 63: #endif

 65: #endif