ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
CellO2.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 CELLO2_H
32#define CELLO2_H
33
34#include "../Order1/Cell.h"
35#include "CellInterfaceO2.h"
36
37class CellO2 : public Cell
38{
39 public:
40 CellO2();
41 CellO2(int lvl); //Pour AMR
42 ~CellO2() override;
43 void allocate(const std::vector<AddPhys*>& addPhys) override;
44 void copyPhase(const int& phaseNumber, Phase* phase) override;
45 void saveCons() override;
46 void getBackCons() override;
47 void predictionOrdre2(const double& dt, Symmetry* symmetry) override;
48 void correctionEnergy(Prim type = vecPhases) override;
49 void fulfillState(Prim type = vecPhases) override;
50
51 //Set/Get
52 Phase* getPhase(const int& phaseNumber, Prim type = vecPhases) const override;
53 Phase** getPhases(Prim type = vecPhases) const override;
54 Mixture* getMixture(Prim type = vecPhases) const override;
55 Transport& getTransport(const int& numTransport, Prim type = vecPhases) const override;
56 Transport* getTransports(Prim type = vecPhases) const override;
57 void setTransport(double value, int& numTransport, Prim type = vecPhases) override;
58
59 // For 2nd order with parallel
60 void getBufferSlopes(double* /*buffer*/, int& /*counter*/, const int& /*lvl*/) override
61 {
62 Errors::errorMessage("getBufferSlopes not available for CellO2");
63 };
64 void fillBufferSlopes(double* /*buffer*/, int& /*counter*/, const int& /*lvl*/, const int& /*neighbour*/) const override
65 {
66 Errors::errorMessage("fillBufferSlopes not available for CellO2");
67 };
68
69 // -- Cartesian --
70 void computeLocalSlopes(CellInterface& /*cellInterfaceRef*/,
71 Limiter& /*globalLimiter*/,
72 Limiter& /*interfaceLimiter*/,
73 Limiter& /*globalVolumeFractionLimiter*/,
74 Limiter& /*interfaceVolumeFractionLimiter*/,
75 double& /*alphaCellAfterOppositeSide*/,
76 double& /*alphaCell*/,
77 double& /*alphaCellOtherInterfaceSide*/,
78 double& /*epsInterface*/) override {};
79
80 void computeLocalSlopesLimite(CellInterface& /*cellInterfaceRef*/,
81 Limiter& /*globalLimiter*/,
82 Limiter& /*interfaceLimiter*/,
83 Limiter& /*globalVolumeFractionLimiter*/,
84 Limiter& /*interfaceVolumeFractionLimiter*/,
85 double& /*epsInterface*/) override {};
86
87 //Pour methode AMR
88 void createChildCell(const int& /*lvl*/) override {};
89
90 // -- NS --
91 GradPhase* getGradPhase(const int& /*phaseNumber*/) const override
92 {
93 Errors::errorMessage("getGradPhase not available for Cell");
94 return nullptr;
95 };
96 GradMixture* getGradMixture() const override
97 {
98 Errors::errorMessage("getGradMixture not available for Cell");
99 return nullptr;
100 };
101 GradTransport* getGradTransport(const int& /*transportNumber*/) const override
102 {
103 Errors::errorMessage("getGradTransport not available for Cell");
104 return nullptr;
105 };
106 void allocateSecondOrderBuffersAndGradientVectors(Phase** /*phases*/, Mixture* /*mixture*/) override {};
107 void computeGradientsO2() override {};
108 void limitGradientsO2(Limiter& /*globalLimiter*/) override {};
109
110 void computeLocalSlopes(CellInterface& /*cellInterfaceRef*/) override {};
111
112 protected:
119
120 private:
121};
122
123#endif // CELLO2_H
Prim
Enumeration for the primitive-variable type (usefull for second order, slopes, etc....
Definition Tools.h:40
@ vecPhases
Definition Tools.h:41
Definition CellInterface.h:48
void copyPhase(const int &phaseNumber, Phase *phase) override
Definition CellO2.cpp:89
Mixture * m_mixtureO2
Definition CellO2.h:114
void computeLocalSlopes(CellInterface &, Limiter &, Limiter &, Limiter &, Limiter &, double &, double &, double &, double &) override
Definition CellO2.h:70
void computeLocalSlopesLimite(CellInterface &, Limiter &, Limiter &, Limiter &, Limiter &, double &) override
Definition CellO2.h:80
void computeGradientsO2() override
Compute gradients for 2nd-order scheme on unstructured mesh.
Definition CellO2.h:107
Transport & getTransport(const int &numTransport, Prim type=vecPhases) const override
Definition CellO2.cpp:232
Transport * m_consTransportsSauvegarde
Definition CellO2.h:117
void getBufferSlopes(double *, int &, const int &) override
Definition CellO2.h:60
void allocateSecondOrderBuffersAndGradientVectors(Phase **, Mixture *) override
Compute global variable buffers (min, max, etc.) and initialize speficic gradient vectors for 2nd-ord...
Definition CellO2.h:106
void getBackCons() override
Definition CellO2.cpp:107
void setTransport(double value, int &numTransport, Prim type=vecPhases) override
Definition CellO2.cpp:266
GradTransport * getGradTransport(const int &) const override
Definition CellO2.h:101
void predictionOrdre2(const double &dt, Symmetry *symmetry) override
Definition CellO2.cpp:117
CellO2()
Definition CellO2.cpp:36
void allocate(const std::vector< AddPhys * > &addPhys) override
Memory allocation of cell attributes.
Definition CellO2.cpp:60
Transport * getTransports(Prim type=vecPhases) const override
Definition CellO2.cpp:249
void correctionEnergy(Prim type=vecPhases) override
Definition CellO2.cpp:137
Flux * m_consSauvegarde
Definition CellO2.h:116
Phase ** getPhases(Prim type=vecPhases) const override
Definition CellO2.cpp:198
Transport * m_vecTransportsO2
Definition CellO2.h:115
~CellO2() override
Definition CellO2.cpp:44
GradPhase * getGradPhase(const int &) const override
Definition CellO2.h:91
void limitGradientsO2(Limiter &) override
Definition CellO2.h:108
void createChildCell(const int &) override
Definition CellO2.h:88
void fillBufferSlopes(double *, int &, const int &, const int &) const override
Definition CellO2.h:64
void saveCons() override
Definition CellO2.cpp:97
void computeLocalSlopes(CellInterface &) override
Compute slopes for 2nd-order scheme on unstructured mesh.
Definition CellO2.h:110
GradMixture * getGradMixture() const override
Definition CellO2.h:96
void fulfillState(Prim type=vecPhases) override
Definition CellO2.cpp:155
Mixture * getMixture(Prim type=vecPhases) const override
Definition CellO2.cpp:215
Phase ** m_vecPhasesO2
Definition CellO2.h:113
Phase * getPhase(const int &phaseNumber, Prim type=vecPhases) const override
Definition CellO2.cpp:181
Cell()
Basic Cell constructor for a non AMR cell.
Definition Cell.cpp:45
static void errorMessage(const std::string &message_)
Definition Errors.cpp:56
Abstract class for conservative variables and fluxes.
Definition Flux.h:43
Mixture variable gradients. Stored for 2nd-order computation on unstructured mesh (O2 NS).
Definition GradMixture.h:45
Phase variable gradients. Stored for 2nd-order computation on unstructured mesh (O2 NS).
Definition GradPhase.h:44
Transport variable gradients. Stored for 2nd-order computation on unstructured mesh (O2 NS).
Definition GradTransport.h:43
Definition Limiter.h:38
Abstract class for mixture variables.
Definition Mixture.h:43
Abstract class for a phase.
Definition Phase.h:47
General class for axial symmetries.
Definition Symmetry.h:45
Class for additional transport equations.
Definition Transport.h:41