ECOGEN 4.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
34#include "../Order1/CellInterface.h"
35#include "../Order2/CellInterfaceO2Cartesian.h" //Add for AMR, a priori does not pose a problem
36#include "../libTierces/tinyxml2.h"
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 virtual ~BoundCond();
47
48 virtual void createBoundary(TypeMeshContainer<CellInterface*>& /*cellInterfaces*/) { Errors::errorMessage("Impossible to create the limit in createBoundary"); };
49 virtual void createBoundary(TypeMeshContainer<CellInterface*>& /*cellInterfaces*/, std::string /*ordreCalcul*/) { Errors::errorMessage("Impossible to create the limit in createBoundary"); };
50 virtual void initialize(Cell* cellLeft, Cell* /*cellRight*/);
51
52 virtual void computeFlux(double& dtMax, Limiter& globalLimiter, Limiter& interfaceLimiter, Limiter& globalVolumeFractionLimiter, Limiter& interfaceVolumeFractionLimiter, Prim type = vecPhases);
53 virtual void computeFluxAddPhys(AddPhys& addPhys);
54 virtual void solveRiemann(double& dtMax, Limiter& /*globalLimiter*/, Limiter& /*interfaceLimiter*/, Limiter& /*globalVolumeFractionLimiter*/, Limiter& /*interfaceVolumeFractionLimiter*/, Prim type = vecPhases);
55 virtual void addFlux(const double& /*coefAMR*/) {}; //Since it is a boundary there is nothing to add to 'right' cell
56 virtual void solveRiemannBoundary(Cell& /*cellLeft*/, const double& /*dxLeft*/, double& /*dtMax*/) { Errors::errorMessage("Warning solveRiemannLimite not provided for boundary used"); };
57 virtual void solveRiemannTransportBoundary(Cell& /*cellLeft*/) const { Errors::errorMessage("Warning solveRiemannTransportLimite not provided for boundary used"); };
58
59 virtual int whoAmI() const { Errors::errorMessage("whoAmI not available for boundary used"); return 0; };
60 virtual int whoAmIHeat() const { Errors::errorMessage("whoAmIHeat not available for boundary used"); return ADIABATIC; };
61 virtual void printInfo(){};
62
63 virtual const int& getNumPhys() const { return m_numPhysique; };
64 virtual double getBoundData(VarBoundary var) const;
65 virtual double getBoundaryHeatQuantity() const { Errors::errorMessage("getBoundaryHeatQuantity not available for boundary used"); return 0.; }
66
67 virtual void checkMrfInterface(Source* /*sourceMRF*/) {};
68
69 //Pour methode AMR
70 virtual void computeXi(const double& /*criteriaVar*/, const bool& /*varRho*/, const bool& /*varP*/, const bool& /*varU*/, const bool& /*varAlpha*/) {};
71 virtual void computeFluxXi();
72 virtual void raffineCellInterfaceExterne(const int& nbCellsY, const int& nbCellsZ, const double& dXParent, const double& dYParent, const double& dZParent, Cell* cellRef, const int& dim);
73 virtual void deraffineCellInterfaceExterne(Cell* cellRef);
74
75 protected:
77 std::vector<double> m_boundData;
78};
79
80#endif // BOUNDCOND_H
Prim
Enumeration for the primitive-variable type (usefull for second order, slopes, etc....
Definition Tools.h:39
@ vecPhases
Definition Tools.h:39
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:83
VarBoundary
Enumeration for the variable to extract on a boundary.
Definition Tools.h:60
@ ADIABATIC
Definition Tools.h:63
General class for additional physics.
Definition AddPhys.h:46
Definition BoundCond.h:41
virtual void computeXi(const double &, const bool &, const bool &, const bool &, const bool &)
Definition BoundCond.h:70
int m_numPhysique
Definition BoundCond.h:76
virtual void computeFlux(double &dtMax, Limiter &globalLimiter, Limiter &interfaceLimiter, Limiter &globalVolumeFractionLimiter, Limiter &interfaceVolumeFractionLimiter, Prim type=vecPhases)
Definition BoundCond.cpp:61
virtual double getBoundaryHeatQuantity() const
Definition BoundCond.h:65
std::vector< double > m_boundData
Boundary dataset for boundary output.
Definition BoundCond.h:77
virtual double getBoundData(VarBoundary var) const
Definition BoundCond.cpp:100
virtual void addFlux(const double &)
Definition BoundCond.h:55
BoundCond()
Definition BoundCond.cpp:35
virtual const int & getNumPhys() const
Definition BoundCond.h:63
virtual void checkMrfInterface(Source *)
Definition BoundCond.h:67
virtual ~BoundCond()
Definition BoundCond.cpp:49
virtual void computeFluxAddPhys(AddPhys &addPhys)
Definition BoundCond.cpp:70
virtual void initialize(Cell *cellLeft, Cell *)
Definition BoundCond.cpp:53
virtual void solveRiemann(double &dtMax, Limiter &, Limiter &, Limiter &, Limiter &, Prim type=vecPhases)
Definition BoundCond.cpp:77
virtual void raffineCellInterfaceExterne(const int &nbCellsY, const int &nbCellsZ, const double &dXParent, const double &dYParent, const double &dZParent, Cell *cellRef, const int &dim)
Definition BoundCond.cpp:118
virtual int whoAmIHeat() const
Definition BoundCond.h:60
virtual void deraffineCellInterfaceExterne(Cell *cellRef)
Definition BoundCond.cpp:469
virtual void computeFluxXi()
Definition BoundCond.cpp:109
virtual void printInfo()
Definition BoundCond.h:61
virtual void createBoundary(TypeMeshContainer< CellInterface * > &)
Definition BoundCond.h:48
virtual void createBoundary(TypeMeshContainer< CellInterface * > &, std::string)
Definition BoundCond.h:49
virtual void solveRiemannTransportBoundary(Cell &) const
Definition BoundCond.h:57
virtual void solveRiemannBoundary(Cell &, const double &, double &)
Definition BoundCond.h:56
virtual int whoAmI() const
Definition BoundCond.h:59
Definition CellInterface.h:52
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