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 #ifndef VANLEEUWEN2009WNTSWATCELLCYCLEODESYSTEM_HPP_
00029 #define VANLEEUWEN2009WNTSWATCELLCYCLEODESYSTEM_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 #include "UblasCustomFunctions.hpp"
00041 
00042 // Needed here to avoid serialization errors
00043 #include "ApcOneHitCellMutationState.hpp"
00044 #include "ApcTwoHitCellMutationState.hpp"
00045 #include "BetaCateninOneHitCellMutationState.hpp"
00046 
00079 class VanLeeuwen2009WntSwatCellCycleOdeSystem : public AbstractOdeSystem
00080 {
00081 private:
00082 
00088     double mk2d;
00090     double mk3d;
00092     double mk34d;
00094     double mk43d;
00096     double mk23d;
00098     double mad;
00100     double mJ11d;
00102     double mJ12d;
00104     double mJ13d;
00106     double mJ61d;
00108     double mJ62d;
00110     double mJ63d;
00112     double mKm1d;
00114     double mkpd;
00116     double mphi_r;
00118     double mphi_i;
00120     double mphi_j;
00122     double mphi_p;
00124     double mk16d;
00126     double mk61d;
00128     double mPhiE2F1;
00129 
00135     double mSa;
00137     double mSca;
00139     double mSc;
00141     double mSct;
00143     double mSd;
00145     double mSt;
00147     double mSx;
00149     double mSy;
00151     double mDa;
00153     double mDca;
00155     double mDc;
00157     double mDct;
00159     double mDd;
00161     double mDdx;
00163     double mDt;
00165     double mDu;
00167     double mDx;
00169     double mDy;
00171     double mKc;
00173     double mKd;
00175     double mKt;
00177     double mPc;
00179     double mPu;
00181     double mXiD;
00183     double mXiDx;
00185     double mXiX;
00187     double mXiC;
00188 
00190     boost::shared_ptr<AbstractCellMutationState> mpMutationState;
00191 
00197     unsigned mHypothesis;
00198 
00200     double mWntLevel;
00201 
00202     friend class boost::serialization::access;
00209     template<class Archive>
00210     void serialize(Archive & archive, const unsigned int version)
00211     {
00212         archive & boost::serialization::base_object<AbstractOdeSystem>(*this);
00213     }
00214 
00215 public:
00216 
00225     VanLeeuwen2009WntSwatCellCycleOdeSystem(unsigned hypothesis,
00226                                             double wntLevel = 0.0,
00227                                             boost::shared_ptr<AbstractCellMutationState> pMutationState=boost::shared_ptr<AbstractCellMutationState>(),
00228                                             std::vector<double> stateVariables=std::vector<double>());
00229 
00233     ~VanLeeuwen2009WntSwatCellCycleOdeSystem();
00234 
00238     void Init();
00239 
00248     void SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState);
00249 
00255     const boost::shared_ptr<AbstractCellMutationState> GetMutationState() const;
00256 
00267     void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
00268 
00277     bool CalculateStoppingEvent(double time, const std::vector<double>& rY);
00278 
00288     double CalculateRootFunction(double time, const std::vector<double>& rY);
00289 
00293     double GetWntLevel() const;
00294 
00298     unsigned GetHypothesis() const;
00299 };
00300 
00301 // Declare identifier for the serializer
00302 #include "SerializationExportWrapper.hpp"
00303 CHASTE_CLASS_EXPORT(VanLeeuwen2009WntSwatCellCycleOdeSystem)
00304 
00305 namespace boost
00306 {
00307 namespace serialization
00308 {
00312 template<class Archive>
00313 inline void save_construct_data(
00314     Archive & ar, const VanLeeuwen2009WntSwatCellCycleOdeSystem * t, const BOOST_PFTO unsigned int file_version)
00315 {
00316     // Save data required to construct instance
00317     const unsigned hypothesis = t->GetHypothesis();
00318     ar & hypothesis;
00319 
00320     const double wnt_level = t->GetWntLevel();
00321     ar & wnt_level;
00322 
00323     const boost::shared_ptr<AbstractCellMutationState> p_mutation_state = t->GetMutationState();
00324     ar & p_mutation_state;
00325 
00326     const std::vector<double> state_variables = t->rGetConstStateVariables();
00327     ar & state_variables;
00328 }
00329 
00333 template<class Archive>
00334 inline void load_construct_data(
00335     Archive & ar, VanLeeuwen2009WntSwatCellCycleOdeSystem * t, const unsigned int file_version)
00336 {
00337     // Retrieve data from archive required to construct new instance
00338     unsigned hypothesis;
00339     ar & hypothesis;
00340 
00341     double wnt_level;
00342     ar & wnt_level;
00343 
00344     boost::shared_ptr<AbstractCellMutationState> p_mutation_state;
00345     ar & p_mutation_state;
00346 
00347     std::vector<double> state_variables;
00348     ar & state_variables;
00349 
00350     // Invoke inplace constructor to initialise instance
00351     ::new(t)VanLeeuwen2009WntSwatCellCycleOdeSystem(hypothesis, wnt_level, p_mutation_state, state_variables);
00352 }
00353 }
00354 } // namespace ...
00355 
00356 #endif /*VANLEEUWEN2009WNTSWATCELLCYCLEODESYSTEM_HPP_*/

Generated on Mon Apr 18 11:35:28 2011 for Chaste by  doxygen 1.5.5