BackwardEulerTenTusscher2006.hpp

Go to the documentation of this file.
00001 #ifndef BACKWARDEULERTENTUSSCHER2006_HPP_
00002 #define BACKWARDEULERTENTUSSCHER2006_HPP_
00003 
00020 
00021 #include "ChasteSerialization.hpp"
00022 #include <boost/serialization/base_object.hpp>
00023 #include "AbstractBackwardEulerCardiacCell.hpp"
00024 #include "AbstractStimulusFunction.hpp"
00025 
00026 class BackwardEulerTenTusscher2006 : public AbstractBackwardEulerCardiacCell<7>
00027 {
00028     friend class boost::serialization::access;
00029     template<class Archive>
00030     void serialize(Archive & archive, const unsigned int version)
00031     {
00032         archive & boost::serialization::base_object<AbstractBackwardEulerCardiacCell<7> >(*this);
00033     }
00034     
00035     // 
00036     // Settable parameters and readable variables
00037     // 
00038     double var_membrane__i_Stim;
00039     double var_membrane__i_K1;
00040     double var_membrane__i_to;
00041     double var_membrane__i_Kr;
00042     double var_membrane__i_Ks;
00043     double var_membrane__i_CaL;
00044     double var_membrane__i_NaK;
00045     double var_membrane__i_Na;
00046     double var_membrane__i_b_Na;
00047     double var_membrane__i_NaCa;
00048     double var_membrane__i_b_Ca;
00049     double var_membrane__i_p_K;
00050     double var_membrane__i_p_Ca;
00051     
00052 public:
00053     double Get_membrane__i_Stim();
00054     double Get_membrane__i_K1();
00055     double Get_membrane__i_to();
00056     double Get_membrane__i_Kr();
00057     double Get_membrane__i_Ks();
00058     double Get_membrane__i_CaL();
00059     double Get_membrane__i_NaK();
00060     double Get_membrane__i_Na();
00061     double Get_membrane__i_b_Na();
00062     double Get_membrane__i_NaCa();
00063     double Get_membrane__i_b_Ca();
00064     double Get_membrane__i_p_K();
00065     double Get_membrane__i_p_Ca();
00066     BackwardEulerTenTusscher2006(boost::shared_ptr<AbstractIvpOdeSolver> /* unused; should be empty */, boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus);
00067     ~BackwardEulerTenTusscher2006();
00068     
00069 private:
00070     // Lookup table indices
00071     unsigned _table_index_0;
00072     double _factor_0;
00073     double* _lt_0_row;
00074     
00075     
00076 public:
00077     void VerifyStateVariables();
00078     double GetIIonic();
00079     void ComputeResidual(double var_environment__time, const double rCurrentGuess[7], double rResidual[7]);
00080     void ComputeJacobian(double var_environment__time, const double rCurrentGuess[7], double rJacobian[7][7]);
00081 protected:
00082     void UpdateTransmembranePotential(double var_environment__time);
00083     void ComputeOneStepExceptVoltage(double var_environment__time);
00084 };
00085 
00086 
00087 // Needs to be included last
00088 #include "SerializationExportWrapper.hpp"
00089 CHASTE_CLASS_EXPORT(BackwardEulerTenTusscher2006)
00090 
00091 namespace boost
00092 {
00093     namespace serialization
00094     {
00095         template<class Archive>
00096         inline void save_construct_data(
00097             Archive & ar, const BackwardEulerTenTusscher2006 * t, const unsigned int fileVersion)
00098         {
00099             const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver();
00100             const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction();
00101             ar << p_solver;
00102             ar << p_stimulus;
00103         }
00104         
00105         template<class Archive>
00106         inline void load_construct_data(
00107             Archive & ar, BackwardEulerTenTusscher2006 * t, const unsigned int fileVersion)
00108         {
00109             boost::shared_ptr<AbstractIvpOdeSolver> p_solver;
00110             boost::shared_ptr<AbstractStimulusFunction> p_stimulus;
00111             ar >> p_solver;
00112             ar >> p_stimulus;
00113             ::new(t)BackwardEulerTenTusscher2006(p_solver, p_stimulus);
00114         }
00115         
00116     }
00117     
00118 }
00119 
00120 #endif // BACKWARDEULERTENTUSSCHER2006_HPP_

Generated by  doxygen 1.6.2