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/ksp/pc/pcimpl.h
 13:  #include src/mat/matimpl.h

 15: /*
 16:    Include files specific for PVODE
 17: */
 18: #if defined(PETSC_HAVE_PVODE) && !defined(PETSC_USE_COMPLEX) && !defined(PETSC_USE_SINGLE)

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

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

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


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

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

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

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

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

 66: #endif

 68: #endif