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 #ifndef WNTCELLCYCLEODESYSTEM_HPP_
00030 #define WNTCELLCYCLEODESYSTEM_HPP_
00031
00032 #include "ChasteSerialization.hpp"
00033 #include <boost/serialization/base_object.hpp>
00034 #include <boost/serialization/shared_ptr.hpp>
00035
00036 #include <cmath>
00037 #include <iostream>
00038
00039 #include "AbstractOdeSystem.hpp"
00040 #include "AbstractCellMutationState.hpp"
00041
00042
00043 #include "ApcOneHitCellMutationState.hpp"
00044 #include "ApcTwoHitCellMutationState.hpp"
00045 #include "BetaCateninOneHitCellMutationState.hpp"
00046
00064 class WntCellCycleOdeSystem : public AbstractOdeSystem
00065 {
00066 private:
00067
00073 double mk2d;
00075 double mk3d;
00077 double mk34d;
00079 double mk43d;
00081 double mk23d;
00083 double mad;
00085 double mJ11d;
00087 double mJ12d;
00089 double mJ13d;
00091 double mJ61d;
00093 double mJ62d;
00095 double mJ63d;
00097 double mKm1d;
00099 double mkpd;
00101 double mphi_r;
00103 double mphi_i;
00105 double mphi_j;
00107 double mphi_p;
00109 double ma2d;
00111 double ma3d;
00113 double ma4d;
00115 double ma5d;
00117 double mk16d;
00119 double mk61d;
00121 double mPhiE2F1;
00122
00124 boost::shared_ptr<AbstractCellMutationState> mpMutationState;
00125
00127 double mWntLevel;
00128
00129 friend class boost::serialization::access;
00136 template<class Archive>
00137 void serialize(Archive & archive, const unsigned int version)
00138 {
00139 archive & boost::serialization::base_object<AbstractOdeSystem>(*this);
00140 }
00141
00142 public:
00143
00151 WntCellCycleOdeSystem(double wntLevel=0.0,
00152 boost::shared_ptr<AbstractCellMutationState> pMutationState=boost::shared_ptr<AbstractCellMutationState>(),
00153 std::vector<double> stateVariables=std::vector<double>());
00154
00158 ~WntCellCycleOdeSystem();
00159
00163 void Init();
00164
00173 void SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState);
00174
00180 const boost::shared_ptr<AbstractCellMutationState> GetMutationState() const;
00181
00192 void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
00193
00203 bool CalculateStoppingEvent(double time, const std::vector<double>& rY);
00204
00214 double CalculateRootFunction(double time, const std::vector<double>& rY);
00215
00219 double GetWntLevel() const;
00220 };
00221
00222
00223 #include "SerializationExportWrapper.hpp"
00224 CHASTE_CLASS_EXPORT(WntCellCycleOdeSystem)
00225
00226 namespace boost
00227 {
00228 namespace serialization
00229 {
00233 template<class Archive>
00234 inline void save_construct_data(
00235 Archive & ar, const WntCellCycleOdeSystem * t, const BOOST_PFTO unsigned int file_version)
00236 {
00237
00238 const double wnt_level = t->GetWntLevel();
00239 ar & wnt_level;
00240
00241 const boost::shared_ptr<AbstractCellMutationState> p_mutation_state = t->GetMutationState();
00242 ar & p_mutation_state;
00243
00244 const std::vector<double> state_variables = t->rGetConstStateVariables();
00245 ar & state_variables;
00246 }
00247
00251 template<class Archive>
00252 inline void load_construct_data(
00253 Archive & ar, WntCellCycleOdeSystem * t, const unsigned int file_version)
00254 {
00255
00256 double wnt_level;
00257 ar & wnt_level;
00258
00259 boost::shared_ptr<AbstractCellMutationState> p_mutation_state;
00260 ar & p_mutation_state;
00261
00262 std::vector<double> state_variables;
00263 ar & state_variables;
00264
00265
00266 ::new(t)WntCellCycleOdeSystem(wnt_level, p_mutation_state, state_variables);
00267 }
00268 }
00269 }
00270
00271 #endif