Chaste  Build::
Owen2011OxygenBasedCellCycleOdeSystem.hpp
1 /*
2 
3 Copyright (c) 2005-2016, University of Oxford.
4 All rights reserved.
5 
6 University of Oxford means the Chancellor, Masters and Scholars of the
7 University of Oxford, having an administrative office at Wellington
8 Square, Oxford OX1 2JD, UK.
9 
10 This file is part of Chaste.
11 
12 Redistribution and use in source and binary forms, with or without
13 modification, are permitted provided that the following conditions are met:
14  * Redistributions of source code must retain the above copyright notice,
15  this list of conditions and the following disclaimer.
16  * Redistributions in binary form must reproduce the above copyright notice,
17  this list of conditions and the following disclaimer in the documentation
18  and/or other materials provided with the distribution.
19  * Neither the name of the University of Oxford nor the names of its
20  contributors may be used to endorse or promote products derived from this
21  software without specific prior written permission.
22 
23 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 
34 */
35 
36 #ifndef _OWEN2011OXYGENBASEDCELLCYCLEODESYSTEM_HPP_
37 #define _OWEN2011OXYGENBASEDCELLCYCLEODESYSTEM_HPP_
38 
39 #include "ChasteSerialization.hpp"
40 #include <boost/serialization/base_object.hpp>
41 #include <boost/serialization/shared_ptr.hpp>
42 #include <cmath>
43 #include "AbstractCellMutationState.hpp"
44 #include "CancerCellMutationState.hpp"
45 #include "AbstractOdeSystem.hpp"
46 #include "UnitCollection.hpp"
47 
59 {
60 
61 private:
62 
66  units::quantity<unit::pressure> mCphi;
67 
71  units::quantity<unit::time> mTmin;
72 
76  units::quantity<unit::rate> mk7;
77 
81  units::quantity<unit::rate> mk7dash;
82 
86  units::quantity<unit::pressure> mCp53;
87 
91  units::quantity<unit::rate> mk8;
92 
96  units::quantity<unit::rate> mk8doubledash;
97 
101  units::quantity<unit::dimensionless> mJ5;
102 
106  units::quantity<unit::rate> mk8dash;
107 
111  units::quantity<unit::pressure> mCVEGF;
112 
116  units::quantity<unit::concentration> mOxygenConcentration;
117 
121  boost::shared_ptr<AbstractCellMutationState> pmMutationState;
122 
126  units::quantity<unit::time> mReferenceTimeScale;
127 
131  units::quantity<unit::concentration> mReferenceConcentrationScale;
132 
136  units::quantity<unit::solubility> mReferenceSolubility;
137 
138 
139  friend class boost::serialization::access;
146  template<class Archive>
147  void serialize(Archive & archive, const unsigned int version)
148  {
149  archive & boost::serialization::base_object<AbstractOdeSystem>(*this);
150  }
151 
152 public:
153 
161  Owen2011OxygenBasedCellCycleOdeSystem(units::quantity<unit::concentration> oxygenConcentration,
162  boost::shared_ptr<AbstractCellMutationState> mutation_state,
163  std::vector<double> stateVariables=std::vector<double>());
164 
169 
180  void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
181 
190  bool CalculateStoppingEvent(double time, const std::vector<double>& rY);
191 
196  units::quantity<unit::concentration> GetOxygenConcentration() const;
197 
202  boost::shared_ptr<AbstractCellMutationState> GetMutationState() const;
203 
209  void SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState);
210 
211 };
212 
213 // Declare identifier for the serializer
214 #include "SerializationExportWrapper.hpp"
215 CHASTE_CLASS_EXPORT(Owen2011OxygenBasedCellCycleOdeSystem)
216 
217 namespace boost
218 {
219 namespace serialization
220 {
224 template<class Archive>
225 inline void save_construct_data(
226  Archive & ar, const Owen2011OxygenBasedCellCycleOdeSystem * t, const unsigned int file_version)
227 {
228  // Save data required to construct instance
229  const units::quantity<unit::concentration> oxygen_concentration = t->GetOxygenConcentration();
230  ar & oxygen_concentration;
231 
232  const boost::shared_ptr<AbstractCellMutationState> mutation_state = t->GetMutationState();
233  ar & mutation_state;
234 
235  const std::vector<double> state_variables = t->rGetConstStateVariables();
236  ar & state_variables;
237 }
238 
242 template<class Archive>
243 inline void load_construct_data(
244  Archive & ar, Owen2011OxygenBasedCellCycleOdeSystem * t, const unsigned int file_version)
245 {
246  // Retrieve data from archive required to construct new instance
247  units::quantity<unit::concentration> oxygen_concentration;
248  ar & oxygen_concentration;
249 
250  boost::shared_ptr<AbstractCellMutationState> mutation_state;
251  ar & mutation_state;
252 
253  std::vector<double> state_variables;
254  ar & state_variables;
255 
256  // Invoke inplace constructor to initialise instance
257  ::new(t)Owen2011OxygenBasedCellCycleOdeSystem(oxygen_concentration, mutation_state, state_variables);
258 }
259 }
260 } // namespace ...
261 
262 #endif /*_OWEN2011OXYGENBASEDCELLCYCLEODESYSTEM_HPP_*/
void EvaluateYDerivatives(double time, const std::vector< double > &rY, std::vector< double > &rDY)
boost::shared_ptr< AbstractCellMutationState > pmMutationState
units::quantity< unit::concentration > mReferenceConcentrationScale
void SetMutationState(boost::shared_ptr< AbstractCellMutationState > pMutationState)
Owen2011OxygenBasedCellCycleOdeSystem(units::quantity< unit::concentration > oxygenConcentration, boost::shared_ptr< AbstractCellMutationState > mutation_state, std::vector< double > stateVariables=std::vector< double >())
void serialize(Archive &archive, const unsigned int version)
boost::shared_ptr< AbstractCellMutationState > GetMutationState() const
units::quantity< unit::concentration > mOxygenConcentration
units::quantity< unit::concentration > GetOxygenConcentration() const
bool CalculateStoppingEvent(double time, const std::vector< double > &rY)