Alarcon2004OxygenBasedCellCycleOdeSystem.hpp

00001 /*
00002 
00003 Copyright (C) University of Oxford, 2005-2010
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 _ALARCON2004OXYGENBASEDCELLCYCLEODESYSTEM_HPP_
00029 #define _ALARCON2004OXYGENBASEDCELLCYCLEODESYSTEM_HPP_
00030 
00031 #include "ChasteSerialization.hpp"
00032 #include <boost/serialization/base_object.hpp>
00033 
00034 #include <cmath>
00035 
00036 #include "AbstractOdeSystem.hpp"
00037 
00051 class Alarcon2004OxygenBasedCellCycleOdeSystem : public AbstractOdeSystem
00052 {
00053 private:
00054 
00060     double ma1;
00062     double ma2;
00064     double ma3;
00066     double ma4;
00068     double mb3;
00070     double mb4;
00072     double mc1;
00074     double mc2;
00076     double md1;
00078     double md2;
00080     double mJ3;
00082     double mJ4;
00084     double mEta;
00086     double mMstar;
00088     double mB;
00090     double mxThreshold;
00092     double myThreshold;
00093 
00095     double mOxygenConcentration;
00096 
00098     bool mIsLabelled;
00099 
00100     friend class boost::serialization::access;
00107     template<class Archive>
00108     void serialize(Archive & archive, const unsigned int version)
00109     {
00110         archive & boost::serialization::base_object<AbstractOdeSystem>(*this);
00111     }
00112 
00113 public:
00114 
00122     Alarcon2004OxygenBasedCellCycleOdeSystem(double oxygenConcentration,
00123                                              bool isLabelled,
00124                                              std::vector<double> stateVariables=std::vector<double>());
00125 
00129     ~Alarcon2004OxygenBasedCellCycleOdeSystem();
00130 
00134     void Init();
00135 
00146     void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
00147 
00156     bool CalculateStoppingEvent(double time, const std::vector<double>& rY);
00157 
00163     void SetIsLabelled(bool isLabelled);
00164 
00168     bool IsLabelled() const;
00169 
00173     double GetOxygenConcentration() const;
00174 };
00175 
00176 // Declare identifier for the serializer
00177 #include "SerializationExportWrapper.hpp"
00178 CHASTE_CLASS_EXPORT(Alarcon2004OxygenBasedCellCycleOdeSystem)
00179 
00180 namespace boost
00181 {
00182 namespace serialization
00183 {
00187 template<class Archive>
00188 inline void save_construct_data(
00189     Archive & ar, const Alarcon2004OxygenBasedCellCycleOdeSystem * t, const BOOST_PFTO unsigned int file_version)
00190 {
00191     // Save data required to construct instance
00192     const double oxygen_concentration = t->GetOxygenConcentration();
00193     ar & oxygen_concentration;
00194 
00195     const bool is_labelled = t->IsLabelled();
00196     ar & is_labelled;
00197 
00198     const std::vector<double> state_variables = t->rGetConstStateVariables();
00199     ar & state_variables;
00200 }
00201 
00205 template<class Archive>
00206 inline void load_construct_data(
00207     Archive & ar, Alarcon2004OxygenBasedCellCycleOdeSystem * t, const unsigned int file_version)
00208 {
00209     // Retrieve data from archive required to construct new instance
00210     double oxygen_concentration;
00211     ar & oxygen_concentration;
00212 
00213     bool is_labelled;
00214     ar & is_labelled;
00215 
00216     std::vector<double> state_variables;
00217     ar & state_variables;
00218 
00219     // Invoke inplace constructor to initialise instance
00220     ::new(t)Alarcon2004OxygenBasedCellCycleOdeSystem(oxygen_concentration, is_labelled, state_variables);
00221 }
00222 }
00223 } // namespace ...
00224 
00225 #endif /*_ALARCON2004OXYGENBASEDCELLCYCLEODESYSTEM_HPP_*/

Generated on Mon Nov 1 12:35:16 2010 for Chaste by  doxygen 1.5.5