AbstractBackwardEulerCardiacCell (unsigned numberOfStateVariables, unsigned voltageIndex, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus)
virtual ~AbstractBackwardEulerCardiacCell ()
virtual void ComputeResidual (double time, const double rCurrentGuess[SIZE], double rResidual[SIZE])=0
virtual void ComputeJacobian (double time, const double rCurrentGuess[SIZE], double rJacobian[SIZE][SIZE])=0
OdeSolution Compute (double tStart, double tEnd, double tSamp=0.0)
void ComputeExceptVoltage (double tStart, double tEnd)
void SolveAndUpdateState (double tStart, double tEnd)
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< double > GetStdVecStateVariables ()
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 ()
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< RegularStimulus > UseCellMLDefaultStimulus ()
bool HasCellMLDefaultStimulus ()
virtual AbstractLookupTableCollection * GetLookupTableCollection ()
boost::shared_ptr< AbstractStimulusFunction > GetStimulusFunction ()
const boost::shared_ptr< AbstractStimulusFunction > GetStimulusFunction () const
const boost::shared_ptr< AbstractIvpOdeSolver > GetSolver () 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 ()
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
AbstractParameterisedSystem (unsigned numberOfStateVariables)
std::vector< double > & rGetStateVariables ()
std::vector< double > GetStateVariables ()
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< double > GetInitialConditions () 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< double > ComputeDerivedQuantities (double time, const std::vector< double > &rState)
std::vector< double > ComputeDerivedQuantitiesFromCurrentState (double time)
AbstractUntemplatedParameterisedSystem (unsigned numberOfStateVariables)
virtual ~AbstractUntemplatedParameterisedSystem ()
boost::shared_ptr< const AbstractOdeSystemInformation > GetSystemInformation () 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
template<
unsigned SIZE>
class AbstractBackwardEulerCardiacCell< SIZE >
This is the base class for cardiac cells solved using a (decoupled) backward Euler approach (see http://dx.doi.org/10.1109/TBME.2006.879425 ).
The basic approach to solving such models is:
Update the transmembrane potential, either from solving an external PDE, or using a forward Euler step.
Update any gating variables (or similar) using a backward euler step. Suitable ODEs can be written in the form . The update expression is then .
Update the remaining state variables using Newton's method to solve the nonlinear system . The template parameter to the class specifies the size of this nonlinear system.
Definition at line 67 of file AbstractBackwardEulerCardiacCell.hpp .