FakeBathCell.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
00029
00030
00031
00032
00033
00034
00035 #ifndef FAKEBATHCELL_HPP_
00036 #define FAKEBATHCELL_HPP_
00037
00038 #include "ChasteSerialization.hpp"
00039 #include <boost/serialization/base_object.hpp>
00040
00041 #include "AbstractCardiacCell.hpp"
00042 #include "AbstractStimulusFunction.hpp"
00043 #include <vector>
00044
00052 class FakeBathCell : public AbstractCardiacCell
00053 {
00054 private:
00056 friend class boost::serialization::access;
00063 template<class Archive>
00064 void serialize(Archive & archive, const unsigned int version)
00065 {
00066 archive & boost::serialization::base_object<AbstractCardiacCell>(*this);
00067
00068 this->mNumberOfStateVariables = 1;
00069 }
00070
00071 public:
00078 FakeBathCell(boost::shared_ptr<AbstractIvpOdeSolver> pSolver,
00079 boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus);
00080
00084 ~FakeBathCell();
00085
00094 void EvaluateYDerivatives(double time, const std::vector<double> &rY, std::vector<double> &rDY);
00095
00102 double GetIIonic(const std::vector<double>* pStateVariables=NULL);
00103
00110 void ComputeExceptVoltage(double tStart, double tEnd);
00111
00118 double GetIntracellularCalciumConcentration();
00119 };
00120
00121
00122 #include "SerializationExportWrapper.hpp"
00123 CHASTE_CLASS_EXPORT(FakeBathCell)
00124
00125 namespace boost
00126 {
00127 namespace serialization
00128 {
00132 template<class Archive>
00133 inline void save_construct_data(
00134 Archive & ar, const FakeBathCell * t, const unsigned int file_version)
00135 {
00136 const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver();
00137 const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction();
00138 ar << p_solver;
00139 ar << p_stimulus;
00140 }
00141
00146 template<class Archive>
00147 inline void load_construct_data(
00148 Archive & ar, FakeBathCell * t, const unsigned int file_version)
00149 {
00150
00151 boost::shared_ptr<AbstractIvpOdeSolver> p_solver;
00152 boost::shared_ptr<AbstractStimulusFunction> p_stimulus;
00153 ar >> p_solver;
00154 ar >> p_stimulus;
00155 ::new(t)FakeBathCell(p_solver, p_stimulus);
00156 }
00157 }
00158 }
00159
00160
00161 #endif