Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
AbstractGeneralizedRushLarsenCardiacCell Class Referenceabstract

#include <AbstractGeneralizedRushLarsenCardiacCell.hpp>

+ Inheritance diagram for AbstractGeneralizedRushLarsenCardiacCell:
+ Collaboration diagram for AbstractGeneralizedRushLarsenCardiacCell:

Public Member Functions

 AbstractGeneralizedRushLarsenCardiacCell (unsigned numberOfStateVariables, unsigned voltageIndex, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus)
 
virtual ~AbstractGeneralizedRushLarsenCardiacCell ()
 
OdeSolution Compute (double tStart, double tEnd, double tSamp=0.0)
 
void ComputeExceptVoltage (double tStart, double tEnd)
 
void SolveAndUpdateState (double tStart, double tEnd)
 
bool HasAnalyticJacobian () const
 
void ForceUseOfNumericalJacobian (bool useNumericalJacobian=true)
 
- Public Member Functions inherited from AbstractCardiacCell
 AbstractCardiacCell (boost::shared_ptr< AbstractIvpOdeSolver > pOdeSolver, unsigned numberOfStateVariables, unsigned voltageIndex, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus)
 
virtual ~AbstractCardiacCell ()
 
void Init ()
 
void SetTimestep (double dt)
 
void SetVoltage (double voltage)
 
double GetVoltage ()
 
unsigned GetNumberOfStateVariables () const
 
unsigned GetNumberOfParameters () const
 
std::vector< doubleGetStdVecStateVariables ()
 
const std::vector< std::string > & rGetStateVariableNames () const
 
void SetStateVariables (const std::vector< double > &rVariables)
 
void SetStateVariable (unsigned index, double newValue)
 
void SetStateVariable (const std::string &rName, double newValue)
 
double GetAnyVariable (const std::string &rName, double time=0.0)
 
double GetParameter (const std::string &rParameterName)
 
double GetParameter (unsigned parameterIndex)
 
void SetParameter (const std::string &rParameterName, double value)
 
virtual void SetState (CellModelState state)
 
virtual void SetSlowValues (const std::vector< double > &rSlowValues)
 
virtual void GetSlowValues (std::vector< double > &rSlowValues)
 
virtual bool IsFastOnly ()
 
virtual void AdjustOutOfRangeSlowValues (std::vector< double > &rSlowValues)
 
virtual unsigned GetNumSlowValues ()
 
- Public Member Functions inherited from AbstractCardiacCellInterface
 AbstractCardiacCellInterface (boost::shared_ptr< AbstractIvpOdeSolver > pOdeSolver, unsigned voltageIndex, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus)
 
virtual ~AbstractCardiacCellInterface ()
 
virtual double GetIIonic (const std::vector< double > *pStateVariables=NULL)=0
 
unsigned GetVoltageIndex ()
 
void SetStimulusFunction (boost::shared_ptr< AbstractStimulusFunction > pStimulus)
 
double GetStimulus (double time)
 
void SetIntracellularStimulusFunction (boost::shared_ptr< AbstractStimulusFunction > pStimulus)
 
double GetIntracellularStimulus (double time)
 
double GetIntracellularAreaStimulus (double time)
 
void SetUsedInTissueSimulation (bool tissue=true)
 
virtual boost::shared_ptr< RegularStimulusUseCellMLDefaultStimulus ()
 
bool HasCellMLDefaultStimulus ()
 
virtual AbstractLookupTableCollectionGetLookupTableCollection ()
 
boost::shared_ptr< AbstractStimulusFunctionGetStimulusFunction ()
 
const boost::shared_ptr< AbstractStimulusFunctionGetStimulusFunction () const
 
const boost::shared_ptr< AbstractIvpOdeSolverGetSolver () const
 
void SetSolver (boost::shared_ptr< AbstractIvpOdeSolver > pSolver)
 
virtual void SetVoltageDerivativeToZero (bool clamp=true)
 
void SetFixedVoltage (double voltage)
 
virtual void SetStretch (double stretch)
 
virtual double GetIntracellularCalciumConcentration ()
 
- Public Member Functions inherited from AbstractOdeSystem
 AbstractOdeSystem (unsigned numberOfStateVariables)
 
virtual ~AbstractOdeSystem ()
 
virtual bool CalculateStoppingEvent (double time, const std::vector< double > &rY)
 
virtual double CalculateRootFunction (double time, const std::vector< double > &rY)
 
bool GetUseAnalyticJacobian ()
 
const std::vector< double > & rGetConstStateVariables () const
 
- Public Member Functions inherited from AbstractParameterisedSystem< std::vector< double > >
 AbstractParameterisedSystem (unsigned numberOfStateVariables)
 
std::vector< double > & rGetStateVariables ()
 
std::vector< doubleGetStateVariables ()
 
void SetStateVariables (const std::vector< double > &rStateVariables)
 
double GetStateVariable (unsigned index) const
 
double GetStateVariable (const std::string &rName) const
 
void SetStateVariable (unsigned index, double newValue)
 
void SetStateVariable (const std::string &rName, double newValue)
 
virtual void VerifyStateVariables ()
 
void SetDefaultInitialConditions (const std::vector< double > &rInitialConditions)
 
void SetDefaultInitialCondition (unsigned index, double initialCondition)
 
std::vector< doubleGetInitialConditions () const
 
void ResetToInitialConditions ()
 
double GetParameter (unsigned index) const
 
double GetParameter (const std::string &rName) const
 
void SetParameter (const std::string &rName, double value)
 
void SetParameter (unsigned index, double value)
 
double GetAnyVariable (unsigned index, double time=0.0, std::vector< double > *pDerivedQuantities=NULL)
 
double GetAnyVariable (const std::string &rName, double time=0.0, std::vector< double > *pDerivedQuantities=NULL)
 
void SetAnyVariable (unsigned index, double value)
 
void SetAnyVariable (const std::string &rName, double value)
 
virtual std::vector< doubleComputeDerivedQuantities (double time, const std::vector< double > &rState)
 
std::vector< doubleComputeDerivedQuantitiesFromCurrentState (double time)
 
- Public Member Functions inherited from AbstractUntemplatedParameterisedSystem
 AbstractUntemplatedParameterisedSystem (unsigned numberOfStateVariables)
 
virtual ~AbstractUntemplatedParameterisedSystem ()
 
boost::shared_ptr< const AbstractOdeSystemInformationGetSystemInformation () const
 
std::string GetSystemName () const
 
unsigned GetNumberOfAttributes () const
 
bool HasAttribute (const std::string &rName) const
 
double GetAttribute (const std::string &rName) const
 
unsigned GetNumberOfStateVariables () const
 
const std::vector< std::string > & rGetStateVariableNames () const
 
const std::vector< std::string > & rGetStateVariableUnits () const
 
unsigned GetStateVariableIndex (const std::string &rName) const
 
bool HasStateVariable (const std::string &rName) const
 
std::string GetStateVariableUnits (unsigned index) const
 
unsigned GetNumberOfParameters () const
 
const std::vector< std::string > & rGetParameterNames () const
 
const std::vector< std::string > & rGetParameterUnits () const
 
unsigned GetParameterIndex (const std::string &rName) const
 
bool HasParameter (const std::string &rName) const
 
std::string GetParameterUnits (unsigned index) const
 
unsigned GetNumberOfDerivedQuantities () const
 
const std::vector< std::string > & rGetDerivedQuantityNames () const
 
const std::vector< std::string > & rGetDerivedQuantityUnits () const
 
unsigned GetDerivedQuantityIndex (const std::string &rName) const
 
bool HasDerivedQuantity (const std::string &rName) const
 
std::string GetDerivedQuantityUnits (unsigned index) const
 
unsigned GetAnyVariableIndex (const std::string &rName) const
 
bool HasAnyVariable (const std::string &rName) const
 
std::string GetAnyVariableUnits (unsigned index) const
 
std::string GetAnyVariableUnits (const std::string &rName) const
 

Protected Member Functions

virtual void ComputeOneStepExceptVoltage (double time)=0
 
virtual void UpdateTransmembranePotential (double time)=0
 
- Protected Member Functions inherited from AbstractParameterisedSystem< std::vector< double > >
std::string DumpState (const std::string &rMessage)
 
std::string DumpState (const std::string &rMessage, std::vector< double > Y)
 
std::string DumpState (const std::string &rMessage, std::vector< double > Y, double time)
 
void CheckParametersOnLoad (const std::vector< double > &rParameters, const std::vector< std::string > &rParameterNames)
 

Protected Attributes

std::vector< doublemPartialF
 
std::vector< doublemEvalF
 
std::vector< doublemYInit
 
bool mHasAnalyticJacobian
 
- Protected Attributes inherited from AbstractCardiacCell
double mDt
 
- Protected Attributes inherited from AbstractCardiacCellInterface
unsigned mVoltageIndex
 
boost::shared_ptr< AbstractIvpOdeSolvermpOdeSolver
 
boost::shared_ptr< AbstractStimulusFunctionmpIntracellularStimulus
 
bool mSetVoltageDerivativeToZero
 
bool mIsUsedInTissue
 
bool mHasDefaultStimulusFromCellML
 
double mFixedVoltage
 
- Protected Attributes inherited from AbstractOdeSystem
bool mUseAnalyticJacobian
 
- Protected Attributes inherited from AbstractParameterisedSystem< std::vector< double > >
std::vector< doublemStateVariables
 
std::vector< doublemParameters
 
- Protected Attributes inherited from AbstractUntemplatedParameterisedSystem
unsigned mNumberOfStateVariables
 
boost::shared_ptr< AbstractOdeSystemInformationmpSystemInfo
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 
void EvaluateYDerivatives (double time, const std::vector< double > &rY, std::vector< double > &rDY)
 

Friends

class boost::serialization::access
 

Detailed Description

This is the base class for cardiac cells solved using the GRL methods (GRL1 and GRL2). Modified from AbstractRushLarsenCardiacCell.hpp

Definition at line 59 of file AbstractGeneralizedRushLarsenCardiacCell.hpp.

Constructor & Destructor Documentation

◆ AbstractGeneralizedRushLarsenCardiacCell()

AbstractGeneralizedRushLarsenCardiacCell::AbstractGeneralizedRushLarsenCardiacCell ( unsigned  numberOfStateVariables,
unsigned  voltageIndex,
boost::shared_ptr< AbstractStimulusFunction pIntracellularStimulus 
)

Standard constructor for a cell.

Parameters
numberOfStateVariablesthe size of the ODE system
voltageIndexthe index of the variable representing the transmembrane potential within the state variable vector
pIntracellularStimulusthe intracellular stimulus function

Some notes for future reference:

  • It's a pity that inheriting from AbstractCardiacCell forces us to store a null pointer (for the unused ODE solver) in every instance. We may want to revisit this design decision at a later date.

Definition at line 53 of file AbstractGeneralizedRushLarsenCardiacCell.cpp.

References mEvalF, mPartialF, and mYInit.

◆ ~AbstractGeneralizedRushLarsenCardiacCell()

AbstractGeneralizedRushLarsenCardiacCell::~AbstractGeneralizedRushLarsenCardiacCell ( )
virtual

Virtual destructor

Definition at line 67 of file AbstractGeneralizedRushLarsenCardiacCell.cpp.

Member Function Documentation

◆ Compute()

OdeSolution AbstractGeneralizedRushLarsenCardiacCell::Compute ( double  tStart,
double  tEnd,
double  tSamp = 0.0 
)
virtual

Simulates this cell's behaviour between the time interval [tStart, tEnd], with timestep mDt.

The length of the time interval must be a multiple of the timestep.

Parameters
tStartbeginning of the time interval to simulate
tEndend of the time interval to simulate
tSampsampling interval for returned results (defaults to mDt)
Returns
the values of each state variable, at intervals of tSamp.

Reimplemented from AbstractCardiacCell.

Definition at line 70 of file AbstractGeneralizedRushLarsenCardiacCell.cpp.

References ComputeOneStepExceptVoltage(), AbstractCardiacCellInterface::GetVoltageIndex(), AbstractCardiacCell::mDt, AbstractUntemplatedParameterisedSystem::mpSystemInfo, OdeSolution::rGetSolutions(), AbstractParameterisedSystem< std::vector< double > >::rGetStateVariables(), OdeSolution::rGetTimes(), OdeSolution::SetNumberOfTimeSteps(), OdeSolution::SetOdeSystemInformation(), UpdateTransmembranePotential(), and AbstractParameterisedSystem< std::vector< double > >::VerifyStateVariables().

◆ ComputeExceptVoltage()

void AbstractGeneralizedRushLarsenCardiacCell::ComputeExceptVoltage ( double  tStart,
double  tEnd 
)
virtual

Simulates this cell's behaviour between the time interval [tStart, tEnd], with timestep mDt. The transmembrane potential is kept fixed throughout, but the other state variables are updated.

The length of the time interval must be a multiple of the timestep.

Parameters
tStartbeginning of the time interval to simulate
tEndend of the time interval to simulate

Reimplemented from AbstractCardiacCell.

Definition at line 115 of file AbstractGeneralizedRushLarsenCardiacCell.cpp.

References TimeStepper::AdvanceOneTimeStep(), ComputeOneStepExceptVoltage(), TimeStepper::GetTime(), TimeStepper::IsTimeAtEnd(), AbstractCardiacCell::mDt, AbstractCardiacCellInterface::SetVoltageDerivativeToZero(), and AbstractParameterisedSystem< std::vector< double > >::VerifyStateVariables().

◆ ComputeOneStepExceptVoltage()

virtual void AbstractGeneralizedRushLarsenCardiacCell::ComputeOneStepExceptVoltage ( double  time)
protectedpure virtual

Update the values of all variables except the transmembrane potential using a GRL method.

Parameters
timethe current simulation time

Referenced by Compute(), ComputeExceptVoltage(), and SolveAndUpdateState().

◆ EvaluateYDerivatives()

void AbstractGeneralizedRushLarsenCardiacCell::EvaluateYDerivatives ( double  time,
const std::vector< double > &  rY,
std::vector< double > &  rDY 
)
inlineprivatevirtual

This function should never be called - the cell class incorporates its own solver.

Parameters
time
rY
rDY

Implements AbstractOdeSystem.

Definition at line 157 of file AbstractGeneralizedRushLarsenCardiacCell.hpp.

References NEVER_REACHED.

◆ ForceUseOfNumericalJacobian()

void AbstractGeneralizedRushLarsenCardiacCell::ForceUseOfNumericalJacobian ( bool  useNumericalJacobian = true)

Force the use of a numerical Jacobian, even if an analytic form is provided. This is needed for a handful of troublesome models.

Parameters
useNumericalJacobianWhether to use a numerical instead of the analytic Jacobian.

Definition at line 159 of file AbstractGeneralizedRushLarsenCardiacCell.cpp.

References EXCEPTION, and AbstractOdeSystem::mUseAnalyticJacobian.

◆ HasAnalyticJacobian()

bool AbstractGeneralizedRushLarsenCardiacCell::HasAnalyticJacobian ( ) const
Returns
whether the ODE system has an analytic Jacobian (mHasAnalyticJacobian).

Definition at line 154 of file AbstractGeneralizedRushLarsenCardiacCell.cpp.

References mHasAnalyticJacobian.

◆ serialize()

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

Archive the member variables.

Parameters
archive
version

Definition at line 71 of file AbstractGeneralizedRushLarsenCardiacCell.hpp.

◆ SolveAndUpdateState()

void AbstractGeneralizedRushLarsenCardiacCell::SolveAndUpdateState ( double  tStart,
double  tEnd 
)
virtual

Simulate this cell's behaviour between the time interval [tStart, tEnd], with timestemp mDt, updating the internal state variable values.

Parameters
tStartbeginning of the time interval to simulate
tEndend of the time interval to simulate

Reimplemented from AbstractCardiacCell.

Definition at line 134 of file AbstractGeneralizedRushLarsenCardiacCell.cpp.

References TimeStepper::AdvanceOneTimeStep(), ComputeOneStepExceptVoltage(), TimeStepper::GetTime(), AbstractCardiacCellInterface::GetVoltageIndex(), TimeStepper::IsTimeAtEnd(), AbstractCardiacCell::mDt, AbstractParameterisedSystem< std::vector< double > >::rGetStateVariables(), UpdateTransmembranePotential(), and AbstractParameterisedSystem< std::vector< double > >::VerifyStateVariables().

◆ UpdateTransmembranePotential()

virtual void AbstractGeneralizedRushLarsenCardiacCell::UpdateTransmembranePotential ( double  time)
protectedpure virtual

Perform a forward Euler step to update the transmembrane potential.

Parameters
timethe current simulation time

Referenced by Compute(), and SolveAndUpdateState().

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 63 of file AbstractGeneralizedRushLarsenCardiacCell.hpp.

Member Data Documentation

◆ mEvalF

std::vector<double> AbstractGeneralizedRushLarsenCardiacCell::mEvalF
protected

The derivatives, working memory for use by subclasses.

Definition at line 182 of file AbstractGeneralizedRushLarsenCardiacCell.hpp.

Referenced by AbstractGeneralizedRushLarsenCardiacCell().

◆ mHasAnalyticJacobian

bool AbstractGeneralizedRushLarsenCardiacCell::mHasAnalyticJacobian
protected

Whether we have an analytic Jacobian.

Definition at line 188 of file AbstractGeneralizedRushLarsenCardiacCell.hpp.

Referenced by HasAnalyticJacobian().

◆ mPartialF

std::vector<double> AbstractGeneralizedRushLarsenCardiacCell::mPartialF
protected

The diagonal of the Jacobian, working memory for use by subclasses.

Definition at line 179 of file AbstractGeneralizedRushLarsenCardiacCell.hpp.

Referenced by AbstractGeneralizedRushLarsenCardiacCell().

◆ mYInit

std::vector<double> AbstractGeneralizedRushLarsenCardiacCell::mYInit
protected

The state at the beginning of the current step, working memory for use by subclasses.

Definition at line 185 of file AbstractGeneralizedRushLarsenCardiacCell.hpp.

Referenced by AbstractGeneralizedRushLarsenCardiacCell().


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