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 #ifndef WNTCELLCYCLEODESYSTEM_HPP_
00029 #define WNTCELLCYCLEODESYSTEM_HPP_
00030
00031 #include "ChasteSerialization.hpp"
00032 #include <boost/serialization/base_object.hpp>
00033 #include <boost/serialization/shared_ptr.hpp>
00034
00035 #include <cmath>
00036 #include <iostream>
00037
00038 #include "AbstractOdeSystem.hpp"
00039 #include "AbstractCellMutationState.hpp"
00040
00041
00042 #include "ApcOneHitCellMutationState.hpp"
00043 #include "ApcTwoHitCellMutationState.hpp"
00044 #include "BetaCateninOneHitCellMutationState.hpp"
00045
00063 class WntCellCycleOdeSystem : public AbstractOdeSystem
00064 {
00065 private:
00066
00072 double mk2d;
00074 double mk3d;
00076 double mk34d;
00078 double mk43d;
00080 double mk23d;
00082 double mad;
00084 double mJ11d;
00086 double mJ12d;
00088 double mJ13d;
00090 double mJ61d;
00092 double mJ62d;
00094 double mJ63d;
00096 double mKm1d;
00098 double mkpd;
00100 double mphi_r;
00102 double mphi_i;
00104 double mphi_j;
00106 double mphi_p;
00108 double ma2d;
00110 double ma3d;
00112 double ma4d;
00114 double ma5d;
00116 double mk16d;
00118 double mk61d;
00120 double mPhiE2F1;
00121
00123 boost::shared_ptr<AbstractCellMutationState> mpMutationState;
00124
00126 double mWntLevel;
00127
00128 friend class boost::serialization::access;
00135 template<class Archive>
00136 void serialize(Archive & archive, const unsigned int version)
00137 {
00138 archive & boost::serialization::base_object<AbstractOdeSystem>(*this);
00139 }
00140
00141 public:
00142
00150 WntCellCycleOdeSystem(double wntLevel=0.0,
00151 boost::shared_ptr<AbstractCellMutationState> pMutationState=boost::shared_ptr<AbstractCellMutationState>(),
00152 std::vector<double> stateVariables=std::vector<double>());
00153
00157 ~WntCellCycleOdeSystem();
00158
00162 void Init();
00163
00172 void SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState);
00173
00179 const boost::shared_ptr<AbstractCellMutationState> GetMutationState() const;
00180
00191 void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
00192
00202 bool CalculateStoppingEvent(double time, const std::vector<double>& rY);
00203
00213 double CalculateRootFunction(double time, const std::vector<double>& rY);
00214
00218 double GetWntLevel() const;
00219 };
00220
00221
00222 #include "SerializationExportWrapper.hpp"
00223 CHASTE_CLASS_EXPORT(WntCellCycleOdeSystem)
00224
00225 namespace boost
00226 {
00227 namespace serialization
00228 {
00232 template<class Archive>
00233 inline void save_construct_data(
00234 Archive & ar, const WntCellCycleOdeSystem * t, const BOOST_PFTO unsigned int file_version)
00235 {
00236
00237 const double wnt_level = t->GetWntLevel();
00238 ar & wnt_level;
00239
00240 const boost::shared_ptr<AbstractCellMutationState> p_mutation_state = t->GetMutationState();
00241 ar & p_mutation_state;
00242
00243 const std::vector<double> state_variables = t->rGetConstStateVariables();
00244 ar & state_variables;
00245 }
00246
00250 template<class Archive>
00251 inline void load_construct_data(
00252 Archive & ar, WntCellCycleOdeSystem * t, const unsigned int file_version)
00253 {
00254
00255 double wnt_level;
00256 ar & wnt_level;
00257
00258 boost::shared_ptr<AbstractCellMutationState> p_mutation_state;
00259 ar & p_mutation_state;
00260
00261 std::vector<double> state_variables;
00262 ar & state_variables;
00263
00264
00265 ::new(t)WntCellCycleOdeSystem(wnt_level, p_mutation_state, state_variables);
00266 }
00267 }
00268 }
00269
00270 #endif