WntCellCycleModel.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 #ifndef WNTCELLCYCLEMODEL_HPP_
00029 #define WNTCELLCYCLEMODEL_HPP_
00030
00031 #include "ChasteSerialization.hpp"
00032 #include <boost/serialization/base_object.hpp>
00033 #include <boost/serialization/split_member.hpp>
00034 #include <boost/serialization/shared_ptr.hpp>
00035
00036 #include <cfloat>
00037
00038 #include "AbstractWntOdeBasedCellCycleModel.hpp"
00039 #include "WntCellCycleOdeSystem.hpp"
00040 #include "AbstractCellMutationState.hpp"
00041
00042
00055 class WntCellCycleModel : public AbstractWntOdeBasedCellCycleModel
00056 {
00057 private:
00058 friend class boost::serialization::access;
00065 template<class Archive>
00066 void save(Archive & archive, const unsigned int version) const
00067 {
00068 assert(mpOdeSystem);
00069 archive & boost::serialization::base_object<AbstractWntOdeBasedCellCycleModel>(*this);
00070 boost::shared_ptr<AbstractCellMutationState> p_mutation_state = static_cast<WntCellCycleOdeSystem*>(mpOdeSystem)->GetMutationState();
00071 archive & p_mutation_state;
00072 }
00079 template<class Archive>
00080 void load(Archive & archive, const unsigned int version)
00081 {
00082
00083
00084 assert(mpOdeSystem);
00085 archive & boost::serialization::base_object<AbstractWntOdeBasedCellCycleModel>(*this);
00086 boost::shared_ptr<AbstractCellMutationState> p_mutation_state;
00087 archive & p_mutation_state;
00088 static_cast<WntCellCycleOdeSystem*>(mpOdeSystem)->SetMutationState(p_mutation_state);
00089 }
00090 BOOST_SERIALIZATION_SPLIT_MEMBER()
00091
00092
00100 void ChangeCellProliferativeTypeDueToCurrentBetaCateninLevel();
00101
00102 public:
00103
00107 WntCellCycleModel();
00108
00116 WntCellCycleModel(const WntCellCycleModel& rOtherModel);
00117
00131 WntCellCycleModel(AbstractOdeSystem* pParentOdeSystem,
00132 boost::shared_ptr<AbstractCellMutationState> pMutationState,
00133 double birthTime,
00134 double lastTime,
00135 bool inSG2MPhase,
00136 bool readyToDivide,
00137 double divideTime,
00138 unsigned dimension);
00139
00147 WntCellCycleModel(const std::vector<double>& rParentProteinConcentrations,
00148 boost::shared_ptr<AbstractCellMutationState> pMutationState,
00149 const unsigned& rDimension);
00150
00155 AbstractCellCycleModel* CreateCellCycleModel();
00156
00164 void Initialise();
00165
00172 bool SolveOdeToTime(double currentTime);
00173 };
00174
00175
00176 #include "SerializationExportWrapper.hpp"
00177
00178 CHASTE_CLASS_EXPORT(WntCellCycleModel)
00179
00180 namespace boost
00181 {
00182 namespace serialization
00183 {
00188 template<class Archive>
00189 inline void save_construct_data(
00190 Archive & ar, const WntCellCycleModel * t, const unsigned int file_version)
00191 {
00192 }
00193
00198 template<class Archive>
00199 inline void load_construct_data(
00200 Archive & ar, WntCellCycleModel * t, const unsigned int file_version)
00201 {
00209 std::vector<double> state_vars;
00210 for (unsigned i=0; i<9; i++)
00211 {
00212 state_vars.push_back(0.0);
00213 }
00214
00215 boost::shared_ptr<AbstractCellMutationState> p_mutation_state;
00216 unsigned dimension = 1;
00217 ::new(t)WntCellCycleModel(state_vars, p_mutation_state, dimension);
00218 }
00219 }
00220 }
00221
00222 #endif