ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
BoundCond.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 BOUNDCOND_H
32#define BOUNDCOND_H
33
35#include "../Order2/CellInterfaceO2Cartesian.h" //Add for AMR, a priori does not pose a problem
37#include "../Errors.h"
38#include "../Tools.h"
39
41{
42 public:
43 BoundCond();
44 BoundCond(int numPhysique);
45 BoundCond(const BoundCond& Source, const int& lvl = 0);
46 ~BoundCond() override;
47
48 virtual void createBoundary(TypeMeshContainer<CellInterface*>& /*cellInterfaces*/)
49 {
50 Errors::errorMessage("Impossible to create the limit in createBoundary");
51 };
52 void initialize(Cell* cellLeft, Cell* /*cellRight*/) override;
53
54 void computeFlux(double& dtMax,
55 Limiter& globalLimiter,
56 Limiter& interfaceLimiter,
57 Limiter& globalVolumeFractionLimiter,
58 Limiter& interfaceVolumeFractionLimiter,
59 Prim type = vecPhases) override;
60 void computeFluxAddPhys(AddPhys& addPhys) override;
61 void solveRiemann(double& dtMax,
62 Limiter& /*globalLimiter*/,
63 Limiter& /*interfaceLimiter*/,
64 Limiter& /*globalVolumeFractionLimiter*/,
65 Limiter& /*interfaceVolumeFractionLimiter*/,
66 Prim type = vecPhases) override;
67 void addFlux(const double& /*coefAMR*/) override {}; //Since it is a boundary there is nothing to add to 'right' cell
68 virtual void solveRiemannBoundary(Cell& /*cellLeft*/, const double& /*dxLeft*/, double& /*dtMax*/)
69 {
70 Errors::errorMessage("Warning solveRiemannLimite not provided for boundary used");
71 };
72 virtual void solveRiemannTransportBoundary(Cell& /*cellLeft*/) const
73 {
74 Errors::errorMessage("Warning solveRiemannTransportLimite not provided for boundary used");
75 };
76
77 int whoAmI() const override
78 {
79 Errors::errorMessage("whoAmI not available for boundary used");
80 return 0;
81 };
82 int whoAmIHeat() const override
83 {
84 Errors::errorMessage("whoAmIHeat not available for boundary used");
85 return ADIABATIC;
86 };
87 virtual void printInfo() {};
88
89 const int& getNumPhys() const override { return m_numPhysique; };
90 double getBoundData(VarBoundary var) const override;
91 double getBoundaryHeatQuantity() const override
92 {
93 Errors::errorMessage("getBoundaryHeatQuantity not available for boundary used");
94 return 0.;
95 }
96
97 void checkMrfInterface(Source* /*sourceMRF*/) override {};
98
99 //Pour methode AMR
100 void
101 computeXi(const double& /*criteriaVar*/, const bool& /*varRho*/, const bool& /*varP*/, const bool& /*varU*/, const bool& /*varAlpha*/) override {};
102 void computeFluxXi() override;
103 void raffineCellInterfaceExterne(const int& nbCellsY,
104 const int& nbCellsZ,
105 const double& dXParent,
106 const double& dYParent,
107 const double& dZParent,
108 Cell* cellRef,
109 const int& dim) override;
110 void deraffineCellInterfaceExterne(Cell* cellRef) override;
111
112 protected:
114 std::vector<double> m_boundData;
115};
116
117#endif // BOUNDCOND_H
Prim
Enumeration for the primitive-variable type (usefull for second order, slopes, etc....
Definition Tools.h:40
@ vecPhases
Definition Tools.h:41
std::vector< Type > TypeMeshContainer
Template for the type of the mesh container (std::list for now, but may change to something else if w...
Definition Tools.h:194
VarBoundary
Enumeration for the variable to extract on a boundary.
Definition Tools.h:106
@ ADIABATIC
Definition Tools.h:118
General class for additional physics.
Definition AddPhys.h:46
void solveRiemann(double &dtMax, Limiter &, Limiter &, Limiter &, Limiter &, Prim type=vecPhases) override
Definition BoundCond.cpp:78
void raffineCellInterfaceExterne(const int &nbCellsY, const int &nbCellsZ, const double &dXParent, const double &dYParent, const double &dZParent, Cell *cellRef, const int &dim) override
Definition BoundCond.cpp:123
void computeFluxAddPhys(AddPhys &addPhys) override
Definition BoundCond.cpp:74
void computeXi(const double &, const bool &, const bool &, const bool &, const bool &) override
Definition BoundCond.h:101
void computeFluxXi() override
Definition BoundCond.cpp:114
void initialize(Cell *cellLeft, Cell *) override
Definition BoundCond.cpp:53
int m_numPhysique
Definition BoundCond.h:113
~BoundCond() override
Definition BoundCond.cpp:49
std::vector< double > m_boundData
Boundary dataset for boundary output.
Definition BoundCond.h:114
double getBoundaryHeatQuantity() const override
Definition BoundCond.h:91
void checkMrfInterface(Source *) override
Definition BoundCond.h:97
double getBoundData(VarBoundary var) const override
Definition BoundCond.cpp:108
void computeFlux(double &dtMax, Limiter &globalLimiter, Limiter &interfaceLimiter, Limiter &globalVolumeFractionLimiter, Limiter &interfaceVolumeFractionLimiter, Prim type=vecPhases) override
Definition BoundCond.cpp:61
void addFlux(const double &) override
Definition BoundCond.h:67
BoundCond()
Definition BoundCond.cpp:35
int whoAmI() const override
Definition BoundCond.h:77
const int & getNumPhys() const override
Definition BoundCond.h:89
int whoAmIHeat() const override
Definition BoundCond.h:82
virtual void printInfo()
Definition BoundCond.h:87
virtual void createBoundary(TypeMeshContainer< CellInterface * > &)
Definition BoundCond.h:48
virtual void solveRiemannTransportBoundary(Cell &) const
Definition BoundCond.h:72
virtual void solveRiemannBoundary(Cell &, const double &, double &)
Definition BoundCond.h:68
void deraffineCellInterfaceExterne(Cell *cellRef) override
Definition BoundCond.cpp:537
CellInterface()
Definition CellInterface.cpp:40
Base class for a mesh cell.
Definition Cell.h:59
static void errorMessage(const std::string &message_)
Definition Errors.cpp:56
Definition Limiter.h:38
Abstract class for source terms.
Definition Source.h:43