#include <AbstractCardiacCellInterface.hpp>
Inherited by AbstractCardiacCell, and AbstractCvodeCell.
This class defines a common interface to AbstractCardiacCell and AbstractCvodeCell, primarily for the benefit of single-cell cardiac simulations, so that calling code doesn't need to know which solver is being used.
Strictly speaking this isn't an interface, since some methods have implementations defined. But the name AbstractCardiacCell was already taken.
Note that serialization is not defined for this class. AbstractCvodeCell does not have (or need) serialization at present, so adding serialization here would break archive backwards compatibility for little gain.
Definition at line 54 of file AbstractCardiacCellInterface.hpp.
AbstractCardiacCellInterface::AbstractCardiacCellInterface | ( | boost::shared_ptr< AbstractIvpOdeSolver > | pOdeSolver, | |
unsigned | voltageIndex, | |||
boost::shared_ptr< AbstractStimulusFunction > | pIntracellularStimulus | |||
) |
Create a new cardiac cell. The state variables of the cell will be set to AbstractOdeSystemInformation::GetInitialConditions(). Note that calls to SetDefaultInitialConditions() on a particular instance of this class will not modify its state variables. You can modify them directly with rGetStateVariables().
pOdeSolver | the ODE solver to use when simulating this cell (ignored for some subclasses; can be an empty pointer in these cases) | |
voltageIndex | the index of the transmembrane potential within the system; see mVoltageIndex | |
pIntracellularStimulus | the intracellular stimulus current |
Definition at line 36 of file AbstractCardiacCellInterface.cpp.
AbstractCardiacCellInterface::~AbstractCardiacCellInterface | ( | ) | [virtual] |
Virtual destructor
Definition at line 50 of file AbstractCardiacCellInterface.cpp.
virtual OdeSolution AbstractCardiacCellInterface::Compute | ( | double | tStart, | |
double | tEnd, | |||
double | tSamp = 0.0 | |||
) | [pure virtual] |
Simulates this cell's behaviour between the time interval [tStart, tEnd], and return state variable values. The timestep used will depend on the subclass implementation.
tStart | beginning of the time interval to simulate | |
tEnd | end of the time interval to simulate | |
tSamp | sampling interval for returned results (defaults to dt) |
Implemented in AbstractBackwardEulerCardiacCell< SIZE >, AbstractCardiacCell, AbstractCvodeCell, and AbstractRushLarsenCardiacCell.
virtual void AbstractCardiacCellInterface::ComputeExceptVoltage | ( | double | tStart, | |
double | tEnd | |||
) | [pure virtual] |
Simulates this cell's behaviour between the time interval [tStart, tEnd], but does not update the voltage. The timestep used will depend on the subclass implementation.
tStart | beginning of the time interval to simulate | |
tEnd | end of the time interval to simulate |
Implemented in AbstractBackwardEulerCardiacCell< SIZE >, AbstractCardiacCell, AbstractCvodeCell, AbstractRushLarsenCardiacCell, and FakeBathCell.
virtual double AbstractCardiacCellInterface::GetIIonic | ( | const std::vector< double > * | pStateVariables = NULL |
) | [pure virtual] |
Computes the total current flowing through the cell membrane, using the current values of the state variables.
Should return a value in units of microamps/cm^2. Note that many cell models do not use these dimensions (let alone these units) and so a complex conversion is required. There are 2 main cases:
Chaste's value for C_m can be obtained from HeartConfig::Instance()->GetCapacitance() and is measured in uF/cm^2.
pStateVariables | optionally can be supplied to evaluate the ionic current at the given state; by default the cell's internal state will be used. |
Implemented in FakeBathCell, FitzHughNagumo1961OdeSystem, CML_noble_varghese_kohl_noble_1998_basic_with_sac, CorriasBuistICCModified, and CorriasBuistSMCModified.
Referenced by MonodomainCorrectionTermAssembler< ELEM_DIM, SPACE_DIM >::ComputeVectorTerm(), and BidomainCorrectionTermAssembler< ELEM_DIM, SPACE_DIM >::ComputeVectorTerm().
Get the value of the intracellular stimulus. This will always be in units of uA/cm^2.
time | the time at which to evaluate the stimulus |
Definition at line 85 of file AbstractCardiacCellInterface.cpp.
References GetIntracellularStimulus(), HeartConfig::GetSurfaceAreaToVolumeRatio(), HeartConfig::Instance(), and mIsUsedInTissue.
Referenced by FitzHughNagumo1961OdeSystem::EvaluateYDerivatives().
Get the value of the intracellular stimulus. This will have units of uA/cm^2 for single-cell problems, or uA/cm^3 in a tissue simulation.
time | the time at which to evaluate the stimulus |
Definition at line 79 of file AbstractCardiacCellInterface.cpp.
References mpIntracellularStimulus.
Referenced by GetIntracellularAreaStimulus(), and GetStimulus().
virtual AbstractLookupTableCollection* AbstractCardiacCellInterface::GetLookupTableCollection | ( | ) | [inline, virtual] |
If this cell uses lookup tables, returns the singleton object containing the tables for this cell's concrete class. Otherwise, returns NULL.
Must be implemented by subclasses iff they support lookup tables.
Definition at line 228 of file AbstractCardiacCellInterface.hpp.
Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::CreateCellWithIntracellularStimulus().
const boost::shared_ptr< AbstractIvpOdeSolver > AbstractCardiacCellInterface::GetSolver | ( | ) | const |
For boost archiving use only (that's why the 'consts' are required)
Definition at line 127 of file AbstractCardiacCellInterface.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 67 of file AbstractCardiacCellInterface.cpp.
References GetIntracellularStimulus().
Referenced by CorriasBuistSMCModified::EvaluateYDerivatives(), CorriasBuistICCModified::EvaluateYDerivatives(), and CML_noble_varghese_kohl_noble_1998_basic_with_sac::EvaluateYDerivatives().
const boost::shared_ptr< AbstractStimulusFunction > AbstractCardiacCellInterface::GetStimulusFunction | ( | ) | const |
For boost archiving use only (that's why the 'consts' are required)
Definition at line 122 of file AbstractCardiacCellInterface.cpp.
References mpIntracellularStimulus.
boost::shared_ptr< AbstractStimulusFunction > AbstractCardiacCellInterface::GetStimulusFunction | ( | ) |
Definition at line 116 of file AbstractCardiacCellInterface.cpp.
References mpIntracellularStimulus.
virtual double AbstractCardiacCellInterface::GetVoltage | ( | ) | [pure virtual] |
Get the current value of the transmembrane potential, as given in our state variable vector.
Implemented in AbstractCardiacCell, and AbstractCvodeCell.
unsigned AbstractCardiacCellInterface::GetVoltageIndex | ( | ) |
Get the index of the transmembrane potential within this system. Usually it will be an index into the state variable vector, but this is not guaranteed. It will however always be suitable for use with AbstractParameterisedSystem::GetAnyVariable and OdeSolution::GetVariableAtIndex.
Definition at line 55 of file AbstractCardiacCellInterface.cpp.
References mVoltageIndex.
Referenced by AdaptiveBidomainProblem::AddCurrentSolutionToAdaptiveMesh(), AdaptiveBidomainProblem::InitializeSolutionOnAdaptedMesh(), and AbstractRushLarsenCardiacCell::UpdateTransmembranePotential().
bool AbstractCardiacCellInterface::HasCellMLDefaultStimulus | ( | ) |
Definition at line 111 of file AbstractCardiacCellInterface.cpp.
References mHasDefaultStimulusFromCellML.
void AbstractCardiacCellInterface::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
This is needed to register the base-derived relationship between this class and AbstractCardiacCell; however, serialization of our members is done by AbstractCardiacCell in order to maintain archive backwards compatibility more easily, since we never archive AbstractCvodeCell s.
archive | ||
version |
Reimplemented in AbstractBackwardEulerCardiacCell< SIZE >, AbstractCardiacCell, AbstractRushLarsenCardiacCell, FakeBathCell, CML_noble_varghese_kohl_noble_1998_basic_with_sac, CorriasBuistICCModified, and CorriasBuistSMCModified.
Definition at line 301 of file AbstractCardiacCellInterface.hpp.
void AbstractCardiacCellInterface::SetIntracellularStimulusFunction | ( | boost::shared_ptr< AbstractStimulusFunction > | pStimulus | ) |
Set the intracellular stimulus. This should have units of uA/cm^2 for single-cell problems, or uA/cm^3 in a tissue simulation.
pStimulus | new stimulus function |
Definition at line 73 of file AbstractCardiacCellInterface.cpp.
References mpIntracellularStimulus.
Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::SetCellIntracellularStimulus(), and SetStimulusFunction().
void AbstractCardiacCellInterface::SetStimulusFunction | ( | boost::shared_ptr< AbstractStimulusFunction > | pStimulus | ) |
Set the intracellular stimulus. Shorthand for SetIntracellularStimulusFunction.
pStimulus | new stimulus function |
Definition at line 61 of file AbstractCardiacCellInterface.cpp.
References SetIntracellularStimulusFunction().
virtual void AbstractCardiacCellInterface::SetTimestep | ( | double | dt | ) | [pure virtual] |
Set the timestep (or maximum timestep) to use for simulating this cell.
dt | the timestep |
Implemented in AbstractCardiacCell, and AbstractCvodeCell.
void AbstractCardiacCellInterface::SetUsedInTissueSimulation | ( | bool | tissue = true |
) |
Set whether this cell object exists in the context of a tissue simulation, or can be used for single cell simulations. This affects the units of the intracellular stimulus (see GetIntracellularStimulus) and so is used by GetIntracellularAreaStimulus to perform a units conversion if necessary.
tissue | true if cell is in a tissue |
Definition at line 100 of file AbstractCardiacCellInterface.cpp.
References mIsUsedInTissue.
virtual void AbstractCardiacCellInterface::SetVoltage | ( | double | voltage | ) | [pure virtual] |
Set the transmembrane potential
voltage | new value |
Implemented in AbstractCardiacCell, and AbstractCvodeCell.
void AbstractCardiacCellInterface::SetVoltageDerivativeToZero | ( | bool | clamp = true |
) | [virtual] |
Set whether to clamp the voltage by setting its derivative to zero.
clamp | whether to clamp |
Reimplemented in AbstractCvodeCell.
Definition at line 132 of file AbstractCardiacCellInterface.cpp.
References mSetVoltageDerivativeToZero.
Referenced by AbstractCardiacCell::ComputeExceptVoltage().
virtual void AbstractCardiacCellInterface::SolveAndUpdateState | ( | double | tStart, | |
double | tEnd | |||
) | [pure virtual] |
Simulate this cell's behaviour between the time interval [tStart, tEnd], updating the internal state variable values. The timestep used will depend on the subclass implementation.
tStart | beginning of the time interval to simulate | |
tEnd | end of the time interval to simulate |
Implemented in AbstractBackwardEulerCardiacCell< SIZE >, AbstractCardiacCell, AbstractCvodeCell, and AbstractRushLarsenCardiacCell.
void AbstractCardiacCellInterface::UseCellMLDefaultStimulus | ( | ) | [virtual] |
Use CellML metadata to set up the default stimulus for this cell. By default this method will always throw an exception. For suitably annotated models, PyCml will override this to provide a RegularStimulus as defined in the CellML.
Definition at line 105 of file AbstractCardiacCellInterface.cpp.
References EXCEPTION, and mHasDefaultStimulusFromCellML.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented in AbstractBackwardEulerCardiacCell< SIZE >, AbstractCardiacCell, AbstractRushLarsenCardiacCell, FakeBathCell, CML_noble_varghese_kohl_noble_1998_basic_with_sac, CorriasBuistICCModified, and CorriasBuistSMCModified.
Definition at line 290 of file AbstractCardiacCellInterface.hpp.
Whether this cell has a default stimulus specified by CellML metadata
Definition at line 286 of file AbstractCardiacCellInterface.hpp.
Referenced by HasCellMLDefaultStimulus(), AbstractCardiacCell::serialize(), and UseCellMLDefaultStimulus().
bool AbstractCardiacCellInterface::mIsUsedInTissue [protected] |
Whether this cell exists in a tissue, or is an isolated cell.
Definition at line 283 of file AbstractCardiacCellInterface.hpp.
Referenced by GetIntracellularAreaStimulus(), AbstractCardiacCell::serialize(), and SetUsedInTissueSimulation().
boost::shared_ptr<AbstractStimulusFunction> AbstractCardiacCellInterface::mpIntracellularStimulus [protected] |
The intracellular stimulus current.
Definition at line 273 of file AbstractCardiacCellInterface.hpp.
Referenced by GetIntracellularStimulus(), GetStimulusFunction(), and SetIntracellularStimulusFunction().
boost::shared_ptr<AbstractIvpOdeSolver> AbstractCardiacCellInterface::mpOdeSolver [protected] |
Pointer to the solver used to simulate this cell.
Definition at line 270 of file AbstractCardiacCellInterface.hpp.
Referenced by AbstractCardiacCell::Compute(), AbstractCardiacCell::ComputeExceptVoltage(), GetSolver(), and AbstractCardiacCell::SolveAndUpdateState().
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 280 of file AbstractCardiacCellInterface.hpp.
Referenced by AbstractRushLarsenCardiacCell::ComputeExceptVoltage(), CorriasBuistSMCModified::EvaluateYDerivatives(), CorriasBuistICCModified::EvaluateYDerivatives(), CML_noble_varghese_kohl_noble_1998_basic_with_sac::EvaluateYDerivatives(), FitzHughNagumo1961OdeSystem::EvaluateYDerivatives(), AbstractCardiacCell::serialize(), AbstractCvodeCell::SetVoltageDerivativeToZero(), and SetVoltageDerivativeToZero().
unsigned AbstractCardiacCellInterface::mVoltageIndex [protected] |
The index of the voltage within this system. Usually it will be an index into the state variable vector, but this is not guaranteed. It will however always be suitable for use with AbstractParameterisedSystem::GetAnyVariable and OdeSolution::GetVariableAtIndex.
Definition at line 267 of file AbstractCardiacCellInterface.hpp.
Referenced by FitzHughNagumo1961OdeSystem::GetIIonic(), AbstractCvodeCell::GetVoltage(), AbstractCardiacCell::GetVoltage(), GetVoltageIndex(), AbstractCvodeCell::SetVoltage(), and AbstractCardiacCell::SetVoltage().