AbstractCardiacCell Class Reference

#include <AbstractCardiacCell.hpp>

Inheritance diagram for AbstractCardiacCell:

Inheritance graph
[legend]
Collaboration diagram for AbstractCardiacCell:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AbstractCardiacCell (boost::shared_ptr< AbstractIvpOdeSolver > pOdeSolver, unsigned numberOfStateVariables, unsigned voltageIndex, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus)
virtual ~AbstractCardiacCell ()
void Init ()
virtual OdeSolution Compute (double tStart, double tEnd)
virtual void ComputeExceptVoltage (double tStart, double tEnd)
virtual double GetIIonic ()=0
void SetVoltage (double voltage)
double GetVoltage ()
unsigned GetVoltageIndex ()
void SetStimulusFunction (boost::shared_ptr< AbstractStimulusFunction > pStimulus)
double GetStimulus (double time)
void SetIntracellularStimulusFunction (boost::shared_ptr< AbstractStimulusFunction > pStimulus)
double GetIntracellularStimulus (double time)
virtual double GetIntracellularCalciumConcentration ()
virtual void VerifyStateVariables ()
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 ()
const boost::shared_ptr
< AbstractStimulusFunction
GetStimulusFunction () const
const boost::shared_ptr
< AbstractIvpOdeSolver
GetSolver () const

Protected Attributes

unsigned mVoltageIndex
boost::shared_ptr
< AbstractIvpOdeSolver
mpOdeSolver
double mDt
boost::shared_ptr
< AbstractStimulusFunction
mpIntracellularStimulus
bool mSetVoltageDerivativeToZero

Private Member Functions

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

Friends

class boost::serialization::access


Detailed Description

This is the base class for ode-based cardiac cell models.

It is essentially a cardiac-specific wrapper for ODE systems providing an interface which can interact with the Stimulus classes and the voltage in a mono/bidomain simulation.

Concrete classes can be autogenerated from CellML files by the pyCML package, and will automatically inherit from this class.

Definition at line 62 of file AbstractCardiacCell.hpp.


Constructor & Destructor Documentation

AbstractCardiacCell::AbstractCardiacCell ( boost::shared_ptr< AbstractIvpOdeSolver pOdeSolver,
unsigned  numberOfStateVariables,
unsigned  voltageIndex,
boost::shared_ptr< AbstractStimulusFunction pIntracellularStimulus 
)

Create a new cardiac cell.

Parameters:
pOdeSolver the ODE solver to use when simulating this cell
numberOfStateVariables the size of the ODE system modelling this cell
voltageIndex the index of the transmembrane potential within the vector of state variables
pIntracellularStimulus the intracellular stimulus current

Definition at line 33 of file AbstractCardiacCell.cpp.

References AbstractOdeSystem::mNumberOfStateVariables.

AbstractCardiacCell::~AbstractCardiacCell (  )  [virtual]

Virtual destructor

Definition at line 48 of file AbstractCardiacCell.cpp.


Member Function Documentation

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

void AbstractCardiacCell::Init (  ) 

OdeSolution AbstractCardiacCell::Compute ( double  tStart,
double  tEnd 
) [virtual]

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

Parameters:
tStart beginning of the time interval to simulate
tEnd end of the time interval to simulate

Reimplemented in AbstractBackwardEulerCardiacCell< SIZE >, AbstractBackwardEulerCardiacCell< 12 >, AbstractBackwardEulerCardiacCell< 1 >, and AbstractBackwardEulerCardiacCell< 3 >.

Definition at line 58 of file AbstractCardiacCell.cpp.

References mDt, mpOdeSolver, and AbstractOdeSystem::rGetStateVariables().

void AbstractCardiacCell::ComputeExceptVoltage ( double  tStart,
double  tEnd 
) [virtual]

Simulates this cell's behaviour between the time interval [tStart, tEnd], with timestep mDt, but does not update the voltage.

Parameters:
tStart beginning of the time interval to simulate
tEnd end of the time interval to simulate

Reimplemented in AbstractBackwardEulerCardiacCell< SIZE >, FakeBathCell, AbstractBackwardEulerCardiacCell< 12 >, AbstractBackwardEulerCardiacCell< 1 >, and AbstractBackwardEulerCardiacCell< 3 >.

Definition at line 64 of file AbstractCardiacCell.cpp.

References GetVoltage(), mDt, mpOdeSolver, mSetVoltageDerivativeToZero, SetVoltage(), and VerifyStateVariables().

virtual double AbstractCardiacCell::GetIIonic (  )  [pure virtual]

void AbstractCardiacCell::SetVoltage ( double  voltage  ) 

Set the transmembrane potential

Parameters:
voltage new value

Definition at line 77 of file AbstractCardiacCell.cpp.

References mVoltageIndex, and AbstractOdeSystem::rGetStateVariables().

Referenced by ComputeExceptVoltage().

double AbstractCardiacCell::GetVoltage (  ) 

Get the current value of the transmembrane potential, as given in our state variable vector.

Definition at line 82 of file AbstractCardiacCell.cpp.

References mVoltageIndex, and AbstractOdeSystem::rGetStateVariables().

Referenced by ComputeExceptVoltage().

unsigned AbstractCardiacCell::GetVoltageIndex (  ) 

Get the index of the transmembrane potential within our state variable vector.

Definition at line 87 of file AbstractCardiacCell.cpp.

References mVoltageIndex.

void AbstractCardiacCell::SetStimulusFunction ( boost::shared_ptr< AbstractStimulusFunction pStimulus  ) 

Set the intracellular stimulus. Shorthand for SetIntracellularStimulusFunction.

Parameters:
pStimulus new stimulus function

Definition at line 92 of file AbstractCardiacCell.cpp.

References SetIntracellularStimulusFunction().

double AbstractCardiacCell::GetStimulus ( double  time  ) 

void AbstractCardiacCell::SetIntracellularStimulusFunction ( boost::shared_ptr< AbstractStimulusFunction pStimulus  ) 

Set the intracellular stimulus.

Parameters:
pStimulus new stimulus function

Definition at line 102 of file AbstractCardiacCell.cpp.

References mpIntracellularStimulus.

Referenced by SetStimulusFunction().

double AbstractCardiacCell::GetIntracellularStimulus ( double  time  ) 

Get the value of the intracellular stimulus.

Parameters:
time the time at which to evaluate the stimulus

Definition at line 107 of file AbstractCardiacCell.cpp.

References mpIntracellularStimulus.

Referenced by GetStimulus().

double AbstractCardiacCell::GetIntracellularCalciumConcentration (  )  [virtual]

[Ca_i] is needed for mechanics, so we explcitly have a Get method (rather than use a get by name type method, to avoid inefficiency when using different cells types of cells). This method by defaults throws an exception, so should be implemented in the concrete class if IntracellularCalciumConcentration is one of the state variables

Reimplemented in BackwardEulerLuoRudyIModel1991, and LuoRudyIModel1991OdeSystem.

Definition at line 113 of file AbstractCardiacCell.cpp.

virtual void AbstractCardiacCell::VerifyStateVariables (  )  [inline, virtual]

Empty method which can be over-ridden in concrete cell class which should go through the current state vector and go range checking on the values (eg check that concentrations are positive and gating variables are between zero and one). This method is called in the ComputeExceptVoltage method.

Reimplemented in BackwardEulerLuoRudyIModel1991, DiFrancescoNoble1985OdeSystem, LuoRudyIModel1991OdeSystem, and TenTusscher2006OdeSystem.

Definition at line 203 of file AbstractCardiacCell.hpp.

Referenced by AbstractBackwardEulerCardiacCell< SIZE >::Compute(), ComputeExceptVoltage(), and AbstractBackwardEulerCardiacCell< SIZE >::ComputeExceptVoltage().

void AbstractCardiacCell::SetState ( CellModelState  state  )  [virtual]

This should be implemented by fast/slow cardiac cell subclasses, and

  • set the state
  • initialise the cell
  • SET mNumberOfStateVariables CORRECTLY (as this would not have been known in the constructor.
Note:
This must be implemented by fast/slow cardiac cell subclasses.
Parameters:
state whether this cell is in fast or slow mode.

Definition at line 122 of file AbstractCardiacCell.cpp.

void AbstractCardiacCell::SetSlowValues ( const std::vector< double > &  rSlowValues  )  [virtual]

Set the slow variables. Should only be valid in fast mode.

Note:
This must be implemented by fast/slow cardiac cell subclasses.
Parameters:
rSlowValues values for the slow variables

Definition at line 127 of file AbstractCardiacCell.cpp.

void AbstractCardiacCell::GetSlowValues ( std::vector< double > &  rSlowValues  )  [virtual]

Get the current values of the slow variables. Should only be valid in slow mode.

Note:
This must be implemented by fast/slow cardiac cell subclasses.
Parameters:
rSlowValues will be filled in with the values of the slow variables on return.

Definition at line 132 of file AbstractCardiacCell.cpp.

bool AbstractCardiacCell::IsFastOnly (  )  [virtual]

Get whether this cell is a fast or slow version.

Note:
This must be implemented by fast/slow cardiac cell subclasses.

Definition at line 137 of file AbstractCardiacCell.cpp.

void AbstractCardiacCell::AdjustOutOfRangeSlowValues ( std::vector< double > &  rSlowValues  )  [virtual]

In a multiscale simulation a cut-down cell model can be run:

  • fast values are calculated according to the CellML definition
  • slow values are interpolated on synchronisation time-steps. There's a chance that linear interpolation/extrapolation may push some gating variable out of the range [0, 1]. This method alters any values which are out-of-range.

Note:
This must be implemented by fast/slow cardiac cell subclasses.
Parameters:
rSlowValues A vector of the slow values for a particular cell after they have been interpolated from nearby coarse cells

Definition at line 147 of file AbstractCardiacCell.cpp.

unsigned AbstractCardiacCell::GetNumSlowValues (  )  [virtual]

Get the number of slow variables for the cell model (irrespective of whether in fast or slow mode).

Note:
This must be implemented by fast/slow cardiac cell subclasses.

Definition at line 142 of file AbstractCardiacCell.cpp.

const boost::shared_ptr< AbstractStimulusFunction > AbstractCardiacCell::GetStimulusFunction (  )  const

For boost archiving use only (that's why the 'consts' are required)

Returns:
The Intracellular stimulus pointer

Definition at line 154 of file AbstractCardiacCell.cpp.

References mpIntracellularStimulus.

const boost::shared_ptr< AbstractIvpOdeSolver > AbstractCardiacCell::GetSolver (  )  const

For boost archiving use only (that's why the 'consts' are required)

Returns:
pointer to the ODE solver being used

Definition at line 159 of file AbstractCardiacCell.cpp.

References mpOdeSolver.


Friends And Related Function Documentation

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


Member Data Documentation

unsigned AbstractCardiacCell::mVoltageIndex [protected]

The index of the voltage within our state variable vector.

Definition at line 87 of file AbstractCardiacCell.hpp.

Referenced by HodgkinHuxleySquidAxon1952OriginalOdeSystem::GetIIonic(), FitzHughNagumo1961OdeSystem::GetIIonic(), GetVoltage(), GetVoltageIndex(), and SetVoltage().

Pointer to the solver used to simulate this cell.

Definition at line 89 of file AbstractCardiacCell.hpp.

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

double AbstractCardiacCell::mDt [protected]

The intracellular stimulus current.

Definition at line 93 of file AbstractCardiacCell.hpp.

Referenced by GetIntracellularStimulus(), GetStimulusFunction(), and SetIntracellularStimulusFunction().


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

Generated on Tue Aug 4 16:10:31 2009 for Chaste by  doxygen 1.5.5