CEPS  24.01
Cardiac ElectroPhysiology Simulator
PacemakerBidomainProblem.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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
31 #pragma once
32 
35 
39 {
40 
41  public:
42 
44  struct UnknownsName
45  {
47  static constexpr const char* vm = ExtendedBidomainProblem::UnknownsName::vm;
49  static constexpr const char* ue = ExtendedBidomainProblem::UnknownsName::ue;
51  static constexpr const char* UCathode = "Cathode potential (mV)";
53  static constexpr const char* UAnode = "Anode potential (mV)";
55  static constexpr const char* VCets = "CETS voltage (mV)";
57  static constexpr const char* VCts = "CTS voltage (mV)";
58  };
59 
60 
61  public:
62 
65  {
66 
67  public:
68 
71 
73  ~PowerSupply() override = default;
74 
76  CepsReal
77  eval(CepsStandardArgs args) final;
78 
79 
80  protected:
81 
83  };
84 
86  explicit PacemakerBidomainProblem(Geometry* g, InputParameters* = nullptr);
87 
89  virtual ~PacemakerBidomainProblem() = default;
90 
92  void
93  getInitialCondition(DHVecPtr v0) const override;
94 
97  void
98  defineUnknowns() override;
99 
101  void
102  defineBoundaryConditions() override;
103 
105  void
106  defineSourceTerms() override;
107 
109  void
110  run() override;
111 
114  getAnodeAttributes() const override;
115 
118  getCathodeAttributes() const override;
119 
120  // ------------------------------------------------------- //
121  // Unknowns
122 
124  Unknown*
125  getUAnodeUnknown() const override;
126 
127  // /// @brief Link to the Um unknown of the problem
128  Unknown*
129  getUCathodeUnknown() const override;
130 
132  Unknown*
133  getVCetsUnknown() const override;
134 
136  Unknown*
137  getVCtsUnknown() const override;
138 
139 
140  protected:
141 
143  void
144  setupWithParameters(InputParameters* params) override;
145 
146 };
std::set< _Type, _Compare, _Alloc > CepsSet
C++ set.
Definition: CepsTypes.hpp:209
float CepsReal
Need single precision floating point.
Definition: CepsTypes.hpp:100
std::shared_ptr< DistributedHaloVector > DHVecPtr
Typedef for pointer on Distributed Halo CepsVector.
Common elements of problems with a pacemaker.
Bidomain equation with extracardiac medium main class.
Encapsulates all the geometrical data.
Definition: Geometry.hpp:50
Reads and stores simulation configuration.
PowerSupply(PacemakerBidomainProblem *problem)
constructor
~PowerSupply() override=default
destructor
PacemakerBidomainProblem * m_problem
Linked problem.
CepsReal eval(CepsStandardArgs args) final
Evaluation function.
Bidomain equation with extracardiac medium and connected to a pacemaker main class.
CepsSet< CepsAttribute > getAnodeAttributes() const override
Get cathode attributes if set.
void setupWithParameters(InputParameters *params) override
Sets options from the parameters.
Unknown * getUAnodeUnknown() const override
Link to the Up unknown of the problem.
void defineSourceTerms() override
Define the source terms.
Unknown * getVCetsUnknown() const override
Link to the VCets unknown of the problem.
Unknown * getUCathodeUnknown() const override
Link to the Um unknown of the problem.
CepsSet< CepsAttribute > getCathodeAttributes() const override
Get cathode attributes if set.
PacemakerBidomainProblem(Geometry *g, InputParameters *=nullptr)
Constructor from geometry and possibly parameters.
Unknown * getVCtsUnknown() const override
Link to the VCts unknown of the problem.
virtual ~PacemakerBidomainProblem()=default
Destructor.
void defineUnknowns() override
Transmembrane voltage (mV), Extracellular potential (mV) and both potential of the pacemaker.
void defineBoundaryConditions() override
Define the boundary conditions.
void run() override
Run the simulation.
void getInitialCondition(DHVecPtr v0) const override
Zero and fill with initial conditions for vm and ue, and put QCets to Cets*AmpStim.
A class used to defined an unknown of a PDE problem The unknown can be defined on a specific region,...
Definition: Unknown.hpp:45
Structure used to pass arguments to SAFunc (see pde directory) The flags of the SAFunc allows extract...
Definition: CepsTypes.hpp:239
static constexpr const char * vm
Transmembrane voltage.
static constexpr const char * ue
Extracellular and extracardiac potential.
static constexpr const char * VCts
Voltage on reserve capacitor.
static constexpr const char * ue
Extracellular and extracardiac potential.
static constexpr const char * UCathode
Potential of cathode (device side)
static constexpr const char * VCets
Voltage on tank capacitor.
static constexpr const char * UAnode
Potential of anode (device side)
static constexpr const char * vm
Transmebrane voltage.