VanLeeuwen2009WntSwatCellCycleOdeSystem.hpp

00001 /*
00002 
00003 Copyright (C) University of Oxford, 2005-2011
00004 
00005 University of Oxford means the Chancellor, Masters and Scholars of the
00006 University of Oxford, having an administrative office at Wellington
00007 Square, Oxford OX1 2JD, UK.
00008 
00009 This file is part of Chaste.
00010 
00011 Chaste is free software: you can redistribute it and/or modify it
00012 under the terms of the GNU Lesser General Public License as published
00013 by the Free Software Foundation, either version 2.1 of the License, or
00014 (at your option) any later version.
00015 
00016 Chaste is distributed in the hope that it will be useful, but WITHOUT
00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
00019 License for more details. The offer of Chaste under the terms of the
00020 License is subject to the License being interpreted in accordance with
00021 English Law and subject to any action against the University of Oxford
00022 being under the jurisdiction of the English Courts.
00023 
00024 You should have received a copy of the GNU Lesser General Public License
00025 along with Chaste. If not, see <http://www.gnu.org/licenses/>.
00026 
00027 */
00028 
00029 #ifndef VANLEEUWEN2009WNTSWATCELLCYCLEODESYSTEM_HPP_
00030 #define VANLEEUWEN2009WNTSWATCELLCYCLEODESYSTEM_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 #include "MathsCustomFunctions.hpp"
00042 
00043 // Needed here to avoid serialization errors
00044 #include "ApcOneHitCellMutationState.hpp"
00045 #include "ApcTwoHitCellMutationState.hpp"
00046 #include "BetaCateninOneHitCellMutationState.hpp"
00047 
00080 class VanLeeuwen2009WntSwatCellCycleOdeSystem : public AbstractOdeSystem
00081 {
00082 private:
00083 
00089     double mk2d;
00091     double mk3d;
00093     double mk34d;
00095     double mk43d;
00097     double mk23d;
00099     double mad;
00101     double mJ11d;
00103     double mJ12d;
00105     double mJ13d;
00107     double mJ61d;
00109     double mJ62d;
00111     double mJ63d;
00113     double mKm1d;
00115     double mkpd;
00117     double mphi_r;
00119     double mphi_i;
00121     double mphi_j;
00123     double mphi_p;
00125     double mk16d;
00127     double mk61d;
00129     double mPhiE2F1;
00130 
00136     double mSa;
00138     double mSca;
00140     double mSc;
00142     double mSct;
00144     double mSd;
00146     double mSt;
00148     double mSx;
00150     double mSy;
00152     double mDa;
00154     double mDca;
00156     double mDc;
00158     double mDct;
00160     double mDd;
00162     double mDdx;
00164     double mDt;
00166     double mDu;
00168     double mDx;
00170     double mDy;
00172     double mKc;
00174     double mKd;
00176     double mKt;
00178     double mPc;
00180     double mPu;
00182     double mXiD;
00184     double mXiDx;
00186     double mXiX;
00188     double mXiC;
00189 
00191     boost::shared_ptr<AbstractCellMutationState> mpMutationState;
00192 
00198     unsigned mHypothesis;
00199 
00201     double mWntLevel;
00202 
00203     friend class boost::serialization::access;
00210     template<class Archive>
00211     void serialize(Archive & archive, const unsigned int version)
00212     {
00213         archive & boost::serialization::base_object<AbstractOdeSystem>(*this);
00214     }
00215 
00216 public:
00217 
00226     VanLeeuwen2009WntSwatCellCycleOdeSystem(unsigned hypothesis,
00227                                             double wntLevel = 0.0,
00228                                             boost::shared_ptr<AbstractCellMutationState> pMutationState=boost::shared_ptr<AbstractCellMutationState>(),
00229                                             std::vector<double> stateVariables=std::vector<double>());
00230 
00234     ~VanLeeuwen2009WntSwatCellCycleOdeSystem();
00235 
00239     void Init();
00240 
00249     void SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState);
00250 
00256     const boost::shared_ptr<AbstractCellMutationState> GetMutationState() const;
00257 
00268     void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
00269 
00278     bool CalculateStoppingEvent(double time, const std::vector<double>& rY);
00279 
00289     double CalculateRootFunction(double time, const std::vector<double>& rY);
00290 
00294     double GetWntLevel() const;
00295 
00299     unsigned GetHypothesis() const;
00300 };
00301 
00302 // Declare identifier for the serializer
00303 #include "SerializationExportWrapper.hpp"
00304 CHASTE_CLASS_EXPORT(VanLeeuwen2009WntSwatCellCycleOdeSystem)
00305 
00306 namespace boost
00307 {
00308 namespace serialization
00309 {
00313 template<class Archive>
00314 inline void save_construct_data(
00315     Archive & ar, const VanLeeuwen2009WntSwatCellCycleOdeSystem * t, const BOOST_PFTO unsigned int file_version)
00316 {
00317     // Save data required to construct instance
00318     const unsigned hypothesis = t->GetHypothesis();
00319     ar & hypothesis;
00320 
00321     const double wnt_level = t->GetWntLevel();
00322     ar & wnt_level;
00323 
00324     const boost::shared_ptr<AbstractCellMutationState> p_mutation_state = t->GetMutationState();
00325     ar & p_mutation_state;
00326 
00327     const std::vector<double> state_variables = t->rGetConstStateVariables();
00328     ar & state_variables;
00329 }
00330 
00334 template<class Archive>
00335 inline void load_construct_data(
00336     Archive & ar, VanLeeuwen2009WntSwatCellCycleOdeSystem * t, const unsigned int file_version)
00337 {
00338     // Retrieve data from archive required to construct new instance
00339     unsigned hypothesis;
00340     ar & hypothesis;
00341 
00342     double wnt_level;
00343     ar & wnt_level;
00344 
00345     boost::shared_ptr<AbstractCellMutationState> p_mutation_state;
00346     ar & p_mutation_state;
00347 
00348     std::vector<double> state_variables;
00349     ar & state_variables;
00350 
00351     // Invoke inplace constructor to initialise instance
00352     ::new(t)VanLeeuwen2009WntSwatCellCycleOdeSystem(hypothesis, wnt_level, p_mutation_state, state_variables);
00353 }
00354 }
00355 } // namespace ...
00356 
00357 #endif /*VANLEEUWEN2009WNTSWATCELLCYCLEODESYSTEM_HPP_*/
Generated on Thu Dec 22 13:00:05 2011 for Chaste by  doxygen 1.6.3