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
00049
00050 #include "ApcOneHitCellMutationState.hpp"
00051 #include "ApcTwoHitCellMutationState.hpp"
00052 #include "BetaCateninOneHitCellMutationState.hpp"
00053
00071 class WntCellCycleOdeSystem : public AbstractOdeSystem
00072 {
00073 private:
00074
00080 double mk2d;
00082 double mk3d;
00084 double mk34d;
00086 double mk43d;
00088 double mk23d;
00090 double mad;
00092 double mJ11d;
00094 double mJ12d;
00096 double mJ13d;
00098 double mJ61d;
00100 double mJ62d;
00102 double mJ63d;
00104 double mKm1d;
00106 double mkpd;
00108 double mphi_r;
00110 double mphi_i;
00112 double mphi_j;
00114 double mphi_p;
00116 double ma2d;
00118 double ma3d;
00120 double ma4d;
00122 double ma5d;
00124 double mk16d;
00126 double mk61d;
00128 double mPhiE2F1;
00129
00131 boost::shared_ptr<AbstractCellMutationState> mpMutationState;
00132
00134 double mWntLevel;
00135
00136 friend class boost::serialization::access;
00143 template<class Archive>
00144 void serialize(Archive & archive, const unsigned int version)
00145 {
00146 archive & boost::serialization::base_object<AbstractOdeSystem>(*this);
00147 }
00148
00149 public:
00150
00158 WntCellCycleOdeSystem(double wntLevel=0.0,
00159 boost::shared_ptr<AbstractCellMutationState> pMutationState=boost::shared_ptr<AbstractCellMutationState>(),
00160 std::vector<double> stateVariables=std::vector<double>());
00161
00165 ~WntCellCycleOdeSystem();
00166
00170 void Init();
00171
00180 void SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState);
00181
00187 const boost::shared_ptr<AbstractCellMutationState> GetMutationState() const;
00188
00199 void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
00200
00210 bool CalculateStoppingEvent(double time, const std::vector<double>& rY);
00211
00221 double CalculateRootFunction(double time, const std::vector<double>& rY);
00222
00226 double GetWntLevel() const;
00227 };
00228
00229
00230 #include "SerializationExportWrapper.hpp"
00231 CHASTE_CLASS_EXPORT(WntCellCycleOdeSystem)
00232
00233 namespace boost
00234 {
00235 namespace serialization
00236 {
00240 template<class Archive>
00241 inline void save_construct_data(
00242 Archive & ar, const WntCellCycleOdeSystem * t, const BOOST_PFTO unsigned int file_version)
00243 {
00244
00245 const double wnt_level = t->GetWntLevel();
00246 ar & wnt_level;
00247
00248 const boost::shared_ptr<AbstractCellMutationState> p_mutation_state = t->GetMutationState();
00249 ar & p_mutation_state;
00250
00251 const std::vector<double> state_variables = t->rGetConstStateVariables();
00252 ar & state_variables;
00253 }
00254
00258 template<class Archive>
00259 inline void load_construct_data(
00260 Archive & ar, WntCellCycleOdeSystem * t, const unsigned int file_version)
00261 {
00262
00263 double wnt_level;
00264 ar & wnt_level;
00265
00266 boost::shared_ptr<AbstractCellMutationState> p_mutation_state;
00267 ar & p_mutation_state;
00268
00269 std::vector<double> state_variables;
00270 ar & state_variables;
00271
00272
00273 ::new(t)WntCellCycleOdeSystem(wnt_level, p_mutation_state, state_variables);
00274 }
00275 }
00276 }
00277
00278 #endif