CEPS  24.01
Cardiac ElectroPhysiology Simulator
SourceTerm.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 
33 
34 template <class _Result>
35 class SourceTerm;
36 
43 
48 template <class _Result>
49 class SourceTerm : public Field<_Result,DegreeOfFreedom>
50 {
51  public:
52 
63  SAFunc<_Result>* functor,
64  const CepsVector<DegreeOfFreedom*>* domain,
65  CepsUnknownIndex unknown,
66  CepsBool isStim = false,
67  CepsBool isLaplaceMatrix = false,
68  CepsBool bufferize = false
69  );
70 
72  ~SourceTerm() override;
73 
75  void
77 
80  getFlag() const;
81 
84  getUnknownId() const;
85 
87  CepsBool
89 
91  friend class SourceTermManager;
92 
93  protected:
96 };
97 
CepsSourceTermFlag
Source terms flags.
Definition: CepsEnums.hpp:163
CepsIndex CepsUnknownIndex
For unknowns.
Definition: CepsTypes.hpp:217
std::vector< _Type, _Alloc > CepsVector
C++ vector.
Definition: CepsTypes.hpp:155
bool CepsBool
Booleans.
Definition: CepsTypes.hpp:124
A Field is an object wrapped around a SAFunc functor, defined on at least one domain.
Definition: Field.hpp:80
A SAFunc is a ceps::Function that uses CepsStandardArgs as argument of call operator (),...
Definition: SAFunc.hpp:100
Source term manager to create and manage SourceTerm objects.
Source term, essentially a ScalarField.
Definition: SourceTerm.hpp:50
CepsUnknownIndex getUnknownId() const
Get the name of the unknown.
~SourceTerm() override
Delete data.
void setFlag(const CepsSourceTermFlag &flag)
Set the source term flag.
CepsUnknownIndex m_unknown
Unknown for which the source term applies.
Definition: SourceTerm.hpp:95
CepsSourceTermFlag m_sourceFlag
source term flag
Definition: SourceTerm.hpp:94
CepsSourceTermFlag getFlag() const
Get the source term flag.
CepsBool hasOption(CepsSourceTermFlag flag) const
Knowing the behavior relating to source term flag.
SourceTerm(SAFunc< _Result > *functor, const CepsVector< DegreeOfFreedom * > *domain, CepsUnknownIndex unknown, CepsBool isStim=false, CepsBool isLaplaceMatrix=false, CepsBool bufferize=false)
Construct a new Source Term object.