#include <AbstractCardiacCell.hpp>
Inherits AbstractOdeSystem.
Inherited by AbstractBackwardEulerCardiacCell< SIZE >, AbstractBackwardEulerCardiacCell< 1 >, AbstractBackwardEulerCardiacCell< 12 >, AbstractBackwardEulerCardiacCell< 15 >, AbstractBackwardEulerCardiacCell< 3 >, AbstractBackwardEulerCardiacCell< 7 >, Cellluo_rudy_1991FromCellML, Cellluo_rudy_1991FromCellMLOpt, CellShannon2004FromCellML, CML_noble_varghese_kohl_noble_1998_basic, CML_noble_varghese_kohl_noble_1998_basic_pe_lut, DiFrancescoNoble1985OdeSystem, FaberRudy2000Version3, FaberRudy2000Version3Optimised, FakeBathCell, FitzHughNagumo1961OdeSystem, FoxModel2002Modified, HodgkinHuxleySquidAxon1952OriginalOdeSystem, LuoRudyIModel1991OdeSystem, Mahajan2008OdeSystem, Maleckar2009OdeSystem, and TenTusscher2006OdeSystem.
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 |
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.
AbstractCardiacCell::AbstractCardiacCell | ( | boost::shared_ptr< AbstractIvpOdeSolver > | pOdeSolver, | |
unsigned | numberOfStateVariables, | |||
unsigned | voltageIndex, | |||
boost::shared_ptr< AbstractStimulusFunction > | pIntracellularStimulus | |||
) |
Create a new cardiac cell.
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.
void AbstractCardiacCell::AdjustOutOfRangeSlowValues | ( | std::vector< double > & | rSlowValues | ) | [virtual] |
In a multiscale simulation a cut-down cell model can be run:
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.
OdeSolution AbstractCardiacCell::Compute | ( | double | tStart, | |
double | tEnd | |||
) | [virtual] |
Simulates this cell's behaviour between the time interval [tStart, tEnd], with timestep mDt.
tStart | beginning of the time interval to simulate | |
tEnd | end of the time interval to simulate |
Reimplemented in AbstractBackwardEulerCardiacCell< SIZE >, AbstractBackwardEulerCardiacCell< 12 >, AbstractBackwardEulerCardiacCell< 1 >, AbstractBackwardEulerCardiacCell< 15 >, AbstractBackwardEulerCardiacCell< 3 >, and AbstractBackwardEulerCardiacCell< 7 >.
Definition at line 58 of file AbstractCardiacCell.cpp.
References mDt, mpOdeSolver, and AbstractOdeSystem::rGetStateVariables().
Simulates this cell's behaviour between the time interval [tStart, tEnd], with timestep mDt, but does not update the voltage.
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 >, AbstractBackwardEulerCardiacCell< 15 >, AbstractBackwardEulerCardiacCell< 3 >, and AbstractBackwardEulerCardiacCell< 7 >.
Definition at line 64 of file AbstractCardiacCell.cpp.
References GetVoltage(), mDt, mpOdeSolver, mSetVoltageDerivativeToZero, SetVoltage(), and VerifyStateVariables().
virtual double AbstractCardiacCell::GetIIonic | ( | ) | [pure virtual] |
Computes the total current flowing through the cell membrane, using the current values of the state variables.
Implemented in Cellluo_rudy_1991FromCellML, CML_luo_rudy_1991_pe_lut_be, Cellluo_rudy_1991FromCellMLOpt, FakeBathCell, BackwardEulerFoxModel2002Modified, BackwardEulerLuoRudyIModel1991, BackwardEulerMahajanModel2008, BackwardEulerNobleVargheseKohlNoble1998, BackwardEulerTenTusscher2006, DiFrancescoNoble1985OdeSystem, FaberRudy2000Version3, FaberRudy2000Version3Optimised, FitzHughNagumo1961OdeSystem, FoxModel2002Modified, HodgkinHuxleySquidAxon1952OriginalOdeSystem, LuoRudyIModel1991OdeSystem, Mahajan2008OdeSystem, Maleckar2009OdeSystem, CML_noble_varghese_kohl_noble_1998_basic, CML_noble_varghese_kohl_noble_1998_basic_pe_lut, CellShannon2004FromCellML, and TenTusscher2006OdeSystem.
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.
Get the value of the intracellular stimulus.
time | the time at which to evaluate the stimulus |
Definition at line 107 of file AbstractCardiacCell.cpp.
References mpIntracellularStimulus.
Referenced by GetStimulus().
unsigned AbstractCardiacCell::GetNumSlowValues | ( | ) | [virtual] |
Get the number of slow variables for the cell model (irrespective of whether in fast or slow mode).
Definition at line 142 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.
rSlowValues | will be filled in with the values of the slow variables on return. |
Definition at line 132 of file AbstractCardiacCell.cpp.
const boost::shared_ptr< AbstractIvpOdeSolver > AbstractCardiacCell::GetSolver | ( | ) | const |
For boost archiving use only (that's why the 'consts' are required)
Definition at line 159 of file AbstractCardiacCell.cpp.
References mpOdeSolver.
Get the value of the intracellular stimulus. Shorthand for GetIntracellularStimulus.
time | the time at which to evaluate the stimulus |
Definition at line 97 of file AbstractCardiacCell.cpp.
References GetIntracellularStimulus().
Referenced by TenTusscher2006OdeSystem::EvaluateYDerivatives(), CellShannon2004FromCellML::EvaluateYDerivatives(), CML_noble_varghese_kohl_noble_1998_basic_pe_lut::EvaluateYDerivatives(), CML_noble_varghese_kohl_noble_1998_basic::EvaluateYDerivatives(), Maleckar2009OdeSystem::EvaluateYDerivatives(), Mahajan2008OdeSystem::EvaluateYDerivatives(), LuoRudyIModel1991OdeSystem::EvaluateYDerivatives(), HodgkinHuxleySquidAxon1952OriginalOdeSystem::EvaluateYDerivatives(), FoxModel2002Modified::EvaluateYDerivatives(), FitzHughNagumo1961OdeSystem::EvaluateYDerivatives(), FaberRudy2000Version3Optimised::EvaluateYDerivatives(), FaberRudy2000Version3::EvaluateYDerivatives(), DiFrancescoNoble1985OdeSystem::EvaluateYDerivatives(), Cellluo_rudy_1991FromCellMLOpt::EvaluateYDerivatives(), Cellluo_rudy_1991FromCellML::EvaluateYDerivatives(), BackwardEulerTenTusscher2006::UpdateTransmembranePotential(), BackwardEulerNobleVargheseKohlNoble1998::UpdateTransmembranePotential(), BackwardEulerMahajanModel2008::UpdateTransmembranePotential(), BackwardEulerLuoRudyIModel1991::UpdateTransmembranePotential(), BackwardEulerFoxModel2002Modified::UpdateTransmembranePotential(), and CML_luo_rudy_1991_pe_lut_be::UpdateTransmembranePotential().
const boost::shared_ptr< AbstractStimulusFunction > AbstractCardiacCell::GetStimulusFunction | ( | ) | const |
For boost archiving use only (that's why the 'consts' are required)
Definition at line 154 of file AbstractCardiacCell.cpp.
References mpIntracellularStimulus.
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::Init | ( | ) |
Initialise the cell:
Reimplemented in BackwardEulerLuoRudyIModel1991.
Definition at line 52 of file AbstractCardiacCell.cpp.
References AbstractOdeSystem::GetInitialConditions(), and AbstractOdeSystem::SetStateVariables().
Referenced by BackwardEulerFoxModel2002Modified::BackwardEulerFoxModel2002Modified(), DiFrancescoNoble1985OdeSystem::DiFrancescoNoble1985OdeSystem(), FaberRudy2000Version3::FaberRudy2000Version3(), FitzHughNagumo1961OdeSystem::FitzHughNagumo1961OdeSystem(), FoxModel2002Modified::FoxModel2002Modified(), HodgkinHuxleySquidAxon1952OriginalOdeSystem::HodgkinHuxleySquidAxon1952OriginalOdeSystem(), LuoRudyIModel1991OdeSystem::LuoRudyIModel1991OdeSystem(), Mahajan2008OdeSystem::Mahajan2008OdeSystem(), Maleckar2009OdeSystem::Maleckar2009OdeSystem(), and TenTusscher2006OdeSystem::TenTusscher2006OdeSystem().
bool AbstractCardiacCell::IsFastOnly | ( | ) | [virtual] |
Get whether this cell is a fast or slow version.
Definition at line 137 of file AbstractCardiacCell.cpp.
void AbstractCardiacCell::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the member variables.
archive | ||
version |
Reimplemented from AbstractOdeSystem.
Reimplemented in AbstractBackwardEulerCardiacCell< SIZE >, Cellluo_rudy_1991FromCellML, CML_luo_rudy_1991_pe_lut_be, Cellluo_rudy_1991FromCellMLOpt, FakeBathCell, BackwardEulerFoxModel2002Modified, BackwardEulerLuoRudyIModel1991, BackwardEulerMahajanModel2008, BackwardEulerNobleVargheseKohlNoble1998, BackwardEulerTenTusscher2006, FaberRudy2000Version3, LuoRudyIModel1991OdeSystem, Maleckar2009OdeSystem, CML_noble_varghese_kohl_noble_1998_basic, CellShannon2004FromCellML, AbstractBackwardEulerCardiacCell< 12 >, AbstractBackwardEulerCardiacCell< 1 >, AbstractBackwardEulerCardiacCell< 15 >, AbstractBackwardEulerCardiacCell< 3 >, and AbstractBackwardEulerCardiacCell< 7 >.
Definition at line 74 of file AbstractCardiacCell.hpp.
References mDt, and mSetVoltageDerivativeToZero.
void AbstractCardiacCell::SetIntracellularStimulusFunction | ( | boost::shared_ptr< AbstractStimulusFunction > | pStimulus | ) |
Set the intracellular stimulus.
pStimulus | new stimulus function |
Definition at line 102 of file AbstractCardiacCell.cpp.
References mpIntracellularStimulus.
Referenced by SetStimulusFunction().
void AbstractCardiacCell::SetSlowValues | ( | const std::vector< double > & | rSlowValues | ) | [virtual] |
Set the slow variables. Should only be valid in fast mode.
rSlowValues | values for the slow variables |
Definition at line 127 of file AbstractCardiacCell.cpp.
void AbstractCardiacCell::SetState | ( | CellModelState | state | ) | [virtual] |
This should be implemented by fast/slow cardiac cell subclasses, and
state | whether this cell is in fast or slow mode. |
Definition at line 122 of file AbstractCardiacCell.cpp.
void AbstractCardiacCell::SetStimulusFunction | ( | boost::shared_ptr< AbstractStimulusFunction > | pStimulus | ) |
Set the intracellular stimulus. Shorthand for SetIntracellularStimulusFunction.
pStimulus | new stimulus function |
Definition at line 92 of file AbstractCardiacCell.cpp.
References SetIntracellularStimulusFunction().
void AbstractCardiacCell::SetVoltage | ( | double | voltage | ) |
Set the transmembrane potential
voltage | new value |
Definition at line 77 of file AbstractCardiacCell.cpp.
References mVoltageIndex, and AbstractOdeSystem::rGetStateVariables().
Referenced by ComputeExceptVoltage().
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 Cellluo_rudy_1991FromCellML, CML_luo_rudy_1991_pe_lut_be, Cellluo_rudy_1991FromCellMLOpt, BackwardEulerLuoRudyIModel1991, BackwardEulerMahajanModel2008, BackwardEulerNobleVargheseKohlNoble1998, BackwardEulerTenTusscher2006, DiFrancescoNoble1985OdeSystem, LuoRudyIModel1991OdeSystem, Maleckar2009OdeSystem, and TenTusscher2006OdeSystem.
Definition at line 203 of file AbstractCardiacCell.hpp.
Referenced by AbstractBackwardEulerCardiacCell< SIZE >::Compute(), ComputeExceptVoltage(), and AbstractBackwardEulerCardiacCell< SIZE >::ComputeExceptVoltage().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractOdeSystem.
Reimplemented in AbstractBackwardEulerCardiacCell< SIZE >, Cellluo_rudy_1991FromCellML, CML_luo_rudy_1991_pe_lut_be, Cellluo_rudy_1991FromCellMLOpt, FakeBathCell, BackwardEulerFoxModel2002Modified, BackwardEulerLuoRudyIModel1991, BackwardEulerMahajanModel2008, BackwardEulerNobleVargheseKohlNoble1998, BackwardEulerTenTusscher2006, FaberRudy2000Version3, LuoRudyIModel1991OdeSystem, Maleckar2009OdeSystem, CML_noble_varghese_kohl_noble_1998_basic, CellShannon2004FromCellML, AbstractBackwardEulerCardiacCell< 12 >, AbstractBackwardEulerCardiacCell< 1 >, AbstractBackwardEulerCardiacCell< 15 >, AbstractBackwardEulerCardiacCell< 3 >, and AbstractBackwardEulerCardiacCell< 7 >.
Definition at line 66 of file AbstractCardiacCell.hpp.
double AbstractCardiacCell::mDt [protected] |
The timestep to use when simulating this cell. Set from the HeartConfig object.
Definition at line 91 of file AbstractCardiacCell.hpp.
Referenced by Compute(), AbstractBackwardEulerCardiacCell< SIZE >::Compute(), ComputeExceptVoltage(), AbstractBackwardEulerCardiacCell< SIZE >::ComputeExceptVoltage(), BackwardEulerLuoRudyIModel1991::ComputeJacobian(), BackwardEulerTenTusscher2006::ComputeOneStepExceptVoltage(), BackwardEulerNobleVargheseKohlNoble1998::ComputeOneStepExceptVoltage(), BackwardEulerMahajanModel2008::ComputeOneStepExceptVoltage(), BackwardEulerLuoRudyIModel1991::ComputeOneStepExceptVoltage(), BackwardEulerFoxModel2002Modified::ComputeOneStepExceptVoltage(), CML_luo_rudy_1991_pe_lut_be::ComputeOneStepExceptVoltage(), BackwardEulerLuoRudyIModel1991::ComputeResidual(), serialize(), BackwardEulerTenTusscher2006::UpdateTransmembranePotential(), BackwardEulerNobleVargheseKohlNoble1998::UpdateTransmembranePotential(), BackwardEulerMahajanModel2008::UpdateTransmembranePotential(), BackwardEulerLuoRudyIModel1991::UpdateTransmembranePotential(), BackwardEulerFoxModel2002Modified::UpdateTransmembranePotential(), and CML_luo_rudy_1991_pe_lut_be::UpdateTransmembranePotential().
boost::shared_ptr<AbstractStimulusFunction> AbstractCardiacCell::mpIntracellularStimulus [protected] |
The intracellular stimulus current.
Definition at line 93 of file AbstractCardiacCell.hpp.
Referenced by GetIntracellularStimulus(), GetStimulusFunction(), and SetIntracellularStimulusFunction().
boost::shared_ptr<AbstractIvpOdeSolver> AbstractCardiacCell::mpOdeSolver [protected] |
Pointer to the solver used to simulate this cell.
Definition at line 89 of file AbstractCardiacCell.hpp.
Referenced by Compute(), ComputeExceptVoltage(), and GetSolver().
bool AbstractCardiacCell::mSetVoltageDerivativeToZero [protected] |
Flag set to true if ComputeExceptVoltage is called, to indicate to subclass EvaluateYDerivatives methods that V should be considered fixed, and hence dV/dt set to zero.
Definition at line 100 of file AbstractCardiacCell.hpp.
Referenced by ComputeExceptVoltage(), TenTusscher2006OdeSystem::EvaluateYDerivatives(), CellShannon2004FromCellML::EvaluateYDerivatives(), CML_noble_varghese_kohl_noble_1998_basic_pe_lut::EvaluateYDerivatives(), CML_noble_varghese_kohl_noble_1998_basic::EvaluateYDerivatives(), Maleckar2009OdeSystem::EvaluateYDerivatives(), Mahajan2008OdeSystem::EvaluateYDerivatives(), LuoRudyIModel1991OdeSystem::EvaluateYDerivatives(), HodgkinHuxleySquidAxon1952OriginalOdeSystem::EvaluateYDerivatives(), FoxModel2002Modified::EvaluateYDerivatives(), FitzHughNagumo1961OdeSystem::EvaluateYDerivatives(), FaberRudy2000Version3Optimised::EvaluateYDerivatives(), FaberRudy2000Version3::EvaluateYDerivatives(), DiFrancescoNoble1985OdeSystem::EvaluateYDerivatives(), Cellluo_rudy_1991FromCellMLOpt::EvaluateYDerivatives(), Cellluo_rudy_1991FromCellML::EvaluateYDerivatives(), and serialize().
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().