40#include "AbstractCvodeCellWithDataClamp.hpp"
42#include "HeartConfig.hpp"
48 unsigned numberOfStateVariables,
49 unsigned voltageIndex,
50 boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
51 :
AbstractCvodeCell(pSolver, numberOfStateVariables, voltageIndex, pIntracellularStimulus),
52 mDataAvailable(false),
62 std::vector<double> experimentalVoltages)
64 assert(experimentalVoltages.size()==experimentalTimes.size());
65 assert(experimentalVoltages.size()>1u);
81 EXCEPTION(
"The requested time " << rTime <<
" is outside the times stored in the data clamp.");
95 assert(upper_index>0u);
104 double increment = rTime - lower_time;
112 this->
SetParameter(
"membrane_data_clamp_current_conductance",0);
120 EXCEPTION(
"Before calling TurnOnDataClamp(), please provide experimental data via the SetExperimentalData() method.");
123 this->
SetParameter(
"membrane_data_clamp_current_conductance", conductance);
const double DOUBLE_UNSET
#define EXCEPTION(message)
std::vector< double > mExperimentalTimes
virtual ~AbstractCvodeCellWithDataClamp()
void SetExperimentalData(std::vector< double > experimentalTimes, std::vector< double > experimentalVoltages)
double GetExperimentalVoltageAtTimeT(const double &rTime)
void TurnOnDataClamp(double conductance=100)
std::vector< double > mExperimentalVoltages
AbstractCvodeCellWithDataClamp(boost::shared_ptr< AbstractIvpOdeSolver > pSolver, unsigned numberOfStateVariables, unsigned voltageIndex, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus)
void SetParameter(const std::string &rParameterName, double value)