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> 63 void CvodeErrorHandler(
int errorCode,
const char* module,
const char*
function,
64 char* message,
void* pData);
74 std::vector<realtype>*
pY;
109 friend class boost::serialization::access;
116 template <
class Archive>
117 void serialize(Archive& archive,
const unsigned int version)
119 archive& boost::serialization::base_object<AbstractIvpOdeSolver>(*this);
122 archive& mLastInternalStepSize;
124 archive& mCheckForRoots;
164 #if CHASTE_SUNDIALS_VERSION >= 30000 166 SUNMatrix mpSundialsDenseMatrix;
168 SUNLinearSolver mpSundialsLinearSolver;
176 void RecordStoppingPoint(
double stopTime,
N_Vector yEnd);
188 std::vector<double>& rInitialY,
189 double startTime,
double maxStep);
194 void FreeCvodeMemory();
205 void CvodeError(
int flag,
const char* msg);
215 CvodeAdaptor(
double relTol = 1e-4,
double absTol = 1e-6);
230 void SetTolerances(
double relTol = 1e-4,
double absTol = 1e-6);
235 double GetRelativeTolerance();
240 double GetAbsoluteTolerance();
245 double GetLastStepSize();
254 void SetForceReset(
bool autoReset);
263 void SetMinimalReset(
bool minimalReset);
290 std::vector<double>& rYValues,
294 double timeSampling);
307 std::vector<double>& rYValues,
317 void CheckForStoppingEvents();
325 void SetMaxSteps(
long int numSteps);
331 long int GetMaxSteps();
337 #endif // _CVODEADAPTOR_HPP_ 338 #endif // CHASTE_CVODE
AbstractOdeSystem * pSystem
N_Vector mLastSolutionState
double mLastInternalStepSize
std::vector< realtype > * pY
#define CHASTE_CLASS_EXPORT(T)
void serialize(Archive &archive, const unsigned int version)
gcov doesn't like this file...