ECOGEN 4.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"
38#include "../Order1/CellInterface.h"
39#include "QuantitiesAddPhys.h"
40#include "../Parallel/Parallel.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 physic"); };
54
55 virtual std::string whoAmI() const { Errors::errorMessage("whoAmI not implemented for used additional physic"); return 0; };
56
59 virtual double computeEnergyAddPhys(QuantitiesAddPhys* /*QPA*/) { return 0.; };
62 void computeFluxAddPhys(CellInterface* cellInterface);
65 void computeFluxAddPhysBoundary(CellInterface* cellInterface);
68 void addNonConsAddPhys(Cell* cell);
71 virtual void solveFluxAddPhys(CellInterface* /*cellInterface*/) { Errors::errorMessage("solveFluxAddPhys not implemented for used additional physic"); };
74 virtual void solveFluxAddPhysBoundary(CellInterface* /*cellInterface*/) { Errors::errorMessage("solveFluxAddPhysLimite not implemented for used additional physic"); };
78 virtual void addFluxAddPhys(CellInterface* cellInterface, const double& coefAMR);
82 virtual void subtractFluxAddPhys(CellInterface* cellInterface, const double& coefAMR);
85 virtual void addNonCons(Cell* /*cell*/) { Errors::errorMessage("addNonCons not implemented for used additional physic"); };
88 virtual void addSymmetricTermsRadialAxisOnX(Cell* /*cell*/) { Errors::errorMessage("addSymmetricTerms not implemented for used additional physic"); };
91 virtual void addSymmetricTermsRadialAxisOnY(Cell* /*cell*/) { Errors::errorMessage("addSymmetricTerms not implemented for used additional physic"); };
92
96 virtual void reinitializeColorFunction(std::vector<Cell*>* /*cellsLvl*/, const int& /*lvl*/) {};
97
99 virtual bool reinitializationActivated() { return false; };
100
104 virtual void communicationsAddPhys(const int& /*dim*/, const int& /*lvl*/) { Errors::errorMessage("communicationsAddPhys not implemented for used additional physic"); };
105
107 virtual const int& getNumTransportAssociated() const { Errors::errorMessage("getNumTransportAssociated not implemented for used additional physic"); return Errors::defaultInt; };
108
109 protected:
110
111 private:
112};
113
114#endif // ADDPHYS_H
General class for additional physics.
Definition AddPhys.h:46
virtual void solveFluxAddPhys(CellInterface *)
Solve the additional physic flux between two cells.
Definition AddPhys.h:71
virtual std::string whoAmI() const
Definition AddPhys.h:55
virtual void addNonCons(Cell *)
Add the non-conservative terms of the corresponding additional physic in a cell.
Definition AddPhys.h:85
virtual double computeEnergyAddPhys(QuantitiesAddPhys *)
Compute and send back mass energy linked to the physic (0 if no linked energy)
Definition AddPhys.h:59
virtual void addSymmetricTermsRadialAxisOnY(Cell *)
Add the symmetrical terms of the corresponding additional physic in a cell (when radial axis is on Y)
Definition AddPhys.h:91
virtual void addQuantityAddPhys(Cell *)
Add the quantities for the additional physic.
Definition AddPhys.h:53
virtual void solveFluxAddPhysBoundary(CellInterface *)
Solve the additional physic flux at a domain boundary.
Definition AddPhys.h:74
void addNonConsAddPhys(Cell *cell)
Add the non-conservative terms of the additional physic 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:104
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:107
virtual void addSymmetricTermsRadialAxisOnX(Cell *)
Add the symmetrical terms of the corresponding additional physic in a cell (when radial axis is on X)
Definition AddPhys.h:88
virtual bool reinitializationActivated()
Send back true if the reinitialization of the color function is activated.
Definition AddPhys.h:99
virtual void addFluxAddPhys(CellInterface *cellInterface, const double &coefAMR)
Add the additional physic 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:96
virtual ~AddPhys()
Definition AddPhys.cpp:39
virtual void subtractFluxAddPhys(CellInterface *cellInterface, const double &coefAMR)
Subtract the additional physic flux between two cells at the corresponding cell.
Definition AddPhys.cpp:80
void computeFluxAddPhys(CellInterface *cellInterface)
Compute the additional physic flux between two cells.
Definition AddPhys.cpp:43
void computeFluxAddPhysBoundary(CellInterface *cellInterface)
Compute the additional physic flux at a domain boundary.
Definition AddPhys.cpp:63
Definition CellInterface.h:52
Base class for a mesh cell.
Definition Cell.h:59
static constexpr int defaultInt
Definition Errors.h:91
static void errorMessage(const std::string &message)
Definition Errors.cpp:56
General class for additional-physics quantities.
Definition QuantitiesAddPhys.h:42