36 #ifndef CELLCYCLEMODELODESOLVER_HPP_
37 #define CELLCYCLEMODELODESOLVER_HPP_
39 #include <boost/utility.hpp>
43 #include "AbstractCellCycleModelOdeSolver.hpp"
44 #include "BackwardEulerIvpOdeSolver.hpp"
45 #include "CvodeAdaptor.hpp"
57 template <
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
62 static boost::shared_ptr<CellCycleModelOdeSolver<CELL_CYCLE_MODEL, ODE_SOLVER> >
mpInstance;
75 template<
class Archive>
76 void serialize(Archive & archive,
const unsigned int version)
78 archive & boost::serialization::base_object<AbstractCellCycleModelOdeSolver>(*this);
84 static boost::shared_ptr<CellCycleModelOdeSolver<CELL_CYCLE_MODEL, ODE_SOLVER> >
Instance();
103 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
107 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
120 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
130 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
136 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
139 mpOdeSolver.reset(
new ODE_SOLVER);
144 if (boost::dynamic_pointer_cast<CvodeAdaptor>(mpOdeSolver))
146 (boost::static_pointer_cast<
CvodeAdaptor>(mpOdeSolver))->SetForceReset(
true);
148 #endif //CHASTE_CVODE
151 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
162 template<
class CELL_CYCLE_MODEL>
167 static boost::shared_ptr<CellCycleModelOdeSolver<CELL_CYCLE_MODEL, BackwardEulerIvpOdeSolver> >
mpInstance;
173 friend class boost::serialization::access;
180 template<
class Archive>
181 void serialize(Archive & archive,
const unsigned int version)
183 archive & boost::serialization::base_object<AbstractCellCycleModelOdeSolver>(*this);
189 static boost::shared_ptr<CellCycleModelOdeSolver<CELL_CYCLE_MODEL, BackwardEulerIvpOdeSolver> >
Instance();
201 template<
class CELL_CYCLE_MODEL>
204 template<
class CELL_CYCLE_MODEL>
210 template<
class CELL_CYCLE_MODEL>
220 template<
class CELL_CYCLE_MODEL>
226 template<
class CELL_CYCLE_MODEL>
231 EXCEPTION(
"SetSizeOfOdeSystem() must be called before calling Initialise()");
236 template<
class CELL_CYCLE_MODEL>
friend class boost::serialization::access
virtual bool IsAdaptive()
virtual bool IsAdaptive()
void serialize(Archive &archive, const unsigned int version)
#define EXCEPTION(message)
CellCycleModelOdeSolver()
static boost::shared_ptr< CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER > > mpInstance
static boost::shared_ptr< CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER > > Instance()
const unsigned UNSIGNED_UNSET
void serialize(Archive &archive, const unsigned int version)
unsigned mSizeOfOdeSystem
static boost::shared_ptr< CellCycleModelOdeSolver< CELL_CYCLE_MODEL, BackwardEulerIvpOdeSolver > > mpInstance
boost::shared_ptr< AbstractIvpOdeSolver > mpOdeSolver