36#ifndef _CVODEADAPTOR_HPP_
37#define _CVODEADAPTOR_HPP_
42#include <boost/serialization/base_object.hpp>
45#include "AbstractIvpOdeSolver.hpp"
46#include "CvodeContextManager.hpp"
47#include "OdeSolution.hpp"
50#include <cvode/cvode.h>
51#include <nvector/nvector_serial.h>
53#include <sunlinsol/sunlinsol_dense.h>
54#include <sunmatrix/sunmatrix_dense.h>
56#if CHASTE_SUNDIALS_VERSION >= 70000
58#define realtype sunrealtype
67#if CHASTE_SUNDIALS_VERSION >= 70000
68void CvodeErrorHandler(
int errorCode,
const char* module,
const char* function,
69 const char* message, SUNErrCode errCode,
void* pData, SUNContext sunContext);
71void CvodeErrorHandler(
int errorCode,
const char* module,
const char* function,
72 char* message,
void* pData);
83 std::vector<realtype>*
pY;
125 template <
class Archive>
126 void serialize(Archive& archive,
const unsigned int version)
128 archive& boost::serialization::base_object<AbstractIvpOdeSolver>(*
this);
140#if CHASTE_SUNDIALS_VERSION >= 60000
145 std::shared_ptr<CvodeContextManager> mpSundialsContextManager;
203 std::vector<double>& rInitialY,
204 double startTime,
double maxStep);
230 CvodeAdaptor(
double relTol = 1e-4,
double absTol = 1e-6);
245 void SetTolerances(
double relTol = 1e-4,
double absTol = 1e-6);
305 std::vector<double>& rYValues,
309 double timeSampling);
322 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
SUNLinearSolver mpSundialsLinearSolver
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()
SUNMatrix mpSundialsDenseMatrix
void SetTolerances(double relTol=1e-4, double absTol=1e-6)
AbstractOdeSystem * pSystem
std::vector< realtype > * pY