37#ifndef _CVODEADAPTOR_HPP_
38#define _CVODEADAPTOR_HPP_
42#include <boost/serialization/base_object.hpp>
45#include "AbstractIvpOdeSolver.hpp"
46#include "OdeSolution.hpp"
49#include <cvode/cvode.h>
50#include <nvector/nvector_serial.h>
52#if CHASTE_SUNDIALS_VERSION >= 30000
53#include <sunlinsol/sunlinsol_dense.h>
54#include <sunmatrix/sunmatrix_dense.h>
63void CvodeErrorHandler(
int errorCode,
const char* module,
const char* function,
64 char* message,
void* pData);
74 std::vector<realtype>*
pY;
116 template <
class Archive>
117 void serialize(Archive& archive,
const unsigned int version)
119 archive& boost::serialization::base_object<AbstractIvpOdeSolver>(*
this);
164#if CHASTE_SUNDIALS_VERSION >= 30000
166 SUNMatrix mpSundialsDenseMatrix;
168 SUNLinearSolver mpSundialsLinearSolver;
188 std::vector<double>& rInitialY,
189 double startTime,
double maxStep);
215 CvodeAdaptor(
double relTol = 1e-4,
double absTol = 1e-6);
230 void SetTolerances(
double relTol = 1e-4,
double absTol = 1e-6);
290 std::vector<double>& rYValues,
294 double timeSampling);
307 std::vector<double>& rYValues,
gcov doesn't like this file...
#define CHASTE_CLASS_EXPORT(T)
double GetAbsoluteTolerance()
void CvodeError(int flag, const char *msg)
void SetMinimalReset(bool minimalReset)
void serialize(Archive &archive, const unsigned int version)
N_Vector mLastSolutionState
void SetMaxSteps(long int numSteps)
void SetForceReset(bool autoReset)
void CheckForStoppingEvents()
OdeSolution Solve(AbstractOdeSystem *pOdeSystem, std::vector< double > &rYValues, double startTime, double endTime, double maxStep, double timeSampling)
double mLastInternalStepSize
friend class boost::serialization::access
void RecordStoppingPoint(double stopTime, N_Vector yEnd)
void SetupCvode(AbstractOdeSystem *pOdeSystem, std::vector< double > &rInitialY, double startTime, double maxStep)
double GetRelativeTolerance()
void SetTolerances(double relTol=1e-4, double absTol=1e-6)
AbstractOdeSystem * pSystem
std::vector< realtype > * pY