Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
CorriasBuistSMCModified.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 CorriasBuistSMCModified_HPP_
37#define CorriasBuistSMCModified_HPP_
38
39
41#include <boost/serialization/base_object.hpp>
42#include "AbstractCardiacCell.hpp"
43#include "AbstractStimulusFunction.hpp"
59{
60 friend class boost::serialization::access;
68 template<class Archive>
69 void serialize(Archive & archive, const unsigned int version)
70 {
71 archive & boost::serialization::base_object<AbstractCardiacCell >(*this);
72 }
73
74private:
75
82
87
88 double Cm;
91 double Asurf;
93 double VolCell;
94 double hCa;
95 double sCa;
97 /* concentrations */
98 double Ki;
99 double Nai;
100 double ACh;
101 double CaiRest;
103 /* maximum conductances*/
104 double gLVA_max; // (0.18 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2
105 double gCaL_max; // (65.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2
106 double gBK_max; // (45.7 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2
107 double gKb_max; // (0.0144 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2
108 double gKA_max; // (9.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2
109 double gKr_max; // (35.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2
110 double gNa_max; // (3.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2
111 double gnsCC_max; // (50.0 nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2
112 double gcouple; // 1.3 nS * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2
113 double JCaExt_max;
115 /* Temperature corrections */
116 double Q10Ca;
117 double Q10K; //1.365
118 double Q10Na;
119 double Texp;
122 double T_correct_K ;
124 double T_correct_gBK; // (nS) * 1e-6 (mS/nS) / Asurf (mm2) = mS/mm2
125
126 /* Nernst potentials */
127 double EK;
128 double ENa ;
129 double EnsCC;
131 double Ca_o;
132 double K_o;
133 double Na_o;
135 /* Nernst parameters */
136 double R;
137 double T;
138 double F;
139 double FoRT;
140 double RToF;
142public:
143
150 CorriasBuistSMCModified(boost::shared_ptr<AbstractIvpOdeSolver> pSolver, boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus);
151
156
161
168 double GetIIonic(const std::vector<double>* pStateVariables=NULL);
169
177 void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY);
178
179
186 void SetFakeIccStimulusPresent(bool present);
187
192
197
204 void SetCarbonMonoxideScaleFactor(double scaleFactor);
205
210};
211
212// Needs to be included last
215
216namespace boost
217{
218 namespace serialization
219 {
220 template<class Archive>
221 inline void save_construct_data(
222 Archive & ar, const CorriasBuistSMCModified * t, const unsigned int fileVersion)
223 {
224 const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver();
225 const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction();
226 ar << p_solver;
227 ar << p_stimulus;
228 }
229
230 template<class Archive>
231 inline void load_construct_data(
232 Archive & ar, CorriasBuistSMCModified * t, const unsigned int fileVersion)
233 {
234 boost::shared_ptr<AbstractIvpOdeSolver> p_solver;
235 boost::shared_ptr<AbstractStimulusFunction> p_stimulus;
236 ar >> p_solver;
237 ar >> p_stimulus;
238 ::new(t)CorriasBuistSMCModified(p_solver, p_stimulus);
239 }
240 }
241}
242
243#endif // CorriasBuistSMCModified_HPP_
gcov doesn't like this file...
#define CHASTE_CLASS_EXPORT(T)
double SetCarbonMonoxideScaleFactor()
double GetIIonic(const std::vector< double > *pStateVariables=NULL)
void serialize(Archive &archive, const unsigned int version)
void SetFakeIccStimulusPresent(bool present)
void EvaluateYDerivatives(double time, const std::vector< double > &rY, std::vector< double > &rDY)