Chaste  Release::3.4
AbstractOdeSrnModel Class Reference

#include <AbstractOdeSrnModel.hpp>

+ Inheritance diagram for AbstractOdeSrnModel:
+ Collaboration diagram for AbstractOdeSrnModel:

Public Member Functions

 AbstractOdeSrnModel (unsigned stateSize, boost::shared_ptr< AbstractCellCycleModelOdeSolver > pOdeSolver=boost::shared_ptr< AbstractCellCycleModelOdeSolver >())
 
virtual ~AbstractOdeSrnModel ()
 
virtual void SimulateToCurrentTime ()
 
virtual void ResetForDivision ()
 
void SetFinishedRunningOdes (bool finishedRunningOdes)
 
void SetInitialConditions (std::vector< double > initialConditions)
 
const std::vector< double > & GetStateVariables ()
 
virtual void OutputSrnModelParameters (out_stream &rParamsFile)
 
- Public Member Functions inherited from AbstractSrnModel
 AbstractSrnModel ()
 
virtual ~AbstractSrnModel ()
 
void SetCell (CellPtr pCell)
 
virtual void Initialise ()
 
virtual void InitialiseDaughterCell ()
 
CellPtr GetCell ()
 
void SetSimulatedToTime (double simulatedToTime)
 
double GetSimulatedToTime ()
 
virtual AbstractSrnModelCreateSrnModel ()=0
 
void OutputSrnModelInfo (out_stream &rParamsFile)
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 
- Public Member Functions inherited from CellCycleModelOdeHandler
 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
< AbstractCellCycleModelOdeSolver
GetOdeSolver () const
 
void SetLastTime (double lastTime)
 
double GetDt ()
 
void SetDt (double timeStep)
 
void SetStateVariables (const std::vector< double > &rStateVariables)
 

Protected Member Functions

void Initialise (AbstractOdeSystem *pOdeSystem)
 
AbstractSrnModelCreateSrnModel (AbstractOdeSrnModel *pModel)
 
- Protected Member Functions inherited from CellCycleModelOdeHandler
bool SolveOdeToTime (double currentTime)
 
virtual void AdjustOdeParameters (double currentTime)
 

Protected Attributes

bool mFinishedRunningOdes
 
std::vector< doublemInitialConditions
 
unsigned mStateSize
 
- Protected Attributes inherited from AbstractSrnModel
CellPtr mpCell
 
double mSimulatedToTime
 
- Protected Attributes inherited from CellCycleModelOdeHandler
double mDt
 
AbstractOdeSystemmpOdeSystem
 
boost::shared_ptr
< AbstractCellCycleModelOdeSolver
mpOdeSolver
 
double mLastTime
 

Private Member Functions

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

Friends

class boost::serialization::access
 

Detailed Description

This class contains the abstract code for an ODE sub-cellular reaction network (SRN) model

Todo:
#2752 Thoroughly document this class

Definition at line 55 of file AbstractOdeSrnModel.hpp.

Constructor & Destructor Documentation

AbstractOdeSrnModel::AbstractOdeSrnModel ( unsigned  stateSize,
boost::shared_ptr< AbstractCellCycleModelOdeSolver pOdeSolver = boost::shared_ptr<AbstractCellCycleModelOdeSolver>() 
)

Create an AbstractOdeSrnModel.

Parameters
stateSizeThe number of state variables in the ODE system.
pOdeSolverAn optional pointer to a cell-cycle model ODE solver object (allows the use of different ODE solvers).

Definition at line 41 of file AbstractOdeSrnModel.cpp.

AbstractOdeSrnModel::~AbstractOdeSrnModel ( )
virtual

Destructor.

Definition at line 49 of file AbstractOdeSrnModel.cpp.

Member Function Documentation

AbstractSrnModel * AbstractOdeSrnModel::CreateSrnModel ( AbstractOdeSrnModel pModel)
protected

Overridden CreateSrnModel() method.

Builder method to create new instances of the SRN model. Each concrete subclass must implement this method to create an instance of that subclass.

This method is called by Cell::Divide() to create a SRN model for the daughter cell. Note that the parent SRN model will have had ResetForDivision() called just before CreateSrnModel() is called, so performing an exact copy of the parent is suitable behaviour. Any daughter-cell-specific initialisation can be done in InitialiseDaughterCell().

Note bring virtual functions from AbstractSrnModel into derived namespace so overloading virtual works.

Parameters
pModelpointer to an ODE SRN model
Returns
new SRN model

Definition at line 103 of file AbstractOdeSrnModel.cpp.

References mFinishedRunningOdes, mInitialConditions, CellCycleModelOdeHandler::mpOdeSystem, AbstractSrnModel::mSimulatedToTime, mStateSize, AbstractParameterisedSystem< VECTOR >::rGetStateVariables(), SetFinishedRunningOdes(), SetInitialConditions(), CellCycleModelOdeHandler::SetLastTime(), AbstractSrnModel::SetSimulatedToTime(), and CellCycleModelOdeHandler::SetStateVariables().

const std::vector< double > & AbstractOdeSrnModel::GetStateVariables ( )
Returns
reference to the ODE system state values.

Definition at line 150 of file AbstractOdeSrnModel.cpp.

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

void AbstractOdeSrnModel::Initialise ( AbstractOdeSystem pOdeSystem)
protected

Overridden Initialise() method, which here sets up the ODE system.

Note we bring virtual functions from AbstractSrnModel into derived namespace so overloading virtual works.

Parameters
pOdeSystempointer to an ODE system

Definition at line 85 of file AbstractOdeSrnModel.cpp.

References AbstractParameterisedSystem< VECTOR >::GetInitialConditions(), mInitialConditions, AbstractSrnModel::mpCell, CellCycleModelOdeHandler::mpOdeSystem, AbstractSrnModel::mSimulatedToTime, CellCycleModelOdeHandler::SetLastTime(), and AbstractParameterisedSystem< VECTOR >::SetStateVariables().

void AbstractOdeSrnModel::OutputSrnModelParameters ( out_stream &  rParamsFile)
virtual

Outputs cell cycle model parameters to file.

Parameters
rParamsFilethe file stream to which the parameters are output

Reimplemented from AbstractSrnModel.

Reimplemented in DeltaNotchSrnModel, and Goldbeter1991SrnModel.

Definition at line 157 of file AbstractOdeSrnModel.cpp.

References AbstractSrnModel::OutputSrnModelParameters().

Referenced by Goldbeter1991SrnModel::OutputSrnModelParameters(), and DeltaNotchSrnModel::OutputSrnModelParameters().

void AbstractOdeSrnModel::ResetForDivision ( )
virtual

For a naturally cycling model this does not need to be overridden in the subclasses. But most models should override this function and then call AbstractOdeBasedCellCycleModel::ResetForDivision() from inside their version.

Reimplemented from AbstractSrnModel.

Definition at line 132 of file AbstractOdeSrnModel.cpp.

References mFinishedRunningOdes, CellCycleModelOdeHandler::mLastTime, AbstractSrnModel::mSimulatedToTime, and AbstractSrnModel::ResetForDivision().

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

Archive the srn model and member variables.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 68 of file AbstractOdeSrnModel.hpp.

References mFinishedRunningOdes, mInitialConditions, and mStateSize.

void AbstractOdeSrnModel::SetFinishedRunningOdes ( bool  finishedRunningOdes)

Set mFinishedRunningOdes. Used in CreateSrnModel().

Parameters
finishedRunningOdesthe new value of mFinishedRunningOdes

Definition at line 139 of file AbstractOdeSrnModel.cpp.

References mFinishedRunningOdes.

Referenced by CreateSrnModel().

void AbstractOdeSrnModel::SetInitialConditions ( std::vector< double initialConditions)

Set mInitialConditions. Used in CreateSrnModel().

Parameters
initialConditionsthe new value of mInitialConditions

Definition at line 144 of file AbstractOdeSrnModel.cpp.

References mInitialConditions, and mStateSize.

Referenced by CreateSrnModel().

void AbstractOdeSrnModel::SimulateToCurrentTime ( )
virtual

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 60 of file AbstractOdeSrnModel.hpp.

Member Data Documentation

bool AbstractOdeSrnModel::mFinishedRunningOdes
protected

Whether the SRN model is currently in a delay (not solving ODEs).

Definition at line 82 of file AbstractOdeSrnModel.hpp.

Referenced by CreateSrnModel(), ResetForDivision(), serialize(), SetFinishedRunningOdes(), and SimulateToCurrentTime().

std::vector<double> AbstractOdeSrnModel::mInitialConditions
protected

The initial condition for the ODE state variables.

Definition at line 87 of file AbstractOdeSrnModel.hpp.

Referenced by CreateSrnModel(), Initialise(), serialize(), and SetInitialConditions().

unsigned AbstractOdeSrnModel::mStateSize
protected

The number of state variables.

Definition at line 92 of file AbstractOdeSrnModel.hpp.

Referenced by CreateSrnModel(), GetStateVariables(), serialize(), and SetInitialConditions().


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