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();
106 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
110 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
123 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
133 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
136 return static_cast<bool>(mpOdeSolver.get());
139 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
142 mpOdeSolver.reset(
new ODE_SOLVER);
147 if (boost::dynamic_pointer_cast<CvodeAdaptor>(mpOdeSolver))
149 (boost::static_pointer_cast<
CvodeAdaptor>(mpOdeSolver))->SetForceReset(
true);
151 #endif //CHASTE_CVODE
154 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
160 template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
170 template<
class CELL_CYCLE_MODEL>
175 static boost::shared_ptr<CellCycleModelOdeSolver<CELL_CYCLE_MODEL, BackwardEulerIvpOdeSolver> >
mpInstance;
181 friend class boost::serialization::access;
188 template<
class Archive>
189 void serialize(Archive & archive,
const unsigned int version)
191 archive & boost::serialization::base_object<AbstractCellCycleModelOdeSolver>(*this);
197 static boost::shared_ptr<CellCycleModelOdeSolver<CELL_CYCLE_MODEL, BackwardEulerIvpOdeSolver> >
Instance();
209 template<
class CELL_CYCLE_MODEL>
212 template<
class CELL_CYCLE_MODEL>
218 template<
class CELL_CYCLE_MODEL>
228 template<
class CELL_CYCLE_MODEL>
234 template<
class CELL_CYCLE_MODEL>
239 EXCEPTION(
"SetSizeOfOdeSystem() must be called before calling Initialise()");
244 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