Chaste Commit::8b5d759ac2eb95e67ae57699734101efccb0a0a9
VanLeeuwen2009WntSwatCellCycleOdeSystem.hpp
1/*
2
3Copyright (c) 2005-2024, University of Oxford.
4All rights reserved.
5
6University of Oxford means the Chancellor, Masters and Scholars of the
7University of Oxford, having an administrative office at Wellington
8Square, Oxford OX1 2JD, UK.
9
10This file is part of Chaste.
11
12Redistribution and use in source and binary forms, with or without
13modification, 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
23THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
34*/
35
36#ifndef VANLEEUWEN2009WNTSWATCELLCYCLEODESYSTEM_HPP_
37#define VANLEEUWEN2009WNTSWATCELLCYCLEODESYSTEM_HPP_
38
40#include <boost/serialization/base_object.hpp>
41#include <boost/serialization/shared_ptr.hpp>
42
43#include <cmath>
44#include <iostream>
45
46#include "AbstractOdeSystem.hpp"
47#include "AbstractCellMutationState.hpp"
49
82{
83private:
84
90 double mk2d;
92 double mk3d;
94 double mk34d;
96 double mk43d;
98 double mk23d;
100 double mad;
102 double mJ11d;
104 double mJ12d;
106 double mJ13d;
108 double mJ61d;
110 double mJ62d;
112 double mJ63d;
114 double mKm1d;
116 double mkpd;
118 double mphi_r;
120 double mphi_i;
122 double mphi_j;
124 double mphi_p;
126 double mk16d;
128 double mk61d;
130 double mPhiE2F1;
131
137 double mSa;
139 double mSca;
141 double mSc;
143 double mSct;
145 double mSd;
147 double mSt;
149 double mSx;
151 double mSy;
153 double mDa;
155 double mDca;
157 double mDc;
159 double mDct;
161 double mDd;
163 double mDdx;
165 double mDt;
167 double mDu;
169 double mDx;
171 double mDy;
173 double mKc;
175 double mKd;
177 double mKt;
179 double mPc;
181 double mPu;
183 double mXiD;
185 double mXiDx;
187 double mXiX;
189 double mXiC;
190
192 boost::shared_ptr<AbstractCellMutationState> mpMutationState;
193
199 unsigned mHypothesis;
200
202 double mWntLevel;
203
204 friend class boost::serialization::access;
211 template<class Archive>
212 void serialize(Archive & archive, const unsigned int version)
213 {
214 archive & boost::serialization::base_object<AbstractOdeSystem>(*this);
215 }
216
217public:
218
227 VanLeeuwen2009WntSwatCellCycleOdeSystem(unsigned hypothesis,
228 double wntLevel = 0.0,
229 boost::shared_ptr<AbstractCellMutationState> pMutationState=boost::shared_ptr<AbstractCellMutationState>(),
230 std::vector<double> stateVariables=std::vector<double>());
231
236
240 void Init();
241
250 void SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState);
251
257 const boost::shared_ptr<AbstractCellMutationState> GetMutationState() const;
258
269 void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
270
279 bool CalculateStoppingEvent(double time, const std::vector<double>& rY);
280
290 double CalculateRootFunction(double time, const std::vector<double>& rY);
291
295 double GetWntLevel() const;
296
300 unsigned GetHypothesis() const;
301};
302
303// Declare identifier for the serializer
306
307namespace boost
308{
309namespace serialization
310{
314template<class Archive>
315inline void save_construct_data(
316 Archive & ar, const VanLeeuwen2009WntSwatCellCycleOdeSystem * t, const unsigned int file_version)
317{
318 // Save data required to construct instance
319 const unsigned hypothesis = t->GetHypothesis();
320 ar & hypothesis;
321
322 const double wnt_level = t->GetWntLevel();
323 ar & wnt_level;
324
325 const boost::shared_ptr<AbstractCellMutationState> p_mutation_state = t->GetMutationState();
326 ar & p_mutation_state;
327
328 const std::vector<double>& state_variables = t->rGetConstStateVariables();
329 ar & state_variables;
330}
331
335template<class Archive>
336inline void load_construct_data(
337 Archive & ar, VanLeeuwen2009WntSwatCellCycleOdeSystem * t, const unsigned int file_version)
338{
339 // Retrieve data from archive required to construct new instance
340 unsigned hypothesis;
341 ar & hypothesis;
342
343 double wnt_level;
344 ar & wnt_level;
345
346 boost::shared_ptr<AbstractCellMutationState> p_mutation_state;
347 ar & p_mutation_state;
348
349 std::vector<double> state_variables;
350 ar & state_variables;
351
352 // Invoke inplace constructor to initialise instance
353 ::new(t)VanLeeuwen2009WntSwatCellCycleOdeSystem(hypothesis, wnt_level, p_mutation_state, state_variables);
354}
355}
356} // namespace ...
357
358#endif /*VANLEEUWEN2009WNTSWATCELLCYCLEODESYSTEM_HPP_*/
gcov doesn't like this file...
#define CHASTE_CLASS_EXPORT(T)
const boost::shared_ptr< AbstractCellMutationState > GetMutationState() const
void serialize(Archive &archive, const unsigned int version)
double CalculateRootFunction(double time, const std::vector< double > &rY)
bool CalculateStoppingEvent(double time, const std::vector< double > &rY)
void EvaluateYDerivatives(double time, const std::vector< double > &rY, std::vector< double > &rDY)
void SetMutationState(boost::shared_ptr< AbstractCellMutationState > pMutationState)
boost::shared_ptr< AbstractCellMutationState > mpMutationState