CEPS  24.01
Cardiac ElectroPhysiology Simulator
PacemakerPoissonProblem.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* u = "Potential field (mV)";
49  static constexpr const char* UCathode = "Cathode potential (mV)";
51  static constexpr const char* UAnode = "Anode potential (mV)";
53  static constexpr const char* VCets = "CETS voltage (mV)";
55  static constexpr const char* VCts = "CTS voltage (mV)";
56  };
57 
58 
59  public:
60 
63  {
64 
65  public:
66 
69 
71  ~PowerSupply() override = default;
72 
74  CepsReal
75  eval(CepsStandardArgs args) final;
76 
77  };
78 
80  explicit PacemakerPoissonProblem(Geometry* g, InputParameters* = nullptr);
81 
83  virtual ~PacemakerPoissonProblem() = default;
84 
86  void
87  getInitialCondition(DHVecPtr v0) const override;
88 
91  void
92  defineUnknowns() override;
93 
95  void
96  defineBoundaryConditions() override;
97 
99  void
100  defineSourceTerms() override;
101 
103  void
104  run() override;
105 
108  getAnodeAttributes() const;
109 
112  getCathodeAttributes() const;
113 
114  // ------------------------------------------------------- //
115  // Unknowns
116 
118  Unknown*
119  getUFieldUnknown() const;
120 
122  Unknown*
123  getUAnodeUnknown() const override;
124 
125  // /// @brief Link to the Um unknown of the problem
126  Unknown*
127  getUCathodeUnknown() const override;
128 
130  Unknown*
131  getVCetsUnknown() const override;
132 
134  Unknown*
135  getVCtsUnknown() const override;
136 
137 
138  protected:
139 
141  void
142  setupWithParameters(InputParameters* params) override;
143 
144 };
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.
Encapsulates all the geometrical data.
Definition: Geometry.hpp:50
Heat PDE, single unknown, constant diffusion coeff 1, homogeneous Neumann (no BC defined)
Definition: HeatProblem.hpp:36
Reads and stores simulation configuration.
PowerSupply(PacemakerPoissonProblem *problem)
constructor
CepsReal eval(CepsStandardArgs args) final
Evaluation function.
~PowerSupply() override=default
destructor
Bidomain equation with extracardiac medium and connected to a pacemaker main class.
Unknown * getVCtsUnknown() const override
Link to the VCts unknown of the problem.
Unknown * getUFieldUnknown() const
Link to the u unknown of the problem.
Unknown * getVCetsUnknown() const override
Link to the VCets unknown of the problem.
void run() override
Run the simulation.
Unknown * getUCathodeUnknown() const override
Link to the Um unknown of the problem.
void getInitialCondition(DHVecPtr v0) const override
Zero and fill with initial conditions for vm and ue, and put QCets to Cets*AmpStim.
void defineSourceTerms() override
Define the source terms.
CepsSet< CepsAttribute > getAnodeAttributes() const
Get cathode attributes if set.
void defineBoundaryConditions() override
Define the boundary conditions.
void defineUnknowns() override
Transmembrane voltage (mV), Extracellular potential (mV) and both potential of the pacemaker.
CepsSet< CepsAttribute > getCathodeAttributes() const
Get cathode attributes if set.
virtual ~PacemakerPoissonProblem()=default
Destructor.
void setupWithParameters(InputParameters *params) override
Sets options from the parameters.
PacemakerPoissonProblem(Geometry *g, InputParameters *=nullptr)
Constructor from geometry and possibly parameters.
Unknown * getUAnodeUnknown() const override
Link to the Up unknown of the problem.
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
Struct for all names of unknowns.
static constexpr const char * UAnode
Potential of anode (device side)
static constexpr const char * VCts
Voltage on reserve capacitor.
static constexpr const char * u
Potential in computational domain.
static constexpr const char * UCathode
Potential of cathode (device side)
static constexpr const char * VCets
Voltage on tank capacitor.