BackwardEulerFoxModel2002Modified.hpp

Go to the documentation of this file.
00001 #ifndef _BackwardEulerFoxModel2002Modified_
00002 #define _BackwardEulerFoxModel2002Modified_
00003 
00015 #include "ChasteSerialization.hpp"
00016 #include <boost/serialization/base_object.hpp>
00017 #include "AbstractBackwardEulerCardiacCell.hpp"
00018 #include "AbstractStimulusFunction.hpp"
00019 
00023 class BackwardEulerFoxModel2002Modified : public AbstractBackwardEulerCardiacCell<3>
00024 {
00025 private:
00027     friend class boost::serialization::access;
00034     template<class Archive>
00035     void serialize(Archive & archive, const unsigned int version)
00036     {
00037         // This calls serialize on the base class.
00038         archive & boost::serialization::base_object<AbstractBackwardEulerCardiacCell<3> >(*this);
00039     }
00040 public:
00041     BackwardEulerFoxModel2002Modified(boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus);
00042 
00046     BackwardEulerFoxModel2002Modified(boost::shared_ptr<AbstractIvpOdeSolver> /* unused */,
00047                                       boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus);
00048 
00049 
00050     ~BackwardEulerFoxModel2002Modified(void)
00051     {
00052     }
00053 
00054     double GetIIonic();
00055 
00056     void ComputeResidual(double var_environment__time, const double rCurrentGuess[3], double rResidual[3]);
00057 
00058     void ComputeJacobian(double var_environment__time, const double rCurrentGuess[3], double rJacobian[3][3]);
00059 
00060 protected:
00061     void UpdateTransmembranePotential(double var_environment__time);
00062 
00063     void ComputeOneStepExceptVoltage(double var_environment__time);
00064 };
00065 
00066 // Must be last
00067 #include "SerializationExportWrapper.hpp"
00068 CHASTE_CLASS_EXPORT(BackwardEulerFoxModel2002Modified)
00069 
00070 namespace boost
00071 {
00072 namespace serialization
00073 {
00078 template<class Archive>
00079 inline void save_construct_data(
00080     Archive & ar, const BackwardEulerFoxModel2002Modified * t, const unsigned int file_version)
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 
00094 template<class Archive>
00095 inline void load_construct_data(
00096     Archive & ar, BackwardEulerFoxModel2002Modified * t, const unsigned int file_version)
00097 {
00098     boost::shared_ptr<AbstractIvpOdeSolver> p_solver;
00099     boost::shared_ptr<AbstractStimulusFunction> p_stimulus;
00100     ar >> p_solver;
00101     ar >> p_stimulus;
00102     ::new(t)BackwardEulerFoxModel2002Modified(p_solver, p_stimulus);
00103 }
00104 }
00105 } // namespace ...
00106 
00107 #endif

Generated by  doxygen 1.6.2