WntCellCycleOdeSystem.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
00036 #ifndef WNTCELLCYCLEODESYSTEM_HPP_
00037 #define WNTCELLCYCLEODESYSTEM_HPP_
00038
00039 #include "ChasteSerialization.hpp"
00040 #include <boost/serialization/base_object.hpp>
00041 #include <boost/serialization/shared_ptr.hpp>
00042
00043 #include <cmath>
00044 #include <iostream>
00045
00046 #include "AbstractOdeSystem.hpp"
00047 #include "AbstractCellMutationState.hpp"
00048
00066 class WntCellCycleOdeSystem : public AbstractOdeSystem
00067 {
00068 private:
00069
00075 double mk2d;
00077 double mk3d;
00079 double mk34d;
00081 double mk43d;
00083 double mk23d;
00085 double mad;
00087 double mJ11d;
00089 double mJ12d;
00091 double mJ13d;
00093 double mJ61d;
00095 double mJ62d;
00097 double mJ63d;
00099 double mKm1d;
00101 double mkpd;
00103 double mphi_r;
00105 double mphi_i;
00107 double mphi_j;
00109 double mphi_p;
00111 double ma2d;
00113 double ma3d;
00115 double ma4d;
00117 double ma5d;
00119 double mk16d;
00121 double mk61d;
00123 double mPhiE2F1;
00124
00126 boost::shared_ptr<AbstractCellMutationState> mpMutationState;
00127
00129 double mWntLevel;
00130
00131 friend class boost::serialization::access;
00138 template<class Archive>
00139 void serialize(Archive & archive, const unsigned int version)
00140 {
00141 archive & boost::serialization::base_object<AbstractOdeSystem>(*this);
00142 }
00143
00144 public:
00145
00153 WntCellCycleOdeSystem(double wntLevel=0.0,
00154 boost::shared_ptr<AbstractCellMutationState> pMutationState=boost::shared_ptr<AbstractCellMutationState>(),
00155 std::vector<double> stateVariables=std::vector<double>());
00156
00160 ~WntCellCycleOdeSystem();
00161
00165 void Init();
00166
00175 void SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState);
00176
00182 const boost::shared_ptr<AbstractCellMutationState> GetMutationState() const;
00183
00194 void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
00195
00205 bool CalculateStoppingEvent(double time, const std::vector<double>& rY);
00206
00216 double CalculateRootFunction(double time, const std::vector<double>& rY);
00217
00221 double GetWntLevel() const;
00222 };
00223
00224
00225 #include "SerializationExportWrapper.hpp"
00226 CHASTE_CLASS_EXPORT(WntCellCycleOdeSystem)
00227
00228 namespace boost
00229 {
00230 namespace serialization
00231 {
00235 template<class Archive>
00236 inline void save_construct_data(
00237 Archive & ar, const WntCellCycleOdeSystem * t, const BOOST_PFTO unsigned int file_version)
00238 {
00239
00240 const double wnt_level = t->GetWntLevel();
00241 ar & wnt_level;
00242
00243 const boost::shared_ptr<AbstractCellMutationState> p_mutation_state = t->GetMutationState();
00244 ar & p_mutation_state;
00245
00246 const std::vector<double> state_variables = t->rGetConstStateVariables();
00247 ar & state_variables;
00248 }
00249
00253 template<class Archive>
00254 inline void load_construct_data(
00255 Archive & ar, WntCellCycleOdeSystem * t, const unsigned int file_version)
00256 {
00257
00258 double wnt_level;
00259 ar & wnt_level;
00260
00261 boost::shared_ptr<AbstractCellMutationState> p_mutation_state;
00262 ar & p_mutation_state;
00263
00264 std::vector<double> state_variables;
00265 ar & state_variables;
00266
00267
00268 ::new(t)WntCellCycleOdeSystem(wnt_level, p_mutation_state, state_variables);
00269 }
00270 }
00271 }
00272
00273 #endif