Alarcon2004OxygenBasedCellCycleOdeSystem.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 _ALARCON2004OXYGENBASEDCELLCYCLEODESYSTEM_HPP_
00030 #define _ALARCON2004OXYGENBASEDCELLCYCLEODESYSTEM_HPP_
00031 
00032 #include "ChasteSerialization.hpp"
00033 #include <boost/serialization/base_object.hpp>
00034 
00035 #include <cmath>
00036 
00037 #include "AbstractOdeSystem.hpp"
00038 
00052 class Alarcon2004OxygenBasedCellCycleOdeSystem : public AbstractOdeSystem
00053 {
00054 private:
00055 
00061     double ma1;
00063     double ma2;
00065     double ma3;
00067     double ma4;
00069     double mb3;
00071     double mb4;
00073     double mc1;
00075     double mc2;
00077     double md1;
00079     double md2;
00081     double mJ3;
00083     double mJ4;
00085     double mEta;
00087     double mMstar;
00089     double mB;
00091     double mxThreshold;
00093     double myThreshold;
00094 
00096     double mOxygenConcentration;
00097 
00099     bool mIsLabelled;
00100 
00101     friend class boost::serialization::access;
00108     template<class Archive>
00109     void serialize(Archive & archive, const unsigned int version)
00110     {
00111         archive & boost::serialization::base_object<AbstractOdeSystem>(*this);
00112     }
00113 
00114 public:
00115 
00123     Alarcon2004OxygenBasedCellCycleOdeSystem(double oxygenConcentration,
00124                                              bool isLabelled,
00125                                              std::vector<double> stateVariables=std::vector<double>());
00126 
00130     ~Alarcon2004OxygenBasedCellCycleOdeSystem();
00131 
00135     void Init();
00136 
00147     void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
00148 
00157     bool CalculateStoppingEvent(double time, const std::vector<double>& rY);
00158 
00164     void SetIsLabelled(bool isLabelled);
00165 
00169     bool IsLabelled() const;
00170 
00174     double GetOxygenConcentration() const;
00175 };
00176 
00177 // Declare identifier for the serializer
00178 #include "SerializationExportWrapper.hpp"
00179 CHASTE_CLASS_EXPORT(Alarcon2004OxygenBasedCellCycleOdeSystem)
00180 
00181 namespace boost
00182 {
00183 namespace serialization
00184 {
00188 template<class Archive>
00189 inline void save_construct_data(
00190     Archive & ar, const Alarcon2004OxygenBasedCellCycleOdeSystem * t, const BOOST_PFTO unsigned int file_version)
00191 {
00192     // Save data required to construct instance
00193     const double oxygen_concentration = t->GetOxygenConcentration();
00194     ar & oxygen_concentration;
00195 
00196     const bool is_labelled = t->IsLabelled();
00197     ar & is_labelled;
00198 
00199     const std::vector<double> state_variables = t->rGetConstStateVariables();
00200     ar & state_variables;
00201 }
00202 
00206 template<class Archive>
00207 inline void load_construct_data(
00208     Archive & ar, Alarcon2004OxygenBasedCellCycleOdeSystem * t, const unsigned int file_version)
00209 {
00210     // Retrieve data from archive required to construct new instance
00211     double oxygen_concentration;
00212     ar & oxygen_concentration;
00213 
00214     bool is_labelled;
00215     ar & is_labelled;
00216 
00217     std::vector<double> state_variables;
00218     ar & state_variables;
00219 
00220     // Invoke inplace constructor to initialise instance
00221     ::new(t)Alarcon2004OxygenBasedCellCycleOdeSystem(oxygen_concentration, is_labelled, state_variables);
00222 }
00223 }
00224 } // namespace ...
00225 
00226 #endif /*_ALARCON2004OXYGENBASEDCELLCYCLEODESYSTEM_HPP_*/
Generated on Thu Dec 22 13:00:04 2011 for Chaste by  doxygen 1.6.3