36 #include "AbstractRushLarsenCardiacCell.hpp"
42 #include "OdeSolution.hpp"
43 #include "TimeStepper.hpp"
46 unsigned voltageIndex,
47 boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
49 numberOfStateVariables,
51 pIntracellularStimulus)
69 const unsigned n_steps = (
unsigned) floor((tEnd - tStart)/tSamp + 0.5);
70 assert(fabs(tStart+n_steps*tSamp - tEnd) < 1e-12);
71 const unsigned n_small_steps = (
unsigned) floor(tSamp/
mDt+0.5);
72 assert(fabs(
mDt*n_small_steps - tSamp) < 1e-12);
86 for (
unsigned i=0; i<n_steps; i++)
88 double curr_time = tStart;
89 for (
unsigned j=0; j<n_small_steps; j++)
91 curr_time = tStart + i*tSamp + j*
mDt;
void UpdateTransmembranePotential(const std::vector< double > &rDY)
std::vector< std::vector< double > > & rGetSolutions()
bool mSetVoltageDerivativeToZero
std::vector< double > & rGetStateVariables()
virtual void ComputeOneStepExceptVoltage(const std::vector< double > &rDY, const std::vector< double > &rAlphaOrTau, const std::vector< double > &rBetaOrInf)=0
void AdvanceOneTimeStep()
OdeSolution Compute(double tStart, double tEnd, double tSamp=0.0)
void SetOdeSystemInformation(boost::shared_ptr< const AbstractOdeSystemInformation > pOdeSystemInfo)
void ComputeExceptVoltage(double tStart, double tEnd)
virtual void VerifyStateVariables()
void SolveAndUpdateState(double tStart, double tEnd)
std::vector< double > & rGetTimes()
AbstractRushLarsenCardiacCell(unsigned numberOfStateVariables, unsigned voltageIndex, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus)
virtual void EvaluateEquations(double time, std::vector< double > &rDY, std::vector< double > &rAlphaOrTau, std::vector< double > &rBetaOrInf)=0
unsigned GetVoltageIndex()
boost::shared_ptr< AbstractOdeSystemInformation > mpSystemInfo
unsigned mNumberOfStateVariables
virtual ~AbstractRushLarsenCardiacCell()
void SetNumberOfTimeSteps(unsigned numTimeSteps)