Chaste  Release::3.4
CorriasBuistICCModified.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 CorriasBuistICCModified_HPP_
37 #define CorriasBuistICCModified_HPP_
38 
39 #include "ChasteSerialization.hpp"
40 #include <boost/serialization/base_object.hpp>
41 #include "AbstractCardiacCell.hpp"
42 #include "AbstractStimulusFunction.hpp"
43 
60 {
61  friend class boost::serialization::access;
69  template<class Archive>
70  void serialize(Archive & archive, const unsigned int version)
71  {
72  archive & boost::serialization::base_object<AbstractCardiacCell >(*this);
73  archive & mFractionOfVDDRInPU;
74  archive & mIP3Concentration;
75  archive & mScaleFactorSerca;
77  }
78 
79 private:
80 
93 
94  /* Concentrations */
95  double Ca_o;
96  double Cl_o;
97  double K_o;
98  double Na_o;
100  /* Nernst parameters */
101  double R;
102  double T;
103  double F;
104  double FoRT;
105  double RToF;
107  double Cm ;
109  double Asurf ;
110  double Cl_i ;
111  double K_i ;
112  double Na_i ;
113  double P_cyto;
114  double Vol ;
115  double fc ;
116  double fe ;
117  double fm ;
118  double Q10Ca ;
119  double Q10K ;
120  double Q10Na ;
121  double T_exp ;
123  double G_max_BK ;
124  double G_max_CaCl ;
125  double G_max_ERG ;
126  double G_max_Ltype ;
127  double G_max_NSCC ;
128  double G_max_Na ;
129  double G_max_VDDR ;
130  double G_max_bk ;
131  double G_max_kv11 ;
134  double J_max_PMCA ;
135  double J_max_PMCA_PU ;
136  double J_ERleak ;
137  double J_max_leak ;
138  double Jmax_IP3 ;
139  double Jmax_NaCa ;
140  double Jmax_serca ;
141  double Jmax_uni ;
143  double NaPerm_o_Kperm ;
144  double L ;
145  double P_ER ;
146  double P_PU ;
147  double P_mito ;
148  double b ;
149  double na ;
151  double K_Ca ;
152  double K_Na ;
153  double K_act ;
154  double K_trans ;
155  double k_serca ;
156  double conc ;
157  double d_ACT ;
158  double d_IP3 ;
159  double d_INH ;
161  double tau_d_CaCl;
162  double tau_d_NSCC ;
163  double tauh;
165  double deltaPsi_B;
167  double deltaPsi;
170  //Calculated constants
173  /* Volumes */
174  double V_cyto;
175  double V_ER;
176  double V_MITO;
177  double V_PU;
179  /* Temperature corrections */
181  double T_correction_K;
185  /* Nernst potentials */
186  double E_Na;
187  double E_K;
188  double E_Cl;
189  double E_NSCC;
191  /* Activation gate time constants */
192  double tau_d_ERG;
193  double tau_d_Ltype;
194  double tau_d_Na;
195  double tau_d_VDDR;
196  double tau_d_kv11;
198  /* Inactivation gate time constants */
199  double tau_f_Ltype;
200  double tau_f_Na;
201  double tau_f_VDDR;
202  double tau_f_ca_Ltype;
203  double tau_f_kv11;
205  /* Speed ups */
210 public:
217  CorriasBuistICCModified(boost::shared_ptr<AbstractIvpOdeSolver> pSolver, boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus);
218 
223 
227  void VerifyStateVariables();
228 
235  double GetIIonic(const std::vector<double>* pStateVariables=NULL);
236 
244  void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
245 
251  void SetFractionOfVDDRInPU(double fraction);
252 
258  void SetIP3Concentration(double concentration);
259 
265  void SetSercaPumpScaleFactor(double scaleFactor);
266 
273  void SetCarbonMonoxideScaleFactor(double scaleFactor);
274 
279 };
280 
281 
282 // Needs to be included last
285 
286 namespace boost
287 {
288  namespace serialization
289  {
290  template<class Archive>
291  inline void save_construct_data(
292  Archive & ar, const CorriasBuistICCModified * t, const unsigned int fileVersion)
293  {
294  const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver();
295  const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction();
296  ar << p_solver;
297  ar << p_stimulus;
298  }
299 
300  template<class Archive>
301  inline void load_construct_data(
302  Archive & ar, CorriasBuistICCModified * t, const unsigned int fileVersion)
303  {
304  boost::shared_ptr<AbstractIvpOdeSolver> p_solver;
305  boost::shared_ptr<AbstractStimulusFunction> p_stimulus;
306  ar >> p_solver;
307  ar >> p_stimulus;
308  ::new(t)CorriasBuistICCModified(p_solver, p_stimulus);
309  }
310 
311  }
312 
313 }
314 
315 #endif // CorriasBuistICCModified_HPP_
void SetIP3Concentration(double concentration)
void serialize(Archive &archive, const unsigned int version)
void SetFractionOfVDDRInPU(double fraction)
const boost::shared_ptr< AbstractIvpOdeSolver > GetSolver() const
double GetIIonic(const std::vector< double > *pStateVariables=NULL)
CorriasBuistICCModified(boost::shared_ptr< AbstractIvpOdeSolver > pSolver, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus)
void SetCarbonMonoxideScaleFactor(double scaleFactor)
void EvaluateYDerivatives(double time, const std::vector< double > &rY, std::vector< double > &rDY)
boost::shared_ptr< AbstractStimulusFunction > GetStimulusFunction()
#define CHASTE_CLASS_EXPORT(T)
void SetSercaPumpScaleFactor(double scaleFactor)