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"
57template <
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();
106template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
110template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
123template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
133template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
136 return static_cast<bool>(mpOdeSolver.get());
139template<
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);
154template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
160template<
class CELL_CYCLE_MODEL,
class ODE_SOLVER>
170template<
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();
209template<
class CELL_CYCLE_MODEL>
212template<
class CELL_CYCLE_MODEL>
218template<
class CELL_CYCLE_MODEL>
228template<
class CELL_CYCLE_MODEL>
234template<
class CELL_CYCLE_MODEL>
239 EXCEPTION(
"SetSizeOfOdeSystem() must be called before calling Initialise()");
244template<
class CELL_CYCLE_MODEL>
#define EXCEPTION(message)
const unsigned UNSIGNED_UNSET
virtual bool IsAdaptive()
void serialize(Archive &archive, const unsigned int version)
static boost::shared_ptr< CellCycleModelOdeSolver< CELL_CYCLE_MODEL, BackwardEulerIvpOdeSolver > > mpInstance
static boost::shared_ptr< CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER > > Instance()
virtual bool IsAdaptive()
static boost::shared_ptr< CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER > > mpInstance
friend class boost::serialization::access
CellCycleModelOdeSolver()
void serialize(Archive &archive, const unsigned int version)