Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER > Class Template Reference

#include <CellCycleModelOdeSolver.hpp>

+ Inheritance diagram for CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER >:
+ Collaboration diagram for CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER >:

Public Member Functions

bool IsSetUp ()
 
void Initialise ()
 
virtual bool IsAdaptive ()
 
void Reset ()
 
- Public Member Functions inherited from AbstractCellCycleModelOdeSolver
 AbstractCellCycleModelOdeSolver ()
 
virtual ~AbstractCellCycleModelOdeSolver ()
 
void SolveAndUpdateStateVariable (AbstractOdeSystem *pAbstractOdeSystem, double startTime, double endTime, double timeStep)
 
bool StoppingEventOccurred ()
 
double GetStoppingTime ()
 
void SetSizeOfOdeSystem (unsigned sizeOfOdeSystem)
 
unsigned GetSizeOfOdeSystem ()
 
void CheckForStoppingEvents ()
 
void SetMaxSteps (long numSteps)
 
void SetTolerances (double relTol=1e-4, double absTol=1e-6)
 

Static Public Member Functions

static boost::shared_ptr< CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER > > Instance ()
 

Private Member Functions

 CellCycleModelOdeSolver ()
 
template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Static Private Attributes

static boost::shared_ptr< CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER > > mpInstance
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Attributes inherited from AbstractCellCycleModelOdeSolver
boost::shared_ptr< AbstractIvpOdeSolvermpOdeSolver
 
unsigned mSizeOfOdeSystem
 

Detailed Description

template<class CELL_CYCLE_MODEL, class ODE_SOLVER>
class CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER >

A concrete implementation of AbstractCellCycleModelOdeSolver, that uses templates to provide an implementation for any pair of cell-cycle model and ODE solver classes.

All ODE-based cell-cycle model developers need to do is set mpOdeSolver in their constructor: mpOdeSolver = CellCycleModelOdeSolver<CELL_CYCLE_MODEL, ODE_SOLVER>::Instance();

This class contains all the machinery to make it a singleton, hence providing exactly one instance per pair of values of the template parameters.

Definition at line 58 of file CellCycleModelOdeSolver.hpp.

Constructor & Destructor Documentation

◆ CellCycleModelOdeSolver()

template<class CELL_CYCLE_MODEL , class ODE_SOLVER >
CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER >::CellCycleModelOdeSolver ( )
private

Default constructor. Not user accessible; to obtain an instance of this class use the Instance method.

The semantics of shared_ptr are different from normal pointers; we don't care if a second instance is constructed when loading an archive, since archiving the shared_ptr will ensure that the 'singleton' is correctly serialized. Thus, here we do not require an assertion that mpInstance is NULL, as we do in the constructors of the SimulationTime singleton class.

Definition at line 111 of file CellCycleModelOdeSolver.hpp.

Member Function Documentation

◆ Initialise()

template<class CELL_CYCLE_MODEL , class ODE_SOLVER >
void CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER >::Initialise ( )
virtual

Initialise the ODE solver.

Implements AbstractCellCycleModelOdeSolver.

Definition at line 140 of file CellCycleModelOdeSolver.hpp.

◆ Instance()

◆ IsAdaptive()

template<class CELL_CYCLE_MODEL , class ODE_SOLVER >
bool CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER >::IsAdaptive ( )
virtual
Returns
true iff this is an adaptive solver such as CVODE for which it is safe to set the 'timestep' to be the outer simulation timestep, because the ODE solver will use this as its maximum, not actual, timestep.

By default calls the base class version; it is defined here so that specializations can override it.

Reimplemented from AbstractCellCycleModelOdeSolver.

Definition at line 155 of file CellCycleModelOdeSolver.hpp.

References AbstractCellCycleModelOdeSolver::IsAdaptive().

◆ IsSetUp()

template<class CELL_CYCLE_MODEL , class ODE_SOLVER >
bool CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER >::IsSetUp ( )
virtual
Returns
whether the instance in existence and fully set up.

Implements AbstractCellCycleModelOdeSolver.

Definition at line 134 of file CellCycleModelOdeSolver.hpp.

◆ Reset()

template<class CELL_CYCLE_MODEL , class ODE_SOLVER >
void CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER >::Reset ( )
virtual

Reset the instance.

Todo:
Consider whether Reset() could be moved to the abstract class

Implements AbstractCellCycleModelOdeSolver.

Definition at line 161 of file CellCycleModelOdeSolver.hpp.

◆ serialize()

template<class CELL_CYCLE_MODEL , class ODE_SOLVER >
template<class Archive >
void CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER >::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Archive the cell-cycle model, never used directly - boost uses this.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 76 of file CellCycleModelOdeSolver.hpp.

References CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER >::mpInstance.

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<class CELL_CYCLE_MODEL , class ODE_SOLVER >
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 68 of file CellCycleModelOdeSolver.hpp.

Member Data Documentation

◆ mpInstance

template<class CELL_CYCLE_MODEL , class ODE_SOLVER >
boost::shared_ptr< CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER > > CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER >::mpInstance
staticprivate

The single instance of this class, for this ODE_SOLVER.

Definition of the instance static member.

Definition at line 62 of file CellCycleModelOdeSolver.hpp.

Referenced by CellCycleModelOdeSolver< CELL_CYCLE_MODEL, ODE_SOLVER >::serialize(), and CellCycleModelOdeSolver< CELL_CYCLE_MODEL, BackwardEulerIvpOdeSolver >::serialize().


The documentation for this class was generated from the following file: