luo_rudy_1991BackwardEuler.hpp

Go to the documentation of this file.
00001 #ifndef CML_LUO_RUDY_1991_PE_LUT_BE_HPP_
00002 #define CML_LUO_RUDY_1991_PE_LUT_BE_HPP_
00003 
00015 
00016 #include "ChasteSerialization.hpp"
00017 #include <boost/serialization/base_object.hpp>
00018 #include "AbstractBackwardEulerCardiacCell.hpp"
00019 #include "AbstractStimulusFunction.hpp"
00020 
00021 class CML_luo_rudy_1991_pe_lut_be : public AbstractBackwardEulerCardiacCell<1>
00022 {
00023     friend class boost::serialization::access;
00024     template<class Archive>
00025     void serialize(Archive & archive, const unsigned int version)
00026     {
00027         archive & boost::serialization::base_object<AbstractBackwardEulerCardiacCell<1> >(*this);
00028     }
00029     
00030     // 
00031     // Settable parameters and readable variables
00032     // 
00033     double var_membrane__I_stim;
00034     double var_membrane__i_Na;
00035     double var_membrane__i_si;
00036     double var_membrane__i_K;
00037     double var_membrane__i_K1;
00038     double var_membrane__i_Kp;
00039     double var_membrane__i_b;
00040     
00041 public:
00042     double Get_membrane__I_stim();
00043     double Get_membrane__i_Na();
00044     double Get_membrane__i_si();
00045     double Get_membrane__i_K();
00046     double Get_membrane__i_K1();
00047     double Get_membrane__i_Kp();
00048     double Get_membrane__i_b();
00049     CML_luo_rudy_1991_pe_lut_be(boost::shared_ptr<AbstractIvpOdeSolver> /* unused; should be empty */, boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus);
00050     ~CML_luo_rudy_1991_pe_lut_be();
00051     
00052 private:
00053     // Lookup table indices
00054     unsigned _table_index_0;
00055     double _factor_0;
00056     double* _lt_0_row;
00057     
00058     
00059 public:
00060     void VerifyStateVariables();
00061     double GetIIonic();
00062     void ComputeResidual(double var_environment__time, const double rCurrentGuess[1], double rResidual[1]);
00063     void ComputeJacobian(double var_environment__time, const double rCurrentGuess[1], double rJacobian[1][1]);
00064 protected:
00065     void UpdateTransmembranePotential(double var_environment__time);
00066     void ComputeOneStepExceptVoltage(double var_environment__time);
00067 };
00068 
00069 
00070 // Needs to be included last
00071 #include "SerializationExportWrapper.hpp"
00072 CHASTE_CLASS_EXPORT(CML_luo_rudy_1991_pe_lut_be)
00073 
00074 namespace boost
00075 {
00076     namespace serialization
00077     {
00078         template<class Archive>
00079         inline void save_construct_data(
00080             Archive & ar, const CML_luo_rudy_1991_pe_lut_be * t, const unsigned int fileVersion)
00081         {
00082             const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver();
00083             const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction();
00084             ar << p_solver;
00085             ar << p_stimulus;
00086         }
00087         
00088         template<class Archive>
00089         inline void load_construct_data(
00090             Archive & ar, CML_luo_rudy_1991_pe_lut_be * t, const unsigned int fileVersion)
00091         {
00092             boost::shared_ptr<AbstractIvpOdeSolver> p_solver;
00093             boost::shared_ptr<AbstractStimulusFunction> p_stimulus;
00094             ar >> p_solver;
00095             ar >> p_stimulus;
00096             ::new(t)CML_luo_rudy_1991_pe_lut_be(p_solver, p_stimulus);
00097         }
00098         
00099     }
00100     
00101 }
00102 
00103 #endif // CML_LUO_RUDY_1991_PE_LUT_BE_HPP_

Generated by  doxygen 1.6.2