Actual source code: sundials.h

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


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

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

 20: #include "cvode.h"               /* prototypes for CVODE fcts. */
 21: #include "nvector_parallel.h"    /* definition N_Vector and macro NV_DATA_P  */
 22: #include "cvode_spgmr.h"         /* prototypes and constants for CVSPGMR solver */
 23: #include "sundials_smalldense.h" /* prototypes for small dense matrix fcts. */
 24: #include "sundials_types.h"      /* definitions of realtype, booleantype */
 25: #include "sundials_math.h"       /* definition of macros SQR and EXP */

 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 */
 32:   Vec        w1,w2;     /* work space vectors for function evaluation */
 33:   PetscTruth exact_final_time; /* force Sundials to interpolate solution to exactly final time
 34:                                    requested by user (default) */
 35:   /* PETSc peconditioner objects used by SUNDIALS */
 36:   Mat  pmat;                         /* preconditioner Jacobian */
 37:   PC   pc;                           /* the PC context */
 38:   int  cvode_type;                   /* the SUNDIALS method, BDF or ADAMS  */
 39:   TSSundialsGramSchmidtType gtype;
 40:   int                       restart;
 41:   double                    linear_tol;

 43:   /* Variables used by Sundials */
 44:   MPI_Comm comm_sundials;
 45:   double   reltol;
 46:   double   abstol;          /* only for using SS flag in SUNDIALS */
 47:   N_Vector y;               /* current solution */
 48:   int      nonlinear_solves,linear_solves; /* since creation of object */
 49: } TS_Sundials;
 50: #endif

 52: #endif