Chaste  Release::2017.1
CellCycleModelOdeHandler Class Reference

#include <CellCycleModelOdeHandler.hpp>

+ Inheritance diagram for CellCycleModelOdeHandler:
+ Collaboration diagram for CellCycleModelOdeHandler:

Public Member Functions

 CellCycleModelOdeHandler (double lastTime=SimulationTime::Instance() ->GetTime(), boost::shared_ptr< AbstractCellCycleModelOdeSolver > pOdeSolver=boost::shared_ptr< AbstractCellCycleModelOdeSolver >())
 
virtual ~CellCycleModelOdeHandler ()
 
AbstractOdeSystemGetOdeSystem () const
 
void SetOdeSystem (AbstractOdeSystem *pOdeSystem)
 
const boost::shared_ptr< AbstractCellCycleModelOdeSolverGetOdeSolver () const
 
void SetLastTime (double lastTime)
 
double GetDt ()
 
void SetDt (double timeStep)
 
void SetStateVariables (const std::vector< double > &rStateVariables)
 
std::vector< doubleGetProteinConcentrations () const
 
void SetProteinConcentrationsForTestsOnly (double lastTime, std::vector< double > proteinConcentrations)
 

Protected Member Functions

 CellCycleModelOdeHandler (const CellCycleModelOdeHandler &rHandler)
 
bool SolveOdeToTime (double currentTime)
 
virtual void AdjustOdeParameters (double currentTime)
 

Protected Attributes

double mDt
 
AbstractOdeSystemmpOdeSystem
 
boost::shared_ptr< AbstractCellCycleModelOdeSolvermpOdeSolver
 
double mLastTime
 
bool mFinishedRunningOdes
 

Private Member Functions

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

Friends

class boost::serialization::access
 

Detailed Description

This class contains the functionality for running ODEs as part of a cell cycle or SRN model. It is designed to be used as an additional base class for models which require this functionality.

Definition at line 52 of file CellCycleModelOdeHandler.hpp.

Constructor & Destructor Documentation

CellCycleModelOdeHandler::CellCycleModelOdeHandler ( const CellCycleModelOdeHandler rHandler)
protected

Protected copy-constructor for use by CreateCellCycleModel and CreateSrnModel.

Parameters
rHandlerODE handler to copy.

Definition at line 56 of file CellCycleModelOdeHandler.cpp.

Referenced by serialize().

CellCycleModelOdeHandler::CellCycleModelOdeHandler ( double  lastTime = SimulationTime::Instance()->GetTime(),
boost::shared_ptr< AbstractCellCycleModelOdeSolver pOdeSolver = boost::shared_ptr<AbstractCellCycleModelOdeSolver>() 
)

Constructor.

Parameters
lastTimeThe birth time of the cell / last time model was evaluated (defaults to the current SimulationTime)
pOdeSolverAn optional pointer to a cell-cycle model ODE solver object (allows the use of different ODE solvers)

Definition at line 38 of file CellCycleModelOdeHandler.cpp.

CellCycleModelOdeHandler::~CellCycleModelOdeHandler ( )
virtual

Destructor.

Definition at line 48 of file CellCycleModelOdeHandler.cpp.

References mpOdeSystem.

Member Function Documentation

void CellCycleModelOdeHandler::AdjustOdeParameters ( double  currentTime)
protectedvirtual

Adjust any ODE parameters needed before solving until currentTime. Defaults to do nothing.

Parameters
currentTimethe time up to which the system will be solved.

Reimplemented in SingleOdeWntCellCycleModel, WntCellCycleModel, AbstractVanLeeuwen2009WntSwatCellCycleModel, and Alarcon2004OxygenBasedCellCycleModel.

Definition at line 123 of file CellCycleModelOdeHandler.cpp.

Referenced by SolveOdeToTime().

double CellCycleModelOdeHandler::GetDt ( )
Returns
mDt. This sets it to a default value if it hasn't been set by calling SetDt.

Definition at line 85 of file CellCycleModelOdeHandler.cpp.

References DOUBLE_UNSET, SimulationTime::GetTimeStep(), SimulationTime::Instance(), mDt, and mpOdeSolver.

Referenced by SolveOdeToTime().

const boost::shared_ptr< AbstractCellCycleModelOdeSolver > CellCycleModelOdeHandler::GetOdeSolver ( ) const
Returns
mpOdeSolver

Definition at line 75 of file CellCycleModelOdeHandler.cpp.

References mpOdeSolver.

std::vector< double > CellCycleModelOdeHandler::GetProteinConcentrations ( ) const
Returns
the protein concentrations at the current time (useful for tests)

NB: Will copy the vector - you can't use this to modify the concentrations.

Definition at line 138 of file CellCycleModelOdeHandler.cpp.

References mpOdeSystem, and AbstractParameterisedSystem< VECTOR >::rGetStateVariables().

Referenced by CellCycleModelProteinConcentrationsWriter< ELEMENT_DIM, SPACE_DIM >::VisitCell().

CellCycleModelOdeHandler& CellCycleModelOdeHandler::operator= ( const AbstractCellCycleModelOdeSolver )
private

Prevent copy-assignment of this class, or its subclasses. Note that we do not define this method, therefore statements like "CellCycleModelOdeHandler new = old;" will not compile. We do not inherit from boost::noncopyable because we *do* define a protected copy-constructor, for use by CreateCellCycleModel and CreateSrnModel.

Returns
the new ODE handler.

Referenced by serialize().

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

Archive the object and its member variables.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 65 of file CellCycleModelOdeHandler.hpp.

References CellCycleModelOdeHandler(), mDt, mFinishedRunningOdes, mLastTime, mpOdeSolver, mpOdeSystem, and operator=().

void CellCycleModelOdeHandler::SetLastTime ( double  lastTime)

Set mLastTime.

Parameters
lastTimethe new value of mLastTime

Definition at line 127 of file CellCycleModelOdeHandler.cpp.

References mLastTime.

Referenced by AbstractOdeSrnModel::Initialise(), and SingleOdeWntCellCycleModel::Initialise().

void CellCycleModelOdeHandler::SetProteinConcentrationsForTestsOnly ( double  lastTime,
std::vector< double proteinConcentrations 
)

Sets the protein concentrations and time when the model was last evaluated - should only be called by tests

Parameters
lastTimethe SimulationTime at which the protein concentrations apply
proteinConcentrationsa standard vector of doubles of protein concentrations

Definition at line 144 of file CellCycleModelOdeHandler.cpp.

References mLastTime, mpOdeSystem, AbstractParameterisedSystem< VECTOR >::rGetStateVariables(), and AbstractParameterisedSystem< VECTOR >::SetStateVariables().

bool CellCycleModelOdeHandler::SolveOdeToTime ( double  currentTime)
protected

Solves the ODE system to a given time.

Parameters
currentTimethe current time
Returns
whether a stopping event occurred.

Definition at line 101 of file CellCycleModelOdeHandler.cpp.

References AdjustOdeParameters(), GetDt(), mLastTime, mpOdeSolver, and mpOdeSystem.

Referenced by AbstractOdeBasedCellCycleModel::ReadyToDivide(), AbstractOdeSrnModel::SimulateToCurrentTime(), AbstractOdeBasedPhaseBasedCellCycleModel::UpdateCellCyclePhase(), and SingleOdeWntCellCycleModel::UpdateCellCyclePhase().

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 57 of file CellCycleModelOdeHandler.hpp.

Member Data Documentation

double CellCycleModelOdeHandler::mDt
protected

Timestep to use when solving the ODE system. For some adaptive solvers (e.g. CVODE) this is the maximum step to use.

Definition at line 97 of file CellCycleModelOdeHandler.hpp.

Referenced by GetDt(), serialize(), and SetDt().

bool CellCycleModelOdeHandler::mFinishedRunningOdes
protected
AbstractOdeSystem* CellCycleModelOdeHandler::mpOdeSystem
protected

A system of ODEs.

Definition at line 100 of file CellCycleModelOdeHandler.hpp.

Referenced by Alarcon2004OxygenBasedCellCycleModel::AdjustOdeParameters(), AbstractVanLeeuwen2009WntSwatCellCycleModel::AdjustOdeParameters(), WntCellCycleModel::AdjustOdeParameters(), SingleOdeWntCellCycleModel::AdjustOdeParameters(), AbstractVanLeeuwen2009WntSwatCellCycleModel::ChangeCellProliferativeTypeDueToCurrentBetaCateninLevel(), WntCellCycleModel::ChangeCellProliferativeTypeDueToCurrentBetaCateninLevel(), SingleOdeWntCellCycleModel::ChangeCellProliferativeTypeDueToCurrentBetaCateninLevel(), SingleOdeWntCellCycleModel::GetBetaCateninConcentration(), Goldbeter1991SrnModel::GetC(), AbstractVanLeeuwen2009WntSwatCellCycleModel::GetCytoplasmicBetaCateninLevel(), DeltaNotchSrnModel::GetDelta(), Goldbeter1991SrnModel::GetM(), DeltaNotchSrnModel::GetMeanNeighbouringDelta(), AbstractVanLeeuwen2009WntSwatCellCycleModel::GetMembraneBoundBetaCateninLevel(), DeltaNotchSrnModel::GetNotch(), AbstractVanLeeuwen2009WntSwatCellCycleModel::GetNuclearBetaCateninLevel(), GetOdeSystem(), GetProteinConcentrations(), Goldbeter1991SrnModel::GetX(), AbstractOdeSrnModel::Initialise(), TysonNovakCellCycleModel::Initialise(), AbstractVanLeeuwen2009WntSwatCellCycleModel::Initialise(), Alarcon2004OxygenBasedCellCycleModel::Initialise(), SingleOdeWntCellCycleModel::Initialise(), WntCellCycleModel::Initialise(), VanLeeuwen2009WntSwatCellCycleModelHypothesisOne::InitialiseOdeSystem(), VanLeeuwen2009WntSwatCellCycleModelHypothesisTwo::InitialiseOdeSystem(), AbstractOdeBasedCellCycleModel::ReadyToDivide(), Alarcon2004OxygenBasedCellCycleModel::ResetForDivision(), TysonNovakCellCycleModel::ResetForDivision(), AbstractWntOdeBasedCellCycleModel::ResetForDivision(), serialize(), SetOdeSystem(), SetProteinConcentrationsForTestsOnly(), SetStateVariables(), AbstractOdeSrnModel::SimulateToCurrentTime(), SolveOdeToTime(), AbstractOdeBasedPhaseBasedCellCycleModel::UpdateCellCyclePhase(), AbstractWntOdeBasedCellCycleModel::UpdateCellProliferativeType(), DeltaNotchSrnModel::UpdateDeltaNotch(), and ~CellCycleModelOdeHandler().


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