CEPS  24.01
Cardiac ElectroPhysiology Simulator
AP95.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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
30 #pragma once
31 
34 
40 class AP95 : public AbstractIonicModel
41 {
42 
43  public :
44 
46  AP95(
47  Unknown* u,
48  const CepsSet<CepsAttribute>& attrs={},
49  InputParameters* params=nullptr
50  );
51 
53  virtual ~AP95() = default;
54 
56  void
57  getInitialCondition(CepsReal* v, CepsReal* y) const final;
58 
60  void
62  CepsReal t,
63  CepsReal* y,
64  CepsReal* v,
65  CepsReal* dtyL,
66  CepsReal* dtyNL,
67  CepsReal* dtv,
68  DegreeOfFreedom* dof
69  ) const final;
70 
72  CepsReal
73  convertVoltageToCepsUnit(const CepsReal& u) const override;
74 
76  CepsReal
77  convertVoltageFromCepsUnit(const CepsReal& u) const override;
78 
80  CepsReal
81  convertDtvToCepsUnit(const CepsReal& i) const override;
82 
84  CepsReal
85  convertCurrentFromCepsUnit(const CepsReal& i) const override;
86 
88  CepsReal
89  convertCmFromCepsUnit(const CepsReal& cm) const override;
90 
92  CepsReal
93  convertCmToCepsUnit(const CepsReal& cm) const override;
94 
95 
96  protected:
97 
98 
100  void
102 
103  protected:
104 
108 
109  // alias for gates variables
110  static constexpr const CepsInt _h = 0;
111 
112  // aliases for parameters
113  static constexpr const CepsInt _k = 0;
114  static constexpr const CepsInt _a = 1;
115  static constexpr const CepsInt _mu1 = 2;
116  static constexpr const CepsInt _mu2 = 3;
117  static constexpr const CepsInt _eps0 = 4;
118 
119 };
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
Aliev-Panfilov ionic model.
Definition: AP95.hpp:41
CepsReal convertVoltageFromCepsUnit(const CepsReal &u) const override
Convert from mV to no unit.
Definition: AP95.cpp:110
void getInitialCondition(CepsReal *v, CepsReal *y) const final
Sets initial values of state variables and transmembrane voltage for a single point....
Definition: AP95.cpp:69
static constexpr const CepsInt _eps0
indexing alias
Definition: AP95.hpp:117
CepsReal convertCmToCepsUnit(const CepsReal &cm) const override
Convert capacitance from ionic model units to ceps units (uF/cm2).
Definition: AP95.cpp:134
static constexpr const CepsInt _mu2
indexing alias
Definition: AP95.hpp:116
CepsReal convertVoltageToCepsUnit(const CepsReal &u) const override
Convert from no unit to mV.
Definition: AP95.cpp:104
CepsReal convertCmFromCepsUnit(const CepsReal &cm) const override
Convert capacitance from ceps units (uF/cm2) to ionic model units.
Definition: AP95.cpp:128
CepsReal m_cellSurface
surface of a cell used for unit scaling. Default is surface of a cylinder (r=10um,...
Definition: AP95.hpp:107
AP95(Unknown *u, const CepsSet< CepsAttribute > &attrs={}, InputParameters *params=nullptr)
Constructor (sets constants)
Definition: AP95.cpp:32
void setupWithParameters(InputParameters *p, FunctionDictionary *dico)
Sets the constants and the space dependant parameters from text inputs.
Definition: AP95.cpp:140
virtual ~AP95()=default
Destructor.
CepsReal convertDtvToCepsUnit(const CepsReal &i) const override
Convert from s-1 to uA per cm2.
Definition: AP95.cpp:122
static constexpr const CepsInt _h
indexing alias
Definition: AP95.hpp:110
CepsReal m_vMax
upper bound of voltage normalization interval
Definition: AP95.hpp:106
static constexpr const CepsInt _a
indexing alias
Definition: AP95.hpp:114
CepsReal m_vMin
lower bound of voltage normalization interval
Definition: AP95.hpp:105
static constexpr const CepsInt _k
indexing alias
Definition: AP95.hpp:113
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: AP95.cpp:76
CepsReal convertCurrentFromCepsUnit(const CepsReal &i) const override
Convert from uA per cm2 to s-1.
Definition: AP95.cpp:116
static constexpr const CepsInt _mu1
indexing alias
Definition: AP95.hpp:115
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.
A class used to defined an unknown of a PDE problem The unknown can be defined on a specific region,...
Definition: Unknown.hpp:45