ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
Cell.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 CELL_H
32#define CELL_H
33
34#include <fstream>
35#include "../Models/Phase.h"
36#include "../Maths/Coord.h"
37#include "../Maths/Tensor.h"
40
41class Cell; //Predeclaration of class to include following .h
42
43#include "../Models/Mixture.h"
45#include "CellInterface.h"
46#include "../Models/Model.h"
48#include "../Models/Flux.h"
49#include "../Meshes/Element.h"
52
53class GradPhase;
54class GradMixture;
55
58class Cell
59{
60 public:
62 Cell();
65 Cell(int lvl); //Pour AMR
66 virtual ~Cell();
67
70 void addCellInterface(CellInterface* cellInterface);
73 void deleteCellInterface(CellInterface* cellInterface);
74
78 void associateExtVar(Model* mod, Gradient* grad);
81 virtual void allocate(const std::vector<AddPhys*>& addPhys);
82 void allocateEos();
85 void fill(std::vector<GeometricalDomain*>& domains, const int& /*lvlMax*/);
86 virtual void copyPhase(const int& phaseNumber, Phase* phase);
87 void copyMixture(Mixture* mixture);
88 void setToZeroCons();
90 void timeEvolution(const double& dt, Symmetry* symmetry);
91 void timeEvolutionAddPhys(const double& dt);
92 void buildPrim();
93 void buildCons();
94 virtual void correctionEnergy(Prim /*type*/ = vecPhases);
95 void sourceTermIntegration(const double& /*dt*/) {};
96 void printPhasesMixture(std::ofstream& fileStream) const;
97 virtual void completeFulfillState();
98 virtual void fulfillState(Prim /*type*/ = vecPhases);
99 void fulfillStateResume();
100 void localProjection(const Coord& normal, const Coord& tangent, const Coord& binormal, Prim /*type*/ = vecPhases);
101 virtual void reverseProjection(const Coord& normal, const Coord& tangent, const Coord& binormal);
102 virtual void copyInCell(Cell& /*cellSource*/) const { Errors::errorMessage("copyInCell not available for Cell"); };
103 void copyVec(Phase** vecPhases, Mixture* mixture, Transport* vecTransports);
104 //void printCut1Dde2D(std::ofstream& fileStream, std::string variableConstanteCut, const double& valueCut, const double& dL); /*!< Write de la cut 1D de la simulation 2D */
105 //void printCut1Dde3D(std::ofstream& fileStream, std::string variableConstanteCut1, std::string variableConstanteCut2, const double& valueCut1, const double& valueCut2, const double& dL1, const double& dL2); /*!< Write de la cut 1D de la simulation 3D */
106 void deleteInterface(const int& b);
107
108 //For additional physics
109 //----------------------
110 void prepareAddPhys();
111 Coord selectVector(Variable nameVector, int num = 0, int subscript = -1) const;
112 void setVector(Variable nameVector, const Coord& value, int num = 0, int subscript = -1);
113
114 const QuantitiesAddPhys* getQPA(const int& numQPA) const
115 {
116 return m_vecQuantitiesAddPhys[numQPA];
117 };
118 QuantitiesAddPhys* getQPA(const int& numQPA) { return m_vecQuantitiesAddPhys[numQPA]; };
119
120 const Coord& getGradTk(int& numPhase, int& numAddPhys) const;
121 void setGradTk(int& numPhase, int& numAddPhys, double* buffer, int& counter);
122 void addNonConsAddPhys(AddPhys& addPhys, Symmetry* symmetry);
123
124 void reinitializeColorFunction(const int& numTransport, const int& numPhase);
125
130 double hatFilterScalar(Variable nameVariable, int num = 0);
131
132 //Gradients
133 //---------
138 void computeGradients(std::vector<Coord>& grads, std::vector<Variable>& nameVariables, std::vector<int>& numPhases);
139
140 //Accessors
141 //---------
142 int getCellInterfacesSize() const;
143 CellInterface* getCellInterface(const int& b);
144 void setCellInterface(const int& b, CellInterface* cellInterface);
145 virtual Phase* getPhase(const int& phaseNumber, Prim /*type*/ = vecPhases) const;
146 virtual Phase** getPhases(Prim /*type*/ = vecPhases) const;
147 virtual Mixture* getMixture(Prim /*type*/ = vecPhases) const;
148 Flux* getCons() const;
149 void setCons(Flux* cons);
150 const Coord& getPosition() const { return m_element->getPosition(); };
151 const Coord& getSize() const { return m_element->getSize(); };
152 const double& getSizeX() const { return m_element->getSizeX(); };
153 const double& getSizeY() const { return m_element->getSizeY(); };
154 const double& getSizeZ() const { return m_element->getSizeZ(); };
155 void setElement(Element* element, const int& numCell);
156 Element* getElement() const;
157 virtual void setTransport(double value, int& numTransport, Prim /*type*/ = vecPhases);
158 virtual Transport& getTransport(const int& numTransport, Prim /*type*/ = vecPhases) const;
159 virtual Transport* getTransports(Prim /*type*/ = vecPhases) const;
160 Transport* getConsTransport(const int& numTransport) const;
161 void setConsTransport(double value, const int& numTransport);
162 std::vector<QuantitiesAddPhys*>& getVecQuantitiesAddPhys();
163 const int& getNumberPhases() const;
164 const int& getNumberTransports() const;
165 double getDensityGradient();
166 Model* getModel();
168 const Coord& getVelocity() const;
169 void setWall(bool wall);
170 bool getWall() const { return m_wall; };
174 double selectScalar(Variable nameVariable, int num = 0) const;
175
176 //Second order (not used for first-order cells)
177 //---------------------------------------------
179 virtual void allocateSecondOrderBuffersAndGradientVectors(Phase** /*phases*/, Mixture* /*mixture*/) {};
180
182 virtual void computeGradientsO2() {};
183 virtual void limitGradientsO2(Limiter& /*globalLimiter*/) {};
184
186 virtual void computeLocalSlopes(CellInterface& /*cellInterfaceRef*/) {};
187 virtual void computeLocalSlopes(CellInterface& /*cellInterface*/,
188 Limiter& /*globalLimiter*/,
189 Limiter& /*interfaceLimiter*/,
190 Limiter& /*globalVolumeFractionLimiter*/,
191 Limiter& /*interfaceVolumeFractionLimiter*/,
192 double& /*alphaCellAfterOppositeSide*/,
193 double& /*alphaCell*/,
194 double& /*alphaCellOtherInterfaceSide*/,
195 double& /*epsInterface*/) {};
196 virtual void computeLocalSlopesLimite(CellInterface& /*cellInterface*/,
197 Limiter& /*globalLimiter*/,
198 Limiter& /*interfaceLimiter*/,
199 Limiter& /*globalVolumeFractionLimiter*/,
200 Limiter& /*interfaceVolumeFractionLimiter*/,
201 double& /*epsInterface*/) {};
202 virtual void computeLocalSlopesPeriodic(CellInterface& /*cellInterface*/,
203 Limiter& /*globalLimiter*/,
204 Limiter& /*interfaceLimiter*/,
205 Limiter& /*globalVolumeFractionLimiter*/,
206 Limiter& /*interfaceVolumeFractionLimiter*/,
207 double& /*alphaCellAfterOppositeSide*/,
208 double& /*alphaCell*/,
209 double& /*alphaCellOtherInterfaceSide*/,
210 double& /*epsInterface*/) {};
211 virtual Phase* getSlopes() const { return 0; };
212 virtual Transport* getSlopesTransport() const { return 0; };
213 virtual void saveCons() {};
214 virtual void getBackCons() {};
215 virtual void predictionOrdre2(const double& /*dt*/, Symmetry* /*symmetry*/) {};
216
217 //Methods for distance to an other object (Cell or CellInterface)
218 //---------------------------------------------------------------
219 double distance(Cell* c);
220 double distanceX(Cell* c);
221 double distanceY(Cell* c);
222 double distanceZ(Cell* c);
223 double distance(CellInterface* b);
224 double distanceX(CellInterface* b);
225 double distanceY(CellInterface* b);
226 double distanceZ(CellInterface* b);
227
228 bool traverseObjet(const GeometricObject& objet) const;
229
230 //Printing
231 //--------
232 void printInfo() const;
234 double getPsat();
235 bool printGnuplotAMR(std::ofstream& fileStream, const int& dim, GeometricObject* objet = 0, bool recordPsat = false);
236 void computeVolumePhaseK(double& integration, const int& numPhase);
237 void computeMass(double& mass, double& alphaRef);
238 void computeTotalMass(double& mass);
239 void computeTotalEnergy(double& totalEnergy);
240 void lookForPmax(double* pMax, double* pMaxWall);
241
242 //Specific for AMR method
243 //-----------------------
244 // clang-format off
245 void setToZeroXi();
246 void setToZeroConsXi();
247 void timeEvolutionXi();
248 void chooseRefine(const double& xiSplit,
249 const int& nbCellsY,
250 const int& nbCellsZ,
251 const std::vector<AddPhys*>& addPhys,
252 int& nbCellsTotalAMR);
253 void chooseUnrefine(const double& xiJoin, int& nbCellsTotalAMR);
254 void refineCellAndCellInterfaces(const int& nbCellsY,
255 const int& nbCellsZ,
256 const std::vector<AddPhys*>& addPhys,
257 const bool& refineExternalCellInterfaces);
258 virtual void createChildCell(const int& lvl);
261 bool lvlNeighborTooHigh();
262 bool lvlNeighborTooLow();
264 std::vector<Cell*>* cellsLvl,
265 std::vector<CellInterface*>* cellInterfacesLvl);
267 const int& getLvl() const { return m_lvl; };
268 const bool& getSplit() const { return m_split; };
269 const double& getXi() const { return m_xi; };
270 void setXi(double value);
271 void addFluxXi(double value);
273 Cell* getCellChild(const int& num);
274 std::vector<Cell*>* getChildVector();
275
276 //For parallel computing (no AMR)
277 //-------------------------------
278 virtual void pushBackSlope() {};
279 virtual void popBackSlope() {};
280 virtual int getRankOfNeighborCPU() const { return -1; };
281 virtual void setRankOfNeighborCPU(int /*rank*/) {};
282 // clang-format on
283 void fillBufferPrimitives(double* buffer, int& counter, const int& lvl, const int& neighbour, Prim type = vecPhases) const;
284 void getBufferPrimitives(double* buffer, int& counter, const int& lvl, Eos** eos, Prim type = vecPhases);
285 void fillBufferVector(
286 double* buffer, int& counter, const int& lvl, const int& neighbour, const int& dim, Variable nameVector, int num = 0, int index = -1) const;
287 void getBufferVector(double* buffer, int& counter, const int& lvl, const int& dim, Variable nameVector, int num = 0, int index = -1);
288 void fillBufferTransports(double* buffer, int& counter, const int& lvl, const int& neighbour) const;
289 void getBufferTransports(double* buffer, int& counter, const int& lvl);
290 virtual void fillBufferSlopes(double* /*buffer*/, int& /*counter*/, const int& /*lvl*/, const int& /*neighbour*/) const
291 {
292 Errors::errorMessage("fillBufferSlopes not available for Cell");
293 };
294 virtual void getBufferSlopes(double* /*buffer*/, int& /*counter*/, const int& /*lvl*/)
295 {
296 Errors::errorMessage("getBufferSlopes not available for Cell");
297 };
298 virtual bool isCellGhost() const { return false; };
299 bool hasNeighboringGhostCellOfCPUneighbour(const int& neighbour) const;
301 int numberOfNeighboringGhostCellsOfCPUneighbour(const int& neighbour) const;
303 virtual GradPhase* getGradPhase(const int& /*phaseNumber*/) const
304 {
305 Errors::errorMessage("getGradPhase not available for Cell");
306 return nullptr;
307 };
309 {
310 Errors::errorMessage("getGradMixture not available for Cell");
311 return nullptr;
312 };
313 virtual GradTransport* getGradTransport(const int& /*transportNumber*/) const
314 {
315 Errors::errorMessage("getGradTransport not available for Cell");
316 return nullptr;
317 };
318
319 //For parallel AMR computing
320 //--------------------------
322 const int& nbCellsY,
323 const int& nbCellsZ,
324 const std::vector<AddPhys*>& addPhys,
325 std::vector<Cell*>* cellsLvlGhost);
326 void
327 refineCellAndCellInterfacesGhost(const int& nbCellsY,
328 const int& nbCellsZ,
329 const std::vector<AddPhys*>& addPhys);
331 void fillBufferXi(double* buffer, int& counter, const int& lvl, const int& neighbour) const;
332 void getBufferXi(double* buffer, int& counter, const int& lvl);
333 void fillBufferSplit(bool* buffer, int& counter, const int& lvl, const int& neighbour) const;
334 void getBufferSplit(bool* buffer, int& counter, const int& lvl);
335 void fillNumberElementsToSendToNeighbour(int& numberElementsToSendToNeighbor,
336 int& numberSlopesToSendToNeighbor,
337 const int& lvl,
338 const int& neighbour,
339 int numberNeighboursOfCPUneighbour);
340 void fillDataToSend(std::vector<double>& dataToSend, std::vector<int>& dataSplitToSend, const int& lvl) const;
341 void getDataToReceiveAndRefine(std::vector<double>& dataToReceive,
342 std::vector<int>& dataSplitToReceive,
343 const int& lvl,
344 Eos** eos,
345 int& counter,
346 int& counterSplit,
347 const int& nbCellsY,
348 const int& nbCellsZ,
349 const std::vector<AddPhys*>& addPhys);
350 void computeLoad(double& load, int lvl) const;
351 void computeLvlMax(int& lvlMax) const;
352 void clearExternalCellInterfaces(const int& nbCellsY, const int& nbCellsZ);
354 void updateNbCellsTotalAMR(int& nbCellsTotalAMR);
355
356 protected:
357 bool m_wall;
364 std::vector<CellInterface*> m_cellInterfaces;
365 std::vector<QuantitiesAddPhys*> m_vecQuantitiesAddPhys;
366
367 //Attributs pour methode AMR
368 int m_lvl;
369 double m_xi;
370 double m_consXi;
371 bool m_split;
372 std::vector<Cell*> m_childrenCells;
373 std::vector<CellInterface*> m_childrenInternalCellInterfaces;
374
375 private:
376};
377
378extern Model* model;
379extern Gradient* gradient;
380extern std::vector<Coord> gradRho;
381extern std::vector<Variable> variableDensity;
382extern std::vector<Coord> gradVelocityX;
383extern std::vector<Variable> variableVelocity;
384extern std::vector<int> numeratorDefault;
385
386#endif // CELL_H
std::vector< Variable > variableVelocity
Definition Cell.cpp:40
std::vector< Variable > variableDensity
Definition Cell.cpp:39
std::vector< int > numeratorDefault
Definition Cell.cpp:41
std::vector< Coord > gradVelocityX
Definition Cell.cpp:38
std::vector< Coord > gradRho
Definition Cell.cpp:37
Gradient * gradient
Definition Cell.cpp:36
Model * model
Definition CellInterface.cpp:33
Prim
Enumeration for the primitive-variable type (usefull for second order, slopes, etc....
Definition Tools.h:40
@ vecPhases
Definition Tools.h:41
Variable
Enumeration for the flow variables.
Definition Tools.h:163
General class for additional physics.
Definition AddPhys.h:46
Definition CellInterface.h:48
Base class for a mesh cell.
Definition Cell.h:59
virtual void computeGradientsO2()
Compute gradients for 2nd-order scheme on unstructured mesh.
Definition Cell.h:182
void setToZeroConsGlobal()
Definition Cell.cpp:601
bool getWall() const
Definition Cell.h:170
double getDensityGradient()
Definition Cell.cpp:961
void addCellInterface(CellInterface *cellInterface)
Add a cell interface to current cell.
Definition Cell.cpp:92
virtual void saveCons()
Definition Cell.h:213
void addFluxXi(double value)
Definition Cell.cpp:1806
std::vector< Cell * > m_childrenCells
Definition Cell.h:372
void timeEvolution(const double &dt, Symmetry *symmetry)
Definition Cell.cpp:618
Flux * getCons() const
Definition Cell.cpp:910
Transport * m_vecTransports
Definition Cell.h:360
void getDataToReceiveAndRefine(std::vector< double > &dataToReceive, std::vector< int > &dataSplitToReceive, const int &lvl, Eos **eos, int &counter, int &counterSplit, const int &nbCellsY, const int &nbCellsZ, const std::vector< AddPhys * > &addPhys)
Definition Cell.cpp:2386
void setConsTransport(double value, const int &numTransport)
Definition Cell.cpp:946
Transport * m_consTransports
Definition Cell.h:362
void sourceTermIntegration(const double &)
Definition Cell.h:95
Element * m_element
Definition Cell.h:363
Cell * getCellChild(const int &num)
Definition Cell.cpp:1814
const double & getSizeZ() const
Definition Cell.h:154
void refineCellAndCellInterfacesGhost(const int &nbCellsY, const int &nbCellsZ, const std::vector< AddPhys * > &addPhys)
Definition Cell.cpp:2018
void refineCellAndCellInterfaces(const int &nbCellsY, const int &nbCellsZ, const std::vector< AddPhys * > &addPhys, const bool &refineExternalCellInterfaces)
Definition Cell.cpp:1289
void printPhasesMixture(std::ofstream &fileStream) const
Definition Cell.cpp:663
int m_lvl
Definition Cell.h:368
double distance(Cell *c)
Definition Cell.cpp:994
void chooseUnrefine(const double &xiJoin, int &nbCellsTotalAMR)
Definition Cell.cpp:1260
void setGradTk(int &numPhase, int &numAddPhys, double *buffer, int &counter)
Definition Cell.cpp:796
void fillBufferXi(double *buffer, int &counter, const int &lvl, const int &neighbour) const
Definition Cell.cpp:2284
Element * getElement() const
Definition Cell.cpp:926
void computeMass(double &mass, double &alphaRef)
Definition Cell.cpp:1152
int numberOfNeighboringGhostCellsOfCPUneighbour(const int &neighbour) const
Definition Cell.cpp:1966
double m_xi
Definition Cell.h:369
Mixture * m_mixture
Definition Cell.h:359
void computeVolumePhaseK(double &integration, const int &numPhase)
Definition Cell.cpp:1097
void lookForPmax(double *pMax, double *pMaxWall)
Definition Cell.cpp:1206
void fillBufferPrimitives(double *buffer, int &counter, const int &lvl, const int &neighbour, Prim type=vecPhases) const
Definition Cell.cpp:1824
virtual void computeLocalSlopesLimite(CellInterface &, Limiter &, Limiter &, Limiter &, Limiter &, double &)
Definition Cell.h:196
void setToZeroConsXi()
Definition Cell.cpp:1237
virtual Phase * getSlopes() const
Definition Cell.h:211
Cell()
Basic Cell constructor for a non AMR cell.
Definition Cell.cpp:45
const Coord & getSize() const
Definition Cell.h:151
void fillBufferTransports(double *buffer, int &counter, const int &lvl, const int &neighbour) const
Definition Cell.cpp:1904
void updatePointersInternalCellInterfaces()
Definition Cell.cpp:2548
const double & getSizeY() const
Definition Cell.h:153
Phase ** m_vecPhases
Definition Cell.h:358
void setCons(Flux *cons)
Definition Cell.cpp:914
virtual Mixture * getMixture(Prim=vecPhases) const
Definition Cell.cpp:906
void buildLvlCellsAndLvlInternalCellInterfacesArrays(std::vector< Cell * > *cellsLvl, std::vector< CellInterface * > *cellInterfacesLvl)
Definition Cell.cpp:1790
std::vector< Cell * > * getChildVector()
Definition Cell.cpp:1818
virtual void copyPhase(const int &phaseNumber, Phase *phase)
Definition Cell.cpp:583
virtual void popBackSlope()
Definition Cell.h:279
const int & getLvl() const
Definition Cell.h:267
bool m_split
Definition Cell.h:371
void computeTotalMass(double &mass)
Definition Cell.cpp:1168
double selectScalar(Variable nameVariable, int num=0) const
Select a specific scalar variable.
Definition Cell.cpp:985
void fillBufferVector(double *buffer, int &counter, const int &lvl, const int &neighbour, const int &dim, Variable nameVector, int num=0, int index=-1) const
Definition Cell.cpp:1867
std::vector< CellInterface * > m_cellInterfaces
Definition Cell.h:364
virtual void getBufferSlopes(double *, int &, const int &)
Definition Cell.h:294
void fillNumberElementsToSendToNeighbour(int &numberElementsToSendToNeighbor, int &numberSlopesToSendToNeighbor, const int &lvl, const int &neighbour, int numberNeighboursOfCPUneighbour)
Definition Cell.cpp:2344
void setCellInterface(const int &b, CellInterface *cellInterface)
Definition Cell.cpp:894
Flux * m_cons
Definition Cell.h:361
void setXi(double value)
Definition Cell.cpp:1802
bool lvlNeighborTooLow()
Definition Cell.cpp:1752
void addNonConsAddPhys(AddPhys &addPhys, Symmetry *symmetry)
Definition Cell.cpp:807
bool hasNeighboringGhostCellOfCPUneighbour(const int &neighbour) const
Definition Cell.cpp:1938
void associateExtVar(Model *mod, Gradient *grad)
Associate external variables.
Definition Cell.cpp:107
void timeEvolutionAddPhys(const double &dt)
Definition Cell.cpp:637
void getBufferTransports(double *buffer, int &counter, const int &lvl)
Definition Cell.cpp:1922
void fillBufferSplit(bool *buffer, int &counter, const int &lvl, const int &neighbour) const
Definition Cell.cpp:2314
void fillDataToSend(std::vector< double > &dataToSend, std::vector< int > &dataSplitToSend, const int &lvl) const
Definition Cell.cpp:2364
virtual void fulfillState(Prim=vecPhases)
Definition Cell.cpp:690
bool m_wall
Definition Cell.h:357
void prepareAddPhys()
Definition Cell.cpp:754
bool traverseObjet(const GeometricObject &objet) const
Definition Cell.cpp:1026
virtual GradTransport * getGradTransport(const int &) const
Definition Cell.h:313
const double & getSizeX() const
Definition Cell.h:152
virtual Transport * getSlopesTransport() const
Definition Cell.h:212
virtual Transport * getTransports(Prim=vecPhases) const
Definition Cell.cpp:938
void getBufferXi(double *buffer, int &counter, const int &lvl)
Definition Cell.cpp:2300
virtual void allocateSecondOrderBuffersAndGradientVectors(Phase **, Mixture *)
Compute global variable buffers (min, max, etc.) and initialize speficic gradient vectors for 2nd-ord...
Definition Cell.h:179
std::vector< CellInterface * > m_childrenInternalCellInterfaces
Definition Cell.h:373
double distanceY(Cell *c)
Definition Cell.cpp:1002
void chooseRefine(const double &xiSplit, const int &nbCellsY, const int &nbCellsZ, const std::vector< AddPhys * > &addPhys, int &nbCellsTotalAMR)
Definition Cell.cpp:1245
void localProjection(const Coord &normal, const Coord &tangent, const Coord &binormal, Prim=vecPhases)
Definition Cell.cpp:713
Transport * getConsTransport(const int &numTransport) const
Definition Cell.cpp:942
void getBufferSplit(bool *buffer, int &counter, const int &lvl)
Definition Cell.cpp:2330
virtual void correctionEnergy(Prim=vecPhases)
Definition Cell.cpp:655
double m_consXi
Definition Cell.h:370
void fulfillStateResume()
Definition Cell.cpp:705
virtual void copyInCell(Cell &) const
Definition Cell.h:102
virtual void reverseProjection(const Coord &normal, const Coord &tangent, const Coord &binormal)
Definition Cell.cpp:723
double getPsat()
Compute saturation pressure for a liquid/vapor fluid mixture (first phase is considered predominant -...
Definition Cell.cpp:1032
virtual void setRankOfNeighborCPU(int)
Definition Cell.h:281
Coord & getVelocity()
Definition Cell.cpp:949
void getBufferVector(double *buffer, int &counter, const int &lvl, const int &dim, Variable nameVector, int num=0, int index=-1)
Definition Cell.cpp:1886
bool lvlNeighborTooHigh()
Definition Cell.cpp:1728
virtual void computeLocalSlopesPeriodic(CellInterface &, Limiter &, Limiter &, Limiter &, Limiter &, double &, double &, double &, double &)
Definition Cell.h:202
virtual void limitGradientsO2(Limiter &)
Definition Cell.h:183
virtual Phase ** getPhases(Prim=vecPhases) const
Definition Cell.cpp:902
virtual void computeLocalSlopes(CellInterface &, Limiter &, Limiter &, Limiter &, Limiter &, double &, double &, double &, double &)
Definition Cell.h:187
const Coord & getPosition() const
Definition Cell.h:150
virtual ~Cell()
Definition Cell.cpp:64
void computeLoad(double &load, int lvl) const
Definition Cell.cpp:2424
void buildCons()
Definition Cell.cpp:651
const double & getXi() const
Definition Cell.h:269
CellInterface * getCellInterface(const int &b)
Definition Cell.cpp:890
void chooseRefineDeraffineGhost(const int &nbCellsY, const int &nbCellsZ, const std::vector< AddPhys * > &addPhys, std::vector< Cell * > *cellsLvlGhost)
Definition Cell.cpp:1996
int getNumberCellsChildren()
Definition Cell.cpp:1810
void copyMixture(Mixture *mixture)
Definition Cell.cpp:587
void unrefineCellAndCellInterfaces()
Definition Cell.cpp:1650
virtual void completeFulfillState()
Definition Cell.cpp:676
virtual GradMixture * getGradMixture() const
Definition Cell.h:308
virtual void getBackCons()
Definition Cell.h:214
Model * getModel()
Definition Cell.cpp:969
void averageChildrenInParent()
Definition Cell.cpp:1690
virtual void allocate(const std::vector< AddPhys * > &addPhys)
Memory allocation of cell attributes.
Definition Cell.cpp:128
virtual int getRankOfNeighborCPU() const
Definition Cell.h:280
const bool & getSplit() const
Definition Cell.h:268
const Coord & getGradTk(int &numPhase, int &numAddPhys) const
Allow to recover an additional physical quantity.
Definition Cell.cpp:792
void setWall(bool wall)
Definition Cell.cpp:957
virtual Transport & getTransport(const int &numTransport, Prim=vecPhases) const
Definition Cell.cpp:934
void setToZeroCons()
Definition Cell.cpp:591
void timeEvolutionXi()
Definition Cell.cpp:1241
int getCellInterfacesSize() const
Definition Cell.cpp:886
void printInfo() const
Definition Cell.cpp:1042
void copyVec(Phase **vecPhases, Mixture *mixture, Transport *vecTransports)
Definition Cell.cpp:733
void fill(std::vector< GeometricalDomain * > &domains, const int &)
Filling cell properties using a physical domain.
Definition Cell.cpp:158
double hatFilterScalar(Variable nameVariable, int num=0)
Select a specific scalar variable.
Definition Cell.cpp:822
void setVector(Variable nameVector, const Coord &value, int num=0, int subscript=-1)
Definition Cell.cpp:778
virtual void pushBackSlope()
Definition Cell.h:278
void unrefineCellAndCellInterfacesGhost()
Definition Cell.cpp:2261
void clearExternalCellInterfaces(const int &nbCellsY, const int &nbCellsZ)
Definition Cell.cpp:2456
void setElement(Element *element, const int &numCell)
Definition Cell.cpp:918
QuantitiesAddPhys * getQPA(const int &numQPA)
Allow to recover an additional physical quantity.
Definition Cell.h:118
virtual bool isCellGhost() const
Definition Cell.h:298
double distanceX(Cell *c)
Definition Cell.cpp:998
double distanceZ(Cell *c)
Definition Cell.cpp:1006
bool printGnuplotAMR(std::ofstream &fileStream, const int &dim, GeometricObject *objet=0, bool recordPsat=false)
Definition Cell.cpp:1046
virtual void createChildCell(const int &lvl)
Definition Cell.cpp:1646
virtual void fillBufferSlopes(double *, int &, const int &, const int &) const
Definition Cell.h:290
Coord selectVector(Variable nameVector, int num=0, int subscript=-1) const
Definition Cell.cpp:763
void computeLvlMax(int &lvlMax) const
Definition Cell.cpp:2440
const int & getNumberTransports() const
Definition Cell.cpp:981
std::vector< QuantitiesAddPhys * > & getVecQuantitiesAddPhys()
Definition Cell.cpp:973
void buildPrim()
Definition Cell.cpp:647
const QuantitiesAddPhys * getQPA(const int &numQPA) const
Definition Cell.h:114
virtual void predictionOrdre2(const double &, Symmetry *)
Definition Cell.h:215
virtual void computeLocalSlopes(CellInterface &)
Compute slopes for 2nd-order scheme on unstructured mesh.
Definition Cell.h:186
void computeTotalEnergy(double &totalEnergy)
Definition Cell.cpp:1187
void deleteInterface(const int &b)
Definition Cell.cpp:746
void deleteCellInterface(CellInterface *cellInterface)
Delete the cell interface of current cell.
Definition Cell.cpp:96
virtual GradPhase * getGradPhase(const int &) const
Definition Cell.h:303
void setToZeroXi()
Definition Cell.cpp:1233
void reinitializeColorFunction(const int &numTransport, const int &numPhase)
Re-initialize the color function (transport) with alpha.
Definition Cell.cpp:815
virtual void setTransport(double value, int &numTransport, Prim=vecPhases)
Definition Cell.cpp:930
void updateNbCellsTotalAMR(int &nbCellsTotalAMR)
Definition Cell.cpp:2558
virtual Phase * getPhase(const int &phaseNumber, Prim=vecPhases) const
Definition Cell.cpp:898
void computeGradients(std::vector< Coord > &grads, std::vector< Variable > &nameVariables, std::vector< int > &numPhases)
Compute gradients (temperature, velocity, density) of a cell.
Definition Cell.cpp:877
const int & getNumberPhases() const
Definition Cell.cpp:977
void allocateEos()
Definition Cell.cpp:154
std::vector< QuantitiesAddPhys * > m_vecQuantitiesAddPhys
Definition Cell.h:365
void getBufferPrimitives(double *buffer, int &counter, const int &lvl, Eos **eos, Prim type=vecPhases)
Definition Cell.cpp:1846
Class for a coordinate system object such as coordinates of the vertex or a vector.
Definition Coord.h:43
Definition Element.h:47
General class for Equation of State (EOS).
Definition Eos.h:62
static void errorMessage(const std::string &message_)
Definition Errors.cpp:56
Abstract class for conservative variables and fluxes.
Definition Flux.h:43
Abstract class for geometric object.
Definition GeometricObject.h:41
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
Base class for the gradient method.
Definition Gradient.h:43
Definition Limiter.h:38
Abstract class for mixture variables.
Definition Mixture.h:43
Abstract class for mathematical flow models.
Definition Model.h:50
Abstract class for a phase.
Definition Phase.h:47
General class for additional-physics quantities.
Definition QuantitiesAddPhys.h:42
General class for axial symmetries.
Definition Symmetry.h:45
Class for additional transport equations.
Definition Transport.h:41