ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
AddPhys.h
Go to the documentation of this file.
1//
2// ,---. ,--, .---. ,--, ,---. .-. .-.
3// | .-' .' .') / .-. ) .' .' | .-' | \| |
4// | `-. | |(_) | | |(_) | | __ | `-. | | |
5// | .-' \ \ | | | | \ \ ( _) | .-' | |\ |
6// | `--. \ `-. \ `-' / \ `-) ) | `--. | | |)|
7// /( __.' \____\ )---' )\____/ /( __.' /( (_)
8// (__) (_) (__) (__) (__)
9// Official webSite: https://code-mphi.github.io/ECOGEN/
10//
11// This file is part of ECOGEN.
12//
13// ECOGEN is the legal property of its developers, whose names
14// are listed in the copyright file included with this source
15// distribution.
16//
17// ECOGEN is free software: you can redistribute it and/or modify
18// it under the terms of the GNU General Public License as published
19// by the Free Software Foundation, either version 3 of the License,
20// or (at your option) any later version.
21//
22// ECOGEN is distributed in the hope that it will be useful,
23// but WITHOUT ANY WARRANTY; without even the implied warranty of
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25// GNU General Public License for more details.
26//
27// You should have received a copy of the GNU General Public License
28// along with ECOGEN (file LICENSE).
29// If not, see <http://www.gnu.org/licenses/>.
30
31#ifndef ADDPHYS_H
32#define ADDPHYS_H
33
34class AddPhys; //Predeclaration of the AddPhys class to include Cell.h and CellInterface.h
35
36#include "../Errors.h"
37#include "../Order1/Cell.h"
39#include "QuantitiesAddPhys.h"
41
46{
47 public:
48 AddPhys();
49 virtual ~AddPhys();
50
53 virtual void addQuantityAddPhys(Cell* /*cell*/) { Errors::errorMessage("addQuantityAddPhys not implemented for used additional physics"); };
54
55 virtual std::string whoAmI() const
56 {
57 Errors::errorMessage("whoAmI not implemented for used additional physics");
58 return std::string("");
59 };
60
63 virtual double computeEnergyAddPhys(QuantitiesAddPhys* /*QPA*/) { return 0.; };
66 void computeFluxAddPhys(CellInterface* cellInterface);
69 void computeFluxAddPhysBoundary(CellInterface* cellInterface);
72 void addNonConsAddPhys(Cell* cell);
75 virtual void solveFluxAddPhys(CellInterface* /*cellInterface*/)
76 {
77 Errors::errorMessage("solveFluxAddPhys not implemented for used additional physics");
78 };
79
81 virtual void solveFluxAddPhysBoundary(CellInterface* /*cellInterface*/)
82 {
83 Errors::errorMessage("solveFluxAddPhysLimite not implemented for used additional physics");
84 };
85
88 virtual void addFluxAddPhys(CellInterface* cellInterface, const double& coefAMR);
92 virtual void subtractFluxAddPhys(CellInterface* cellInterface, const double& coefAMR);
95 virtual void addNonCons(Cell* /*cell*/) { Errors::errorMessage("addNonCons not implemented for used additional physics"); };
98 virtual void addSymmetricTermsRadialAxisOnX(Cell* /*cell*/)
99 {
100 Errors::errorMessage("addSymmetricTerms not implemented for used additional physics");
101 };
102
104 virtual void addSymmetricTermsRadialAxisOnY(Cell* /*cell*/)
105 {
106 Errors::errorMessage("addSymmetricTerms not implemented for used additional physics");
107 };
108
112 virtual void reinitializeColorFunction(std::vector<Cell*>* /*cellsLvl*/, const int& /*lvl*/) {};
113
115 virtual bool reinitializationActivated() { return false; };
116
120 virtual void communicationsAddPhys(const int& /*dim*/, const int& /*lvl*/)
121 {
122 Errors::errorMessage("communicationsAddPhys not implemented for used additional physics");
123 };
124
126 virtual const int& getNumTransportAssociated() const
127 {
128 Errors::errorMessage("getNumTransportAssociated not implemented for used additional physics");
129 return Errors::defaultInt;
130 };
131
133 virtual void computeTurbulenceParameters() const
134 {
135 Errors::errorMessage("computeTurbulenceParameters not implemented for used additional physics");
136 };
137
138 protected:
139 private:
140};
141
142#endif // ADDPHYS_H
General class for additional physics.
Definition AddPhys.h:46
virtual void solveFluxAddPhys(CellInterface *)
Solve the additional physics flux between two cells.
Definition AddPhys.h:75
virtual std::string whoAmI() const
Definition AddPhys.h:55
virtual void addNonCons(Cell *)
Add the non-conservative terms of the corresponding additional physics in a cell.
Definition AddPhys.h:95
virtual double computeEnergyAddPhys(QuantitiesAddPhys *)
Compute and send back mass energy linked to the physics (0 if no linked energy).
Definition AddPhys.h:63
virtual void addSymmetricTermsRadialAxisOnY(Cell *)
Add the symmetrical terms of the corresponding additional physics in a cell (when radial axis is on Y...
Definition AddPhys.h:104
virtual void addQuantityAddPhys(Cell *)
Add the quantities for the additional physics.
Definition AddPhys.h:53
virtual void solveFluxAddPhysBoundary(CellInterface *)
Solve the additional physics flux at a domain boundary.
Definition AddPhys.h:81
virtual void computeTurbulenceParameters() const
Print the diagnostics for turbulence decay cases.
Definition AddPhys.h:133
void addNonConsAddPhys(Cell *cell)
Add the non-conservative terms of the additional physics in a cell.
Definition AddPhys.cpp:89
virtual void communicationsAddPhys(const int &, const int &)
Communication of the additional physics quantities for parallel purposes with Adaptive Mesh Refinemen...
Definition AddPhys.h:120
AddPhys()
Definition AddPhys.cpp:35
virtual const int & getNumTransportAssociated() const
Return the associated number of the transport equation (only used for surface tension).
Definition AddPhys.h:126
virtual void addSymmetricTermsRadialAxisOnX(Cell *)
Add the symmetrical terms of the corresponding additional physics in a cell (when radial axis is on X...
Definition AddPhys.h:98
virtual bool reinitializationActivated()
Send back true if the reinitialization of the color function is activated.
Definition AddPhys.h:115
virtual void addFluxAddPhys(CellInterface *cellInterface, const double &coefAMR)
Add the additional physics flux between two cells at the corresponding cell.
Definition AddPhys.cpp:71
virtual void reinitializeColorFunction(std::vector< Cell * > *, const int &)
Reinitialize the color function for the surface-tension terms with the volume fraction equation.
Definition AddPhys.h:112
virtual ~AddPhys()
Definition AddPhys.cpp:39
virtual void subtractFluxAddPhys(CellInterface *cellInterface, const double &coefAMR)
Subtract the additional physics flux between two cells at the corresponding cell.
Definition AddPhys.cpp:80
void computeFluxAddPhys(CellInterface *cellInterface)
Compute the additional physics flux between two cells.
Definition AddPhys.cpp:43
void computeFluxAddPhysBoundary(CellInterface *cellInterface)
Compute the additional physics flux at a domain boundary.
Definition AddPhys.cpp:63
Definition CellInterface.h:48
Base class for a mesh cell.
Definition Cell.h:59
static constexpr int defaultInt
Definition Errors.h:97
static void errorMessage(const std::string &message_)
Definition Errors.cpp:56
General class for additional-physics quantities.
Definition QuantitiesAddPhys.h:42