LifeV
IonicFox.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  @file IonicFoxModel
29  @brief Ionic model based on Fox model.
30 
31  Ionic model as in
32 
33  Fox, Jeffrey J., Jennifer L. McHarg, and Robert F. Gilmour Jr.
34  "Ionic mechanism of electrical alternans."
35  American Journal of Physiology-Heart and Circulatory Physiology 51.2 (2002): H516.
36 
37  @date 04-2013
38  @author Marie Dupraz <dupraz.marie@gmail.com>
39 
40  @contributors
41  @mantainer Marie Dupraz <dupraz.marie@gmail.com>
42  @last update 04-2013
43  */
44 
45 
46 #ifndef FOX_HPP_INCLUDED
47 #define FOX_HPP_INCLUDED
48 
49 #include <lifev/electrophysiology/solver/IonicModels/ElectroIonicModel.hpp>
50 #include <Teuchos_RCP.hpp>
51 #include <Teuchos_ParameterList.hpp>
52 #include "Teuchos_XMLParameterListHelpers.hpp"
53 
54 #include <cmath>
55 
56 
57 namespace LifeV
58 {
59 //! IonicModel - This class implements an ionic model.
60 
61 class IonicFox : public virtual ElectroIonicModel
62 {
63 
64 public:
65  //! @name Type definitions
66  //@{
67  typedef ElectroIonicModel super;
70  //@}
71 
72 
73 
74  //! @name Constructors & Destructor
75  //@{
76 
77  //! Constructor
78  IonicFox();
79 
80  /*!
81  * @param Epetra communicator
82  * @param list of parameters in an xml file
83  */
84  IonicFox ( Teuchos::ParameterList& parameterList );
85 
86  /*!
87  * @param IonicFox object
88  */
89  IonicFox ( const IonicFox& model );
90 
91  //! Destructor
92  virtual ~IonicFox() {}
93 
94  //@}
95 
96  //! @name Overloads
97  //@{
98 
99  IonicFox& operator= ( const IonicFox& model );
100 
101  //@}
102 
103  //! @name Setters and getters
104  //@{
105 
106  inline const Real& areaCap() const
107  {
108  return M_ACap;
109  }
110  inline void setACap (const Real& areaCap)
111  {
112  this->M_ACap = areaCap;
113  }
114 
115  inline const Real& volMyo() const
116  {
117  return M_VMyo;
118  }
119  inline void setVMyo (const Real& volMyo)
120  {
121  this->M_VMyo = volMyo;
122  }
123 
124  inline const Real& volSR() const
125  {
126  return M_Vsr;
127  }
128  inline void setVsr (const Real& volSR)
129  {
130  this->M_Vsr = volSR;
131  }
132 
133  inline const Real& volUp() const
134  {
135  return M_Vup;
136  }
137 
138  inline void setVup (const Real& volUp)
139  {
140  this->M_Vup = volUp;
141  }
142 
143  inline const Real& concNa0() const
144  {
145  return M_NaO;
146  }
147  inline void setNa0 (const Real& concNa0)
148  {
149  this->M_NaO = concNa0;
150  }
151 
152  inline const Real& concCa0() const
153  {
154  return M_CaO;
155  }
156  inline void setCa0 (const Real& concCa0)
157  {
158  this->M_CaO = concCa0;
159  }
160 
161  inline const Real& concK0() const
162  {
163  return M_K0;
164  }
165  inline void setK0 (const Real& concK0)
166  {
167  this->M_K0 = concK0;
168  }
169 
170  inline const Real& concNaIn() const
171  {
172  return M_NaIn;
173  }
174  inline void setNaIn (const Real& concNaIn)
175  {
176  this->M_NaIn = concNaIn;
177  }
178 
179  inline const Real& concKIn() const
180  {
181  return M_KIn;
182  }
183  inline void setKIn (const Real& concKIn)
184  {
185  this->M_KIn = concKIn;
186  }
187 
188  inline const Real& cmdnTot() const
189  {
190  return M_CmdnTot;
191  }
192  inline void setCmdnTot (const Real& cmdnTot)
193  {
194  this->M_CmdnTot = cmdnTot;
195  }
196 
197  inline const Real& csqnTot() const
198  {
199  return M_CsqnTot;
200  }
201  inline void setCsqnTot (const Real& csqnTot)
202  {
203  this->M_CsqnTot = csqnTot;
204  }
205 
206  inline const Real& constmCmdn() const
207  {
208  return M_KmCmdn;
209  }
210  inline void setKmCmdn (const Real& constmCmdn)
211  {
212  this->M_KmCmdn = constmCmdn;
213  }
214 
215  inline const Real& constmCsqn() const
216  {
217  return M_KmCsqn;
218  }
219  inline void setKmCsqn (const Real& constmCsqn)
220  {
221  this->M_KmCsqn = constmCsqn;
222  }
223 
224  inline const Real& capMem() const
225  {
226  return M_Cm;
227  }
228  inline void setCapMem (const Real& capMem)
229  {
230  this->M_Cm = capMem;
231  }
232 
233  inline const Real& farad() const
234  {
235  return M_F;
236  }
237  inline void setFarad (const Real& farad)
238  {
239  this->M_F = farad;
240  }
241 
242  inline const Real& temp() const
243  {
244  return M_T;
245  }
246  inline void setTemp (const Real& temp)
247  {
248  this->M_T = temp;
249  }
250 
251  inline const Real& gasConst() const
252  {
253  return M_R;
254  }
255  inline void setR (const Real& gasConst)
256  {
257  this->M_R = gasConst;
258  }
259 
260  inline const Real& maxCondNa() const
261  {
262  return M_GNa;
263  }
264  inline void setGNa (const Real& maxCondNa)
265  {
266  this->M_GNa = maxCondNa;
267  }
268 
269  inline const Real& maxCondKp() const
270  {
271  return M_GKp;
272  }
273  inline void setGkp (const Real& maxCondKp)
274  {
275  this->M_GKp = maxCondKp;
276  }
277 
278  inline const Real& maxCondK1() const
279  {
280  return M_GK1;
281  }
282  inline void setGk1 (const Real& maxCondK1)
283  {
284  this->M_GK1 = maxCondK1;
285  }
286 
287  inline const Real& maxCondKr() const
288  {
289  return M_GKr;
290  }
291  inline void setGkr (const Real& maxCondKr)
292  {
293  this->M_GKr = maxCondKr;
294  }
295 
296  inline const Real& maxCondKs() const
297  {
298  return M_GKs;
299  }
300  inline void setGks (const Real& maxCondKs)
301  {
302  this->M_GKs = maxCondKs;
303  }
304 
305  inline const Real& maxCondt0() const
306  {
307  return M_Gt0;
308  }
309  inline void setGkt0 (const Real& maxCondt0)
310  {
311  this->M_Gt0 = maxCondt0;
312  }
313 
314  inline const Real& kNaCa() const
315  {
316  return M_kNaCa;
317  }
318  inline void setKNaCa (const Real& kNaCa)
319  {
320  this->M_kNaCa = kNaCa;
321  }
322 
323  inline const Real& constmfCa() const
324  {
325  return M_KmfCa;
326  }
327  inline void setKmfCa (const Real& constmfCa)
328  {
329  this->M_KmfCa = constmfCa;
330  }
331 
332  inline const Real& constmK1() const
333  {
334  return M_KmK1;
335  }
336  inline void setKmK1 (const Real& constmK1)
337  {
338  this->M_KmK1 = constmK1;
339  }
340 
341  inline const Real& constmNa() const
342  {
343  return M_KmNa;
344  }
345  inline void setKmNa (const Real& constmNa)
346  {
347  this->M_KmNa = constmNa;
348  }
349 
350  inline const Real& constmCa() const
351  {
352  return M_KmCa;
353  }
354  inline void setKmCa (const Real& constmCa)
355  {
356  this->M_KmCa = constmCa;
357  }
358 
359  inline const Real& kSat() const
360  {
361  return M_kSat;
362  }
363  inline void setKSat (const Real& kSat)
364  {
365  this->M_kSat = kSat;
366  }
367 
368  inline const Real& eta() const
369  {
370  return M_eta;
371  }
372  inline void setEta (const Real& eta)
373  {
374  this->M_eta = eta;
375  }
376 
377  inline const Real& courNaK() const
378  {
379  return M_INaK;
380  }
381  inline void setINaK (const Real& courNaK)
382  {
383  this->M_INaK = courNaK;
384  }
385 
386  inline const Real& constmNai() const
387  {
388  return M_KmNai;
389  }
390  inline void setKmNai (const Real& constmNai)
391  {
392  this->M_KmNai = constmNai;
393  }
394 
395  inline const Real& constmK0() const
396  {
397  return M_KmK0;
398  }
399  inline void setKmK0 (const Real& constmK0)
400  {
401  this->M_KmK0 = constmK0;
402  }
403 
404  inline const Real& permCa() const
405  {
406  return M_PCa;
407  }
408  inline void setPnsCa (const Real& permCa)
409  {
410  this->M_PCa = permCa;
411  }
412 
413  inline const Real& constmpCa() const
414  {
415  return M_KmpCa;
416  }
417  inline void setKmpCa (const Real& constmpCa)
418  {
419  this->M_KmpCa = constmpCa;
420  }
421 
422  inline const Real& courpCa() const
423  {
424  return M_IpCa;
425  }
426  inline void setIpCa (const Real& courpCa)
427  {
428  this->M_IpCa = courpCa;
429  }
430 
431  inline const Real& maxCondCab() const
432  {
433  return M_GCab;
434  }
435  inline void setGCab (const Real& maxCondCab)
436  {
437  this->M_GCab = maxCondCab;
438  }
439 
440  inline const Real& maxCondNab() const
441  {
442  return M_GNab;
443  }
444  inline void setGNab (const Real& maxCondNab)
445  {
446  this->M_GNab = maxCondNab;
447  }
448 
449  inline const Real& constmUp() const
450  {
451  return M_KmUp;
452  }
453  inline void setKmUp (const Real& constmUp)
454  {
455  this->M_KmUp = constmUp;
456  }
457 
458  inline const Real& permCaK() const
459  {
460  return M_PCaK;
461  }
462  inline void setPCaK (const Real& permCaK)
463  {
464  this->M_PCaK = permCaK;
465  }
466 
467  inline const Real& permrel() const
468  {
469  return M_Prel;
470  }
471  inline void setPrel (const Real& permrel)
472  {
473  this->M_Prel = permrel;
474  }
475 
476  inline const Real& permleak() const
477  {
478  return M_Pleak;
479  }
480  inline void setPleak (const Real& permleak)
481  {
482  this->M_Pleak = permleak;
483  }
484 
485  inline const Real& courCaHalf() const
486  {
487  return M_ICaHalf;
488  }
489  inline void setICaHalf (const Real& courCaHalf)
490  {
491  this->M_ICaHalf = courCaHalf;
492  }
493 
494  //@}
495 
496  //! @name Methods
497  //@{
498 
499  //Compute the rhs on a single node or for the 0D case
500  void computeGatingRhs ( const std::vector<Real>& v, std::vector<Real>& rhs );
501 
502  void computeRhs ( const std::vector<Real>& v, std::vector<Real>& rhs );
503 
504 
505  //Compute the rhs with state variable interpolation
506  Real computeLocalPotentialRhs ( const std::vector<Real>& v );
507 
509 
510  void computeGatingVariablesWithRushLarsen ( std::vector<Real>& v, const Real dt );
511 
512  void computeNonGatingRhs ( const std::vector<Real>& v, std::vector<Real>& rhs );
513 
515 
516  //Compute the ionic currents (Luo and Rudy)
517  std::vector<Real> fastINa ( const std::vector<Real>& v );
518 
519  std::vector<Real> rapidIK ( const std::vector<Real>& v );
520 
521  std::vector<Real> transOutIK ( const std::vector<Real>& v );
522 
523  std::vector<Real> slowIK ( const std::vector<Real>& v );
524 
525  std::vector<Real> timeDIK ( const std::vector<Real>& v );
526 
527  Real timeIIK1 ( const std::vector<Real>& v );
528 
529  Real plaIKp ( const std::vector<Real>& v );
530 
531  Real exINaCa ( const std::vector<Real>& v );
532 
533  Real pumpINaK ( const std::vector<Real>& v );
534 
535  Real pumpIpCa ( const std::vector<Real>& v );
536 
537  Real backICab ( const std::vector<Real>& v );
538 
539  Real backINab ( const std::vector<Real>& v);
540 
541 
542  //! Display information about the model
543  void showMe();
544 
545  //@}
546 
547 private:
548  //! Cell Geometry Parameters (4)
549 
554 
555  //! Standard Ionic Concentrations (5)
556 
562 
563  //! Buffering Parameters (4)
564 
569 
570  //! Membrane Current Parameters (24)
571 
596 
597  //! SR Parameters (1)
598 
600 
601  //! L-type Ca2+ Channel Parameters (6)
602 
609 
610 
611  //@}
612 
613 
614 
615 }; // class IonicFox
616 
617 
618 }
619 
620 #endif // IonicFox_HPP_INCLUDED
const Real & capMem() const
Definition: IonicFox.hpp:224
void setIpCa(const Real &courpCa)
Definition: IonicFox.hpp:426
void setCa0(const Real &concCa0)
Definition: IonicFox.hpp:156
const Real & concNaIn() const
Definition: IonicFox.hpp:170
Real timeIIK1(const std::vector< Real > &v)
Definition: IonicFox.cpp:565
Real exINaCa(const std::vector< Real > &v)
Definition: IonicFox.cpp:589
const Real & temp() const
Definition: IonicFox.hpp:242
const Real & courNaK() const
Definition: IonicFox.hpp:377
void showMe()
Display information about the model.
Definition: IonicFox.cpp:640
Real M_ACap
Cell Geometry Parameters (4)
Definition: IonicFox.hpp:550
const Real & maxCondCab() const
Definition: IonicFox.hpp:431
void setVMyo(const Real &volMyo)
Definition: IonicFox.hpp:119
void setGkp(const Real &maxCondKp)
Definition: IonicFox.hpp:273
void setINaK(const Real &courNaK)
Definition: IonicFox.hpp:381
const Real & constmUp() const
Definition: IonicFox.hpp:449
const Real & permleak() const
Definition: IonicFox.hpp:476
ElectroIonicModel super
Definition: IonicFox.hpp:67
const Real & eta() const
Definition: IonicFox.hpp:368
Real M_PCa
L-type Ca2+ Channel Parameters (6)
Definition: IonicFox.hpp:603
void setGkr(const Real &maxCondKr)
Definition: IonicFox.hpp:291
void setKmUp(const Real &constmUp)
Definition: IonicFox.hpp:453
void setGkt0(const Real &maxCondt0)
Definition: IonicFox.hpp:309
void setCsqnTot(const Real &csqnTot)
Definition: IonicFox.hpp:201
virtual ~IonicFox()
Destructor.
Definition: IonicFox.hpp:92
std::shared_ptr< VectorEpetra > vectorPtr_Type
Definition: IonicFox.hpp:68
void setKmCmdn(const Real &constmCmdn)
Definition: IonicFox.hpp:210
void setFarad(const Real &farad)
Definition: IonicFox.hpp:237
std::vector< Real > computeLocalGatingRhs(const std::vector< Real > &v)
Definition: IonicFox.cpp:330
IonicFox()
Constructor.
Definition: IonicFox.cpp:51
const Real & permrel() const
Definition: IonicFox.hpp:467
Real M_NaO
Standard Ionic Concentrations (5)
Definition: IonicFox.hpp:557
const Real & cmdnTot() const
Definition: IonicFox.hpp:188
void setKmfCa(const Real &constmfCa)
Definition: IonicFox.hpp:327
std::vector< Real > slowIK(const std::vector< Real > &v)
Definition: IonicFox.cpp:517
void setICaHalf(const Real &courCaHalf)
Definition: IonicFox.hpp:489
void setKIn(const Real &concKIn)
Definition: IonicFox.hpp:183
const Real & constmK0() const
Definition: IonicFox.hpp:395
void computeRhs(const std::vector< Real > &v, std::vector< Real > &rhs)
This methods contains the actual evaluation of the rhs of all state variablesin the model (0D version...
Definition: IonicFox.cpp:282
const Real & volUp() const
Definition: IonicFox.hpp:133
const Real & volSR() const
Definition: IonicFox.hpp:124
Real M_Cm
Membrane Current Parameters (24)
Definition: IonicFox.hpp:572
const Real & maxCondNab() const
Definition: IonicFox.hpp:440
const Real & farad() const
Definition: IonicFox.hpp:233
RegionMesh< LinearTetra > mesh_Type
Definition: IonicFox.hpp:69
std::vector< Real > rapidIK(const std::vector< Real > &v)
Definition: IonicFox.cpp:495
void updateInverseJacobian(const UInt &iQuadPt)
void setKmpCa(const Real &constmpCa)
Definition: IonicFox.hpp:417
const Real & maxCondKr() const
Definition: IonicFox.hpp:287
const Real & maxCondK1() const
Definition: IonicFox.hpp:278
Real M_CmdnTot
Buffering Parameters (4)
Definition: IonicFox.hpp:565
const Real & maxCondKp() const
Definition: IonicFox.hpp:269
void setKSat(const Real &kSat)
Definition: IonicFox.hpp:363
void setKmNa(const Real &constmNa)
Definition: IonicFox.hpp:345
void setKNaCa(const Real &kNaCa)
Definition: IonicFox.hpp:318
void setR(const Real &gasConst)
Definition: IonicFox.hpp:255
const Real & constmCmdn() const
Definition: IonicFox.hpp:206
Real pumpIpCa(const std::vector< Real > &v)
Definition: IonicFox.cpp:614
const Real & courpCa() const
Definition: IonicFox.hpp:422
void computeGatingVariablesWithRushLarsen(std::vector< Real > &v, const Real dt)
This methods contains the actual evaluation of the rhs of the voltage equation only (0D version) ...
Definition: IonicFox.cpp:359
const Real & constmfCa() const
Definition: IonicFox.hpp:323
void setCapMem(const Real &capMem)
Definition: IonicFox.hpp:228
IonicFox(Teuchos::ParameterList &parameterList)
Definition: IonicFox.cpp:112
void setPleak(const Real &permleak)
Definition: IonicFox.hpp:480
void setCmdnTot(const Real &cmdnTot)
Definition: IonicFox.hpp:192
const Real & maxCondNa() const
Definition: IonicFox.hpp:260
void setGCab(const Real &maxCondCab)
Definition: IonicFox.hpp:435
void setGNa(const Real &maxCondNa)
Definition: IonicFox.hpp:264
const Real & kSat() const
Definition: IonicFox.hpp:359
Real M_KmUp
SR Parameters (1)
Definition: IonicFox.hpp:599
const Real & constmCsqn() const
Definition: IonicFox.hpp:215
void setPnsCa(const Real &permCa)
Definition: IonicFox.hpp:408
void setK0(const Real &concK0)
Definition: IonicFox.hpp:165
const Real & gasConst() const
Definition: IonicFox.hpp:251
void setKmNai(const Real &constmNai)
Definition: IonicFox.hpp:390
const Real & constmNai() const
Definition: IonicFox.hpp:386
Real plaIKp(const std::vector< Real > &v)
Definition: IonicFox.cpp:578
const Real & constmNa() const
Definition: IonicFox.hpp:341
const Real & concCa0() const
Definition: IonicFox.hpp:152
void setKmK1(const Real &constmK1)
Definition: IonicFox.hpp:336
std::vector< Real > computeLocalSubSysCaRhs(const std::vector< Real > &v)
Ca2+ Subsystem.
Definition: IonicFox.cpp:404
const Real & kNaCa() const
Definition: IonicFox.hpp:314
IonicModel - This class implements an ionic model.
Definition: IonicFox.hpp:61
void setKmCsqn(const Real &constmCsqn)
Definition: IonicFox.hpp:219
const Real & maxCondKs() const
Definition: IonicFox.hpp:296
IonicFox & operator=(const IonicFox &model)
Operator.
Definition: IonicFox.cpp:214
double Real
Generic real data.
Definition: LifeV.hpp:175
const Real & constmCa() const
Definition: IonicFox.hpp:350
void setPrel(const Real &permrel)
Definition: IonicFox.hpp:471
void setNa0(const Real &concNa0)
Definition: IonicFox.hpp:147
std::vector< Real > timeDIK(const std::vector< Real > &v)
Real backICab(const std::vector< Real > &v)
Definition: IonicFox.cpp:620
const Real & concK0() const
Definition: IonicFox.hpp:161
void setVsr(const Real &volSR)
Definition: IonicFox.hpp:128
void setKmK0(const Real &constmK0)
Definition: IonicFox.hpp:399
const Real & csqnTot() const
Definition: IonicFox.hpp:197
Real backINab(const std::vector< Real > &v)
Definition: IonicFox.cpp:631
const Real & permCa() const
Definition: IonicFox.hpp:404
void setGk1(const Real &maxCondK1)
Definition: IonicFox.hpp:282
std::vector< Real > transOutIK(const std::vector< Real > &v)
Definition: IonicFox.cpp:539
void computeGatingRhs(const std::vector< Real > &v, std::vector< Real > &rhs)
Methods.
Definition: IonicFox.cpp:272
void setPCaK(const Real &permCaK)
Definition: IonicFox.hpp:462
void setGks(const Real &maxCondKs)
Definition: IonicFox.hpp:300
const Real & maxCondt0() const
Definition: IonicFox.hpp:305
void setKmCa(const Real &constmCa)
Definition: IonicFox.hpp:354
const Real & concKIn() const
Definition: IonicFox.hpp:179
Real pumpINaK(const std::vector< Real > &v)
Definition: IonicFox.cpp:602
Real computeLocalPotentialRhs(const std::vector< Real > &v)
This methods contains the actual evaluation of the rhs of the voltage equation only (0D version) ...
Definition: IonicFox.cpp:313
void setEta(const Real &eta)
Definition: IonicFox.hpp:372
void setTemp(const Real &temp)
Definition: IonicFox.hpp:246
void computeNonGatingRhs(const std::vector< Real > &v, std::vector< Real > &rhs)
In the case this method is improperly used, it should use this default implementation.
Definition: IonicFox.cpp:302
const Real & constmK1() const
Definition: IonicFox.hpp:332
const Real & courCaHalf() const
Definition: IonicFox.hpp:485
const Real & volMyo() const
Definition: IonicFox.hpp:115
void setNaIn(const Real &concNaIn)
Definition: IonicFox.hpp:174
const Real & concNa0() const
Definition: IonicFox.hpp:143
void setVup(const Real &volUp)
Definition: IonicFox.hpp:138
const Real & permCaK() const
Definition: IonicFox.hpp:458
IonicFox(const IonicFox &model)
Definition: IonicFox.cpp:160
void setGNab(const Real &maxCondNab)
Definition: IonicFox.hpp:444
std::vector< Real > fastINa(const std::vector< Real > &v)
Ionic Currents (Luo and Rudy)
Definition: IonicFox.cpp:463
void setACap(const Real &areaCap)
Definition: IonicFox.hpp:110
const Real & constmpCa() const
Definition: IonicFox.hpp:413
const Real & areaCap() const
Definition: IonicFox.hpp:106