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;
bool mSetVoltageDerivativeToZero
unsigned GetVoltageIndex()
virtual void VerifyStateVariables()
std::vector< double > & rGetStateVariables()
virtual void ComputeOneStepExceptVoltage(const std::vector< double > &rDY, const std::vector< double > &rAlphaOrTau, const std::vector< double > &rBetaOrInf)=0
OdeSolution Compute(double tStart, double tEnd, double tSamp=0.0)
AbstractRushLarsenCardiacCell(unsigned numberOfStateVariables, unsigned voltageIndex, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus)
void SolveAndUpdateState(double tStart, double tEnd)
virtual void EvaluateEquations(double time, std::vector< double > &rDY, std::vector< double > &rAlphaOrTau, std::vector< double > &rBetaOrInf)=0
virtual ~AbstractRushLarsenCardiacCell()
void UpdateTransmembranePotential(const std::vector< double > &rDY)
void ComputeExceptVoltage(double tStart, double tEnd)
unsigned mNumberOfStateVariables
boost::shared_ptr< AbstractOdeSystemInformation > mpSystemInfo
void SetNumberOfTimeSteps(unsigned numTimeSteps)
std::vector< std::vector< double > > & rGetSolutions()
std::vector< double > & rGetTimes()
void SetOdeSystemInformation(boost::shared_ptr< const AbstractOdeSystemInformation > pOdeSystemInfo)
void AdvanceOneTimeStep()