BackwardEulerMahajanModel2008.hpp

Go to the documentation of this file.
00001 #ifndef BackwardEulerMahajanModel2008_HPP_
00002 #define BackwardEulerMahajanModel2008_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 BackwardEulerMahajanModel2008 : public AbstractBackwardEulerCardiacCell<15>
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<15> >(*this);
00028     }
00029 
00030 
00031 public:
00032     BackwardEulerMahajanModel2008(boost::shared_ptr<AbstractIvpOdeSolver> /* unused; should be empty */, boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus);
00033     ~BackwardEulerMahajanModel2008();
00034     void VerifyStateVariables();
00035     double GetIIonic();
00036     void ComputeResidual(double var_environment__time, const double rCurrentGuess[15], double rResidual[15]);
00037     void ComputeJacobian(double var_environment__time, const double rCurrentGuess[15], double rJacobian[15][15]);
00038     void UpdateTransmembranePotential(double var_Environment__time);
00039     void ComputeOneStepExceptVoltage(double var_Environment__time);
00040 };
00041 
00042 
00043 // Needs to be included last
00044 #include "SerializationExportWrapper.hpp"
00045 CHASTE_CLASS_EXPORT(BackwardEulerMahajanModel2008)
00046 
00047 namespace boost
00048 {
00049     namespace serialization
00050     {
00051         template<class Archive>
00052         inline void save_construct_data(
00053             Archive & ar, const BackwardEulerMahajanModel2008 * t, const unsigned int fileVersion)
00054         {
00055             const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver();
00056             const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction();
00057             ar << p_solver;
00058             ar << p_stimulus;
00059         }
00060 
00061         template<class Archive>
00062         inline void load_construct_data(
00063             Archive & ar, BackwardEulerMahajanModel2008 * t, const unsigned int fileVersion)
00064         {
00065             boost::shared_ptr<AbstractIvpOdeSolver> p_solver;
00066             boost::shared_ptr<AbstractStimulusFunction> p_stimulus;
00067             ar >> p_solver;
00068             ar >> p_stimulus;
00069             ::new(t)BackwardEulerMahajanModel2008(p_solver, p_stimulus);
00070         }
00071 
00072     }
00073 
00074 }
00075 
00076 #endif // BackwardEulerMahajanModel2008_HPP_

Generated by  doxygen 1.6.2