Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
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 SetInitialConditions (std::vector< double > initialConditions)
 
virtual void OutputSrnModelParameters (out_stream &rParamsFile)
 
virtual void ScaleSrnVariables (const double theta)
 
- Public Member Functions inherited from AbstractSrnModel
 AbstractSrnModel ()
 
virtual ~AbstractSrnModel ()
 
virtual void SetCell (CellPtr pCell)
 
virtual void InitialiseDaughterCell ()
 
CellPtr GetCell ()
 
void SetSimulatedToTime (double simulatedToTime)
 
double GetSimulatedToTime () const
 
virtual AbstractSrnModelCreateSrnModel ()=0
 
void OutputSrnModelInfo (out_stream &rParamsFile)
 
void SetEdgeLocalIndex (unsigned index)
 
unsigned GetEdgeLocalIndex ()
 
bool HasEdgeModel () const
 
void SetEdgeModelIndicator (const bool isEdgeModel)
 
virtual void AddSrnQuantities (AbstractSrnModel *pOtherSrn, const double scale=1.0)
 
virtual void AddShrunkEdgeSrn (AbstractSrnModel *pShrunkEdgeSrn)
 
virtual void AddMergedEdgeSrn (AbstractSrnModel *pMergedEdgeSrn)
 
virtual void AddShrunkEdgeToInterior (AbstractSrnModel *pShrunkEdgeSrn)
 
virtual void SplitEdgeSrn (const double relativePosition)
 
- 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< 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

void Initialise (AbstractOdeSystem *pOdeSystem)
 
 AbstractOdeSrnModel (const AbstractOdeSrnModel &rModel)
 
virtual void Initialise ()
 
- Protected Member Functions inherited from AbstractSrnModel
 AbstractSrnModel (const AbstractSrnModel &rModel)
 
- Protected Member Functions inherited from CellCycleModelOdeHandler
 CellCycleModelOdeHandler (const CellCycleModelOdeHandler &rHandler)
 
bool SolveOdeToTime (double currentTime)
 
virtual void AdjustOdeParameters (double currentTime)
 

Protected Attributes

std::vector< doublemInitialConditions
 
unsigned mStateSize
 
- Protected Attributes inherited from AbstractSrnModel
CellPtr mpCell
 
double mSimulatedToTime
 
unsigned mEdgeLocalIndex = UNSIGNED_UNSET
 
bool mIsEdgeBasedModel = false
 
- Protected Attributes inherited from CellCycleModelOdeHandler
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)
 

Friends

class boost::serialization::access
 

Detailed Description

This class contains the abstract code for an ODE sub-cellular reaction network (SRN) model, similar in structure to AbstractOdeBasedCellCycleModel.

Definition at line 52 of file AbstractOdeSrnModel.hpp.

Constructor & Destructor Documentation

◆ AbstractOdeSrnModel() [1/2]

AbstractOdeSrnModel::AbstractOdeSrnModel ( const AbstractOdeSrnModel rModel)
protected

Protected copy-constructor for use by CreateSrnModel(). The only way for external code to create a copy of a SRN model is by calling that method, to ensure that a model of the correct subclass is created.

This copy-constructor helps subclasses to ensure that all member variables are correctly copied when this happens.

This method is called by child classes to set member variables for a daughter cell upon cell division. 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().

Parameters
rModelthe SRN model to copy.

Definition at line 45 of file AbstractOdeSrnModel.cpp.

◆ AbstractOdeSrnModel() [2/2]

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 38 of file AbstractOdeSrnModel.cpp.

◆ ~AbstractOdeSrnModel()

AbstractOdeSrnModel::~AbstractOdeSrnModel ( )
virtual

Destructor.

Definition at line 67 of file AbstractOdeSrnModel.cpp.

Member Function Documentation

◆ Initialise() [1/2]

void AbstractSrnModel::Initialise ( )
protectedvirtual

Initialise the SRN model at the start of a simulation.

This method will be called precisely once per cell set up in the initial cell population. It is not called on cell division; use ResetForDivision(), CreateSrnModel() and InitialiseDaughterCell() for that.

By the time this is called, a CellPopulation will have been set up, so the model can know where its cell is located in space. If relevant to the simulation, any singletons will also have been initialised.

Reimplemented from AbstractSrnModel.

Reimplemented in DeltaNotchEdgeSrnModel, DeltaNotchInteriorSrnModel, DeltaNotchSrnModel, and Goldbeter1991SrnModel.

Definition at line 164 of file AbstractSrnModel.cpp.

Referenced by DeltaNotchEdgeSrnModel::Initialise(), DeltaNotchInteriorSrnModel::Initialise(), DeltaNotchSrnModel::Initialise(), and Goldbeter1991SrnModel::Initialise().

◆ Initialise() [2/2]

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 97 of file AbstractOdeSrnModel.cpp.

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

◆ OutputSrnModelParameters()

void AbstractOdeSrnModel::OutputSrnModelParameters ( out_stream &  rParamsFile)
virtual

Outputs SRN model parameters to file. Virtual void so needs to be specified in child classes.

Parameters
rParamsFilethe file stream to which the parameters are output

Reimplemented from AbstractSrnModel.

Reimplemented in DeltaNotchEdgeSrnModel, DeltaNotchInteriorSrnModel, DeltaNotchSrnModel, and Goldbeter1991SrnModel.

Definition at line 128 of file AbstractOdeSrnModel.cpp.

References AbstractSrnModel::OutputSrnModelParameters().

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

◆ ResetForDivision()

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 AbstractSrnModel::ResetForDivision() from inside their version.

Reimplemented from AbstractSrnModel.

Reimplemented in DeltaNotchInteriorSrnModel.

Definition at line 115 of file AbstractOdeSrnModel.cpp.

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

◆ ScaleSrnVariables()

void AbstractOdeSrnModel::ScaleSrnVariables ( const double  theta)
virtual

Scales all ODE variables by factor theta. Used for example to scale model variables after cell division.

Parameters
thetafactor by which to scale all ODE variables.

Reimplemented from AbstractSrnModel.

Definition at line 134 of file AbstractOdeSrnModel.cpp.

References AbstractUntemplatedParameterisedSystem::GetNumberOfStateVariables(), AbstractParameterisedSystem< VECTOR >::GetStateVariable(), CellCycleModelOdeHandler::mpOdeSystem, and AbstractParameterisedSystem< VECTOR >::SetStateVariable().

Referenced by DeltaNotchInteriorSrnModel::ResetForDivision(), and DeltaNotchEdgeSrnModel::SplitEdgeSrn().

◆ serialize()

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 65 of file AbstractOdeSrnModel.hpp.

References mInitialConditions, and mStateSize.

◆ SetInitialConditions()

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

Set mInitialConditions. Used in CreateSrnModel().

Parameters
initialConditionsthe new value of mInitialConditions

Definition at line 122 of file AbstractOdeSrnModel.cpp.

References mInitialConditions, and mStateSize.

◆ SimulateToCurrentTime()

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 57 of file AbstractOdeSrnModel.hpp.

Member Data Documentation

◆ mInitialConditions

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

The initial condition for the ODE state variables.

Definition at line 78 of file AbstractOdeSrnModel.hpp.

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

◆ mStateSize

unsigned AbstractOdeSrnModel::mStateSize
protected

The number of state variables.

Definition at line 83 of file AbstractOdeSrnModel.hpp.

Referenced by serialize(), and SetInitialConditions().


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