42#include "AbstractCvodeCellWithDataClamp.hpp"
44#include "HeartConfig.hpp"
50 unsigned numberOfStateVariables,
51 unsigned voltageIndex,
52 boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus)
53 :
AbstractCvodeCell(pSolver, numberOfStateVariables, voltageIndex, pIntracellularStimulus),
54 mDataAvailable(false),
64 std::vector<double> experimentalVoltages)
66 assert(experimentalVoltages.size()==experimentalTimes.size());
67 assert(experimentalVoltages.size()>1u);
83 EXCEPTION(
"The requested time " << rTime <<
" is outside the times stored in the data clamp.");
86 std::vector<double>::iterator upper_vec =
98 assert(upper_index>0u);
107 double increment = rTime - lower_time;
115 this->
SetParameter(
"membrane_data_clamp_current_conductance",0);
123 EXCEPTION(
"Before calling TurnOnDataClamp(), please provide experimental data via the SetExperimentalData() method.");
126 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)