BackwardEulerLuoRudyIModel1991.hpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _BACKWARDEULERLUORUDYIMODEL1991_HPP_
00029 #define _BACKWARDEULERLUORUDYIMODEL1991_HPP_
00030
00031 #include "ChasteSerialization.hpp"
00032 #include <boost/serialization/base_object.hpp>
00033
00034 #include "AbstractStimulusFunction.hpp"
00035 #include "AbstractBackwardEulerCardiacCell.hpp"
00036
00037 #include <vector>
00038
00043 class BackwardEulerLuoRudyIModel1991 : public AbstractBackwardEulerCardiacCell<1>
00044 {
00045 private:
00047 friend class boost::serialization::access;
00054 template<class Archive>
00055 void serialize(Archive & archive, const unsigned int version)
00056 {
00057
00058 archive & boost::serialization::base_object<AbstractBackwardEulerCardiacCell<1> >(*this);
00059 }
00060
00061
00062
00063 static const double membrane_C;
00064 static const double membrane_F;
00065 static const double membrane_R;
00066 static const double membrane_T;
00067 static const double background_current_E_b;
00068 static const double background_current_g_b;
00069 static const double fast_sodium_current_g_Na;
00070 static const double ionic_concentrations_Ki;
00071 static const double ionic_concentrations_Ko;
00072 static const double ionic_concentrations_Nai;
00073 static const double ionic_concentrations_Nao;
00074 static const double plateau_potassium_current_g_Kp;
00075 static const double time_dependent_potassium_current_PR_NaK;
00078 double fast_sodium_current_E_Na;
00079
00080
00081 public:
00087 BackwardEulerLuoRudyIModel1991(boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus);
00088
00094 BackwardEulerLuoRudyIModel1991(boost::shared_ptr<AbstractIvpOdeSolver> ,
00095 boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus);
00096
00100 ~BackwardEulerLuoRudyIModel1991();
00101
00105 void Init();
00106
00107 protected:
00114 void ComputeOneStepExceptVoltage(double tStart);
00115
00121 void UpdateTransmembranePotential(double time);
00122
00123 public:
00131 void ComputeResidual(double var_environment__time, const double rCurrentGuess[1], double rResidual[1]);
00132
00140 void ComputeJacobian(double var_environment__time, const double rCurrentGuess[1], double rJacobian[1][1]);
00141
00146 double GetIIonic();
00147
00152 void VerifyStateVariables();
00153
00157 double GetIntracellularCalciumConcentration();
00158 };
00159
00160 #include "SerializationExportWrapper.hpp"
00161 CHASTE_CLASS_EXPORT(BackwardEulerLuoRudyIModel1991)
00162
00163 namespace boost
00164 {
00165 namespace serialization
00166 {
00171 template<class Archive>
00172 inline void save_construct_data(
00173 Archive & ar, const BackwardEulerLuoRudyIModel1991 * t, const unsigned int file_version)
00174 {
00175 const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver();
00176 const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction();
00177 ar << p_solver;
00178 ar << p_stimulus;
00179 }
00180
00187 template<class Archive>
00188 inline void load_construct_data(
00189 Archive & ar, BackwardEulerLuoRudyIModel1991 * t, const unsigned int file_version)
00190 {
00191 boost::shared_ptr<AbstractIvpOdeSolver> p_solver;
00192 boost::shared_ptr<AbstractStimulusFunction> p_stimulus;
00193 ar >> p_solver;
00194 ar >> p_stimulus;
00195 ::new(t)BackwardEulerLuoRudyIModel1991(p_solver, p_stimulus);
00196 }
00197 }
00198 }
00199
00200 #endif // _BACKWARDEULERLUORUDYIMODEL1991_HPP_