CEPS  24.01
Cardiac ElectroPhysiology Simulator
TTP06.hpp
Go to the documentation of this file.
1 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2  This file is part of CEPS.
3 
4  CEPS is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  CEPS is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with CEPS (see file LICENSE at root of project).
16  If not, see <https://www.gnu.org/licenses/>.
17 
18 
19  Copyright 2019-2024 Inria, Universite de Bordeaux
20 
21  Authors, in alphabetical order:
22 
23  Pierre-Elliott BECUE, Florian CARO, Yves COUDIERE(*), Andjela DAVIDOVIC,
24  Charlie DOUANLA-LONTSI, Marc FUENTES, Mehdi JUHOOR, Michael LEGUEBE(*),
25  Pauline MIGERDITICHAN, Valentin PANNETIER(*), Nejib ZEMZEMI.
26  * : currently active authors
27 
28 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
33 
48 class TTP06 : public AbstractIonicModel
49 {
50 
51  public:
52 
54  enum class Type
55  {
56  Endo,
57  MidMyo,
58  Epi
59  };
60 
62  TTP06(
63  const Type& type,
64  Unknown* u,
65  const CepsSet<CepsAttribute>& attrs={},
66  InputParameters* params=nullptr
67  );
68 
70  virtual ~TTP06() = default;
71 
73  void
74  getInitialCondition(CepsReal* v, CepsReal* y) const final;
75 
77  void
79  CepsReal t,
80  CepsReal* y,
81  CepsReal* v,
82  CepsReal* dtyL,
83  CepsReal* dtyNL,
84  CepsReal* dtv,
85  DegreeOfFreedom* dof
86  ) const final;
87 
88 
89  protected:
90 
91 
93  void
95 
96 
97  protected:
98 
100 
102 
103  // aliases for state variables
104  static constexpr const CepsInt _ki = 0;
105  static constexpr const CepsInt _nai = 1;
106  static constexpr const CepsInt _cai = 2;
107  static constexpr const CepsInt _xr1 = 3;
108  static constexpr const CepsInt _xr2 = 4;
109  static constexpr const CepsInt _xs = 5;
110  static constexpr const CepsInt _m = 6;
111  static constexpr const CepsInt _h = 7;
112  static constexpr const CepsInt _j = 8;
113  static constexpr const CepsInt _cass = 9;
114  static constexpr const CepsInt _d = 10;
115  static constexpr const CepsInt _f = 11;
116  static constexpr const CepsInt _f2 = 12;
117  static constexpr const CepsInt _fcass = 13;
118  static constexpr const CepsInt _s = 14;
119  static constexpr const CepsInt _r = 15;
120  static constexpr const CepsInt _casr = 16;
121  static constexpr const CepsInt _rprime = 17;
122 
123  // aliases for constants
124  static constexpr const CepsInt _R = 0;
125  static constexpr const CepsInt _T = 1;
126  static constexpr const CepsInt _F = 2;
127  static constexpr const CepsInt _vc = 3;
128  static constexpr const CepsInt _pkna = 4;
129  static constexpr const CepsInt _ko = 5;
130  static constexpr const CepsInt _nao = 6;
131  static constexpr const CepsInt _cao = 7;
132  static constexpr const CepsInt _gk1 = 8;
133  static constexpr const CepsInt _gkr = 9;
134  static constexpr const CepsInt _gks = 10;
135  static constexpr const CepsInt _gna = 11;
136  static constexpr const CepsInt _gbna = 12;
137  static constexpr const CepsInt _gcal = 13;
138  static constexpr const CepsInt _gbca = 14;
139  static constexpr const CepsInt _gto = 15;
140  static constexpr const CepsInt _pnak = 16;
141  static constexpr const CepsInt _kmk = 17;
142  static constexpr const CepsInt _kmna = 18;
143  static constexpr const CepsInt _knaca = 19;
144  static constexpr const CepsInt _ksat = 20;
145  static constexpr const CepsInt _alpha = 21;
146  static constexpr const CepsInt _gamma = 22;
147  static constexpr const CepsInt _kmca = 23;
148  static constexpr const CepsInt _kmnai = 24;
149  static constexpr const CepsInt _gpca = 25;
150  static constexpr const CepsInt _kpca = 26;
151  static constexpr const CepsInt _gpk = 27;
152  static constexpr const CepsInt _k1prime = 28;
153  static constexpr const CepsInt _k2prime = 29;
154  static constexpr const CepsInt _k3 = 30;
155  static constexpr const CepsInt _k4 = 31;
156  static constexpr const CepsInt _ec = 32;
157  static constexpr const CepsInt _maxsr = 33;
158  static constexpr const CepsInt _minsr = 35;
159  static constexpr const CepsInt _vrel = 36;
160  static constexpr const CepsInt _vxfer = 37;
161  static constexpr const CepsInt _kup = 38;
162  static constexpr const CepsInt _vleak = 39;
163  static constexpr const CepsInt _vmaxup = 40;
164  static constexpr const CepsInt _bufc = 41;
165  static constexpr const CepsInt _kbufc = 42;
166  static constexpr const CepsInt _bufsr = 43;
167  static constexpr const CepsInt _kbuf = 44;
168  static constexpr const CepsInt _bufss = 45;
169  static constexpr const CepsInt _kbufss = 46;
170  static constexpr const CepsInt _vsr = 47;
171  static constexpr const CepsInt _vss = 48;
172 
173 
174 };
175 
std::set< _Type, _Compare, _Alloc > CepsSet
C++ set.
Definition: CepsTypes.hpp:209
float CepsReal
Need single precision floating point.
Definition: CepsTypes.hpp:100
int32_t CepsInt
Need 32 bit integer.
Definition: CepsTypes.hpp:106
Represents a ionic model for a group of cells, i.e. multiple systems of ODEs.
A degree of freedom for any kind of problem The dof can be associated to a geometrical element or not...
FunctionDictionary that holds functions which can be used to define source terms, boundary conditions...
Reads and stores simulation configuration.
ten-Tusscher Panvilov ionic model (3 variants)
Definition: TTP06.hpp:49
static constexpr const CepsInt _pnak
Index alias.
Definition: TTP06.hpp:140
static constexpr const CepsInt _T
Index alias.
Definition: TTP06.hpp:125
CepsReal m_cellSurface
Surface of cell for unit conversion.
Definition: TTP06.hpp:101
static constexpr const CepsInt _rprime
Index alias.
Definition: TTP06.hpp:121
static constexpr const CepsInt _h
Index alias.
Definition: TTP06.hpp:111
static constexpr const CepsInt _kbuf
Index alias.
Definition: TTP06.hpp:167
static constexpr const CepsInt _k3
Index alias.
Definition: TTP06.hpp:154
static constexpr const CepsInt _xs
Index alias.
Definition: TTP06.hpp:109
static constexpr const CepsInt _gbca
Index alias.
Definition: TTP06.hpp:138
static constexpr const CepsInt _ki
Index alias.
Definition: TTP06.hpp:104
void getInitialCondition(CepsReal *v, CepsReal *y) const final
Sets initial values of state variables and transmembrane voltage for a single point....
Definition: TTP06.cpp:139
static constexpr const CepsInt _k4
Index alias.
Definition: TTP06.hpp:155
static constexpr const CepsInt _vleak
Index alias.
Definition: TTP06.hpp:162
void computeRates(CepsReal t, CepsReal *y, CepsReal *v, CepsReal *dtyL, CepsReal *dtyNL, CepsReal *dtv, DegreeOfFreedom *dof) const final
Get the linear and non linear part of the evolution function f. Also computes the ionic current.
Definition: TTP06.cpp:212
static constexpr const CepsInt _kbufss
Index alias.
Definition: TTP06.hpp:169
static constexpr const CepsInt _gbna
Index alias.
Definition: TTP06.hpp:136
static constexpr const CepsInt _gks
Index alias.
Definition: TTP06.hpp:134
static constexpr const CepsInt _kup
Index alias.
Definition: TTP06.hpp:161
static constexpr const CepsInt _gk1
Index alias.
Definition: TTP06.hpp:132
virtual ~TTP06()=default
Destructor.
static constexpr const CepsInt _nao
Index alias.
Definition: TTP06.hpp:130
static constexpr const CepsInt _f
Index alias.
Definition: TTP06.hpp:115
static constexpr const CepsInt _gpk
Index alias.
Definition: TTP06.hpp:151
static constexpr const CepsInt _bufss
Index alias.
Definition: TTP06.hpp:168
static constexpr const CepsInt _F
Index alias.
Definition: TTP06.hpp:126
Type
Model variant selector.
Definition: TTP06.hpp:55
@ Epi
Model variant selector.
@ MidMyo
Model variant selector.
@ Endo
Model variant selector.
static constexpr const CepsInt _nai
Index alias.
Definition: TTP06.hpp:105
static constexpr const CepsInt _R
Index alias.
Definition: TTP06.hpp:124
static constexpr const CepsInt _kpca
Index alias.
Definition: TTP06.hpp:150
static constexpr const CepsInt _kmca
Index alias.
Definition: TTP06.hpp:147
static constexpr const CepsInt _vss
Index alias.
Definition: TTP06.hpp:171
static constexpr const CepsInt _vsr
Index alias.
Definition: TTP06.hpp:170
static constexpr const CepsInt _gkr
Index alias.
Definition: TTP06.hpp:133
static constexpr const CepsInt _kmna
Index alias.
Definition: TTP06.hpp:142
static constexpr const CepsInt _vrel
Index alias.
Definition: TTP06.hpp:159
Type m_type
Endo, midmyo or epi.
Definition: TTP06.hpp:99
static constexpr const CepsInt _bufc
Index alias.
Definition: TTP06.hpp:164
static constexpr const CepsInt _gcal
Index alias.
Definition: TTP06.hpp:137
static constexpr const CepsInt _f2
Index alias.
Definition: TTP06.hpp:116
static constexpr const CepsInt _knaca
Index alias.
Definition: TTP06.hpp:143
static constexpr const CepsInt _j
Index alias.
Definition: TTP06.hpp:112
static constexpr const CepsInt _gamma
Index alias.
Definition: TTP06.hpp:146
static constexpr const CepsInt _ko
Index alias.
Definition: TTP06.hpp:129
static constexpr const CepsInt _kmnai
Index alias.
Definition: TTP06.hpp:148
static constexpr const CepsInt _gpca
Index alias.
Definition: TTP06.hpp:149
static constexpr const CepsInt _vxfer
Index alias.
Definition: TTP06.hpp:160
static constexpr const CepsInt _k2prime
Index alias.
Definition: TTP06.hpp:153
TTP06(const Type &type, Unknown *u, const CepsSet< CepsAttribute > &attrs={}, InputParameters *params=nullptr)
Constructor (sets constant parameters)
Definition: TTP06.cpp:32
static constexpr const CepsInt _ksat
Index alias.
Definition: TTP06.hpp:144
static constexpr const CepsInt _vmaxup
Index alias.
Definition: TTP06.hpp:163
static constexpr const CepsInt _gto
Index alias.
Definition: TTP06.hpp:139
static constexpr const CepsInt _kmk
Index alias.
Definition: TTP06.hpp:141
static constexpr const CepsInt _ec
Index alias.
Definition: TTP06.hpp:156
static constexpr const CepsInt _gna
Index alias.
Definition: TTP06.hpp:135
static constexpr const CepsInt _d
Index alias.
Definition: TTP06.hpp:114
static constexpr const CepsInt _xr2
Index alias.
Definition: TTP06.hpp:108
static constexpr const CepsInt _cass
Index alias.
Definition: TTP06.hpp:113
static constexpr const CepsInt _k1prime
Index alias.
Definition: TTP06.hpp:152
static constexpr const CepsInt _fcass
Index alias.
Definition: TTP06.hpp:117
static constexpr const CepsInt _cai
Index alias.
Definition: TTP06.hpp:106
static constexpr const CepsInt _alpha
Index alias.
Definition: TTP06.hpp:145
static constexpr const CepsInt _r
Index alias.
Definition: TTP06.hpp:119
void setupWithParameters(InputParameters *p, FunctionDictionary *dico)
Sets the constants and the space dependant parameters from text inputs.
Definition: TTP06.cpp:386
static constexpr const CepsInt _minsr
Index alias.
Definition: TTP06.hpp:158
static constexpr const CepsInt _pkna
Index alias.
Definition: TTP06.hpp:128
static constexpr const CepsInt _vc
Index alias.
Definition: TTP06.hpp:127
static constexpr const CepsInt _m
Index alias.
Definition: TTP06.hpp:110
static constexpr const CepsInt _casr
Index alias.
Definition: TTP06.hpp:120
static constexpr const CepsInt _xr1
Index alias.
Definition: TTP06.hpp:107
static constexpr const CepsInt _s
Index alias.
Definition: TTP06.hpp:118
static constexpr const CepsInt _bufsr
Index alias.
Definition: TTP06.hpp:166
static constexpr const CepsInt _kbufc
Index alias.
Definition: TTP06.hpp:165
static constexpr const CepsInt _cao
Index alias.
Definition: TTP06.hpp:131
static constexpr const CepsInt _maxsr
Index alias.
Definition: TTP06.hpp:157
A class used to defined an unknown of a PDE problem The unknown can be defined on a specific region,...
Definition: Unknown.hpp:45