AbstractRushLarsenCardiacCell Class Reference

#include <AbstractRushLarsenCardiacCell.hpp>

Inherits AbstractCardiacCell.

Collaboration diagram for AbstractRushLarsenCardiacCell:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AbstractRushLarsenCardiacCell (unsigned numberOfStateVariables, unsigned voltageIndex, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus)
virtual ~AbstractRushLarsenCardiacCell ()
OdeSolution Compute (double tStart, double tEnd, double tSamp=0.0)
void ComputeExceptVoltage (double tStart, double tEnd)
void SolveAndUpdateState (double tStart, double tEnd)

Protected Member Functions

virtual void ComputeOneStepExceptVoltage (const std::vector< double > &rDY, const std::vector< double > &rAlphaOrTau, const std::vector< double > &rBetaOrInf)=0
void UpdateTransmembranePotential (const std::vector< double > &rDY)
virtual void EvaluateEquations (double time, std::vector< double > &rDY, std::vector< double > &rAlphaOrTau, std::vector< double > &rBetaOrInf)=0

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 Rush-Larsen method. It is based on code contributed by Megan Lewis, University of Saskatchewan

The basic approach to solving such models is:

Definition at line 51 of file AbstractRushLarsenCardiacCell.hpp.


Constructor & Destructor Documentation

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

Standard constructor for a cell.

Parameters:
numberOfStateVariables the size of the ODE system
voltageIndex the index of the variable representing the transmembrane potential within the state variable vector
pIntracellularStimulus the 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 38 of file AbstractRushLarsenCardiacCell.cpp.

AbstractRushLarsenCardiacCell::~AbstractRushLarsenCardiacCell (  )  [virtual]

Virtual destructor

Definition at line 47 of file AbstractRushLarsenCardiacCell.cpp.


Member Function Documentation

OdeSolution AbstractRushLarsenCardiacCell::Compute ( double  tStart,
double  tEnd,
double  tSamp = 0.0 
) [virtual]

Simulates this cell's behaviour between the time interval [tStart, tEnd], with timestep mDt. Uses a forward Euler step to update the transmembrane potential at each timestep.

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

Parameters:
tStart beginning of the time interval to simulate
tEnd end of the time interval to simulate
tSamp sampling interval for returned results (defaults to mDt)
Returns:
the values of each state variable, at intervals of tSamp.

Reimplemented from AbstractCardiacCell.

Definition at line 50 of file AbstractRushLarsenCardiacCell.cpp.

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

void AbstractRushLarsenCardiacCell::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:
tStart beginning of the time interval to simulate
tEnd end of the time interval to simulate

Reimplemented from AbstractCardiacCell.

Definition at line 99 of file AbstractRushLarsenCardiacCell.cpp.

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

virtual void AbstractRushLarsenCardiacCell::ComputeOneStepExceptVoltage ( const std::vector< double > &  rDY,
const std::vector< double > &  rAlphaOrTau,
const std::vector< double > &  rBetaOrInf 
) [protected, pure virtual]

Update the values of elligible gating variables using the Rush-Larsen method, and of other non-V variables using forward Euler, for a single timestep.

Note:
This method must be provided by subclasses.
Parameters:
rDY vector containing dy/dt values
rAlphaOrTau vector containing alpha or tau values, depending on the formulation
rBetaOrInf vector containing beta or inf values, depending on the formulation

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

virtual void AbstractRushLarsenCardiacCell::EvaluateEquations ( double  time,
std::vector< double > &  rDY,
std::vector< double > &  rAlphaOrTau,
std::vector< double > &  rBetaOrInf 
) [protected, pure virtual]

Compute dy/dt and alpha and beta values.

Note:
This method must be provided by subclasses.
Parameters:
time start of this timestep
rDY vector to fill in with dy/dt values
rAlphaOrTau vector to fill in with alpha or tau values, depending on the formulation
rBetaOrInf vector to fill in with beta or inf values, depending on the formulation

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

void AbstractRushLarsenCardiacCell::EvaluateYDerivatives ( double  time,
const std::vector< double > &  rY,
std::vector< double > &  rDY 
) [inline, private, virtual]

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

Parameters:
time 
rY 
rDY 

Implements AbstractOdeSystem.

Definition at line 135 of file AbstractRushLarsenCardiacCell.hpp.

References NEVER_REACHED.

template<class Archive >
void AbstractRushLarsenCardiacCell::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Archive the member variables.

Parameters:
archive 
version 

Reimplemented from AbstractCardiacCell.

Definition at line 63 of file AbstractRushLarsenCardiacCell.hpp.

void AbstractRushLarsenCardiacCell::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:
tStart beginning of the time interval to simulate
tEnd end of the time interval to simulate

Reimplemented from AbstractCardiacCell.

Definition at line 123 of file AbstractRushLarsenCardiacCell.cpp.

References TimeStepper::AdvanceOneTimeStep(), ComputeOneStepExceptVoltage(), EvaluateEquations(), TimeStepper::GetTime(), TimeStepper::IsTimeAtEnd(), AbstractCardiacCell::mDt, AbstractUntemplatedParameterisedSystem::mNumberOfStateVariables, UpdateTransmembranePotential(), and AbstractParameterisedSystem< std::vector< double > >::VerifyStateVariables().

void AbstractRushLarsenCardiacCell::UpdateTransmembranePotential ( const std::vector< double > &  rDY  )  [protected]

Perform a forward Euler step to update the transmembrane potential.

Parameters:
rDY vector containing dy/dt values

Definition at line 142 of file AbstractRushLarsenCardiacCell.cpp.

References AbstractCardiacCellInterface::GetVoltageIndex(), AbstractCardiacCell::mDt, and AbstractParameterisedSystem< std::vector< double > >::rGetStateVariables().

Referenced by Compute(), and SolveAndUpdateState().


Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from AbstractCardiacCell.

Definition at line 55 of file AbstractRushLarsenCardiacCell.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Dec 22 13:01:25 2011 for Chaste by  doxygen 1.6.3