ECOGEN 4.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"
38#include "../Transport/Transport.h"
39#include "../Transport/GradTransport.h"
40
41class Cell; //Predeclaration of class to include following .h
42
43#include "../Models/Mixture.h"
44#include "../AdditionalPhysics/QuantitiesAddPhys.h"
45#include "CellInterface.h"
46#include "../Models/Model.h"
47#include "../Gradients/Gradient.h"
48#include "../Models/Flux.h"
49#include "../Meshes/Element.h"
50#include "../Geometries/GeometricalDomain.h"
51#include "../Symmetries/Symmetry.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 void correctionEnergy();
95 void sourceTermIntegration(const double& /*dt*/) {};
96 void printPhasesMixture(std::ofstream& fileStream) const;
97 virtual void completeFulfillState();
98 virtual void fulfillState(Prim /*type*/ = vecPhases);
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("methode copie non dispo pour 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(int& numQPA) const { return m_vecQuantitiesAddPhys[numQPA]; };
115
116 const Coord& getGradTk(int& numPhase, int& numAddPhys) const;
117 void setGradTk(int& numPhase, int& numAddPhys, double* buffer, int& counter);
118 void addNonConsAddPhys(AddPhys& addPhys, Symmetry* symmetry);
119
120 void reinitializeColorFunction(const int& numTransport, const int& numPhase);
121
122 //Gradients
123 //---------
128 void computeGradients(std::vector<Coord>& grads, std::vector<Variable>& nameVariables, std::vector<int>& numPhases);
129
130 //Accessors
131 //---------
132 int getCellInterfacesSize() const;
133 CellInterface* getCellInterface(const int& b);
134 void setCellInterface(const int& b, CellInterface* cellInterface);
135 virtual Phase* getPhase(const int& phaseNumber, Prim /*type*/ = vecPhases) const;
136 virtual Phase** getPhases(Prim /*type*/ = vecPhases) const;
137 virtual Mixture* getMixture(Prim /*type*/ = vecPhases) const;
138 Flux* getCons() const;
139 void setCons(Flux* cons);
140 const Coord& getPosition() const { return m_element->getPosition(); };
141 const Coord& getSize() const { return m_element->getSize(); };
142 const double& getSizeX() const { return m_element->getSizeX(); };
143 const double& getSizeY() const { return m_element->getSizeY(); };
144 const double& getSizeZ() const { return m_element->getSizeZ(); };
145 void setElement(Element* element, const int& numCell);
146 Element* getElement() const;
147 virtual void setTransport(double value, int& numTransport, Prim /*type*/ = vecPhases);
148 virtual Transport& getTransport(const int& numTransport, Prim /*type*/ = vecPhases) const;
149 virtual Transport* getTransports(Prim /*type*/ = vecPhases) const;
150 Transport* getConsTransport(const int& numTransport) const;
151 void setConsTransport(double value, const int& numTransport);
152 std::vector<QuantitiesAddPhys*>& getVecQuantitiesAddPhys();
153 const int& getNumberPhases() const;
154 const int& getNumberTransports() const;
155 double getDensityGradient();
156 Model* getModel();
158 const Coord& getVelocity() const;
159 void setWall(bool wall);
160 bool getWall() const { return m_wall; };
164 double selectScalar(Variable nameVariable, int num = 0) const;
165
166 //Second order (not used for first-order cells)
167 //---------------------------------------------
169 virtual void allocateSecondOrderBuffersAndGradientVectors(Phase** /*phases*/, Mixture* /*mixture*/) {};
170
172 virtual void computeGradientsO2() {};
173 virtual void limitGradientsO2(Limiter& /*globalLimiter*/) {};
174
176 virtual void computeLocalSlopes(CellInterface& /*cellInterfaceRef*/) {};
177 virtual void computeLocalSlopes(CellInterface& /*cellInterface*/, Limiter& /*globalLimiter*/, Limiter& /*interfaceLimiter*/,
178 Limiter& /*globalVolumeFractionLimiter*/, Limiter& /*interfaceVolumeFractionLimiter*/,
179 double& /*alphaCellAfterOppositeSide*/, double& /*alphaCell*/, double& /*alphaCellOtherInterfaceSide*/,
180 double& /*epsInterface*/) {};
181 virtual void computeLocalSlopesLimite(CellInterface& /*cellInterface*/, Limiter& /*globalLimiter*/,
182 Limiter& /*interfaceLimiter*/, Limiter& /*globalVolumeFractionLimiter*/, Limiter& /*interfaceVolumeFractionLimiter*/,
183 double& /*epsInterface*/) {};
184 virtual Phase* getSlopes() const { return 0; };
185 virtual Transport* getSlopesTransport() const { return 0; };
186 virtual void saveCons() {};
187 virtual void getBackCons() {};
188 virtual void predictionOrdre2(const double& /*dt*/, Symmetry* /*symmetry*/) {};
190 //Methods for distance to an other object (Cell or CellInterface)
191 //---------------------------------------------------------------
192 double distance(Cell* c);
193 double distanceX(Cell* c);
194 double distanceY(Cell* c);
195 double distanceZ(Cell* c);
196 double distance(CellInterface* b);
197 double distanceX(CellInterface* b);
198 double distanceY(CellInterface* b);
199 double distanceZ(CellInterface* b);
201 bool traverseObjet(const GeometricObject& objet) const;
202
203 //Printing
204 //--------
205 void printInfo() const;
207 double getPsat();
208 bool printGnuplotAMR(std::ofstream& fileStream, const int& dim, GeometricObject* objet = 0, bool recordPsat = false);
209 void computeVolumePhaseK(double& integration, const int& numPhase);
210 void computeMass(double& mass, double& alphaRef);
211 void computeTotalMass(double& mass);
212 void computeTotalEnergy(double& totalEnergy);
213 void lookForPmax(double* pMax, double* pMaxWall);
214
215 //Specific for AMR method
216 //-----------------------
217 void setToZeroXi();
218 void setToZeroConsXi();
219 void timeEvolutionXi();
220 void chooseRefine(const double& xiSplit, const int& nbCellsY, const int& nbCellsZ,
221 const std::vector<AddPhys*>& addPhys, int& nbCellsTotalAMR);
222 void chooseUnrefine(const double& xiJoin, int& nbCellsTotalAMR);
223 void refineCellAndCellInterfaces(const int& nbCellsY, const int& nbCellsZ, const std::vector<AddPhys*>& addPhys, const bool& refineExternalCellInterfaces);
224 virtual void createChildCell(const int& lvl);
227 bool lvlNeighborTooHigh();
228 bool lvlNeighborTooLow();
229 void buildLvlCellsAndLvlInternalCellInterfacesArrays(std::vector<Cell*>* cellsLvl, std::vector<CellInterface*>* cellInterfacesLvl);
230 const int& getLvl() const { return m_lvl; };
231 const bool& getSplit() const { return m_split; };
232 const double& getXi() const { return m_xi; };
233 void setXi(double value);
234 void addFluxXi(double value);
236 Cell* getCellChild(const int& num);
237 std::vector<Cell*>* getChildVector();
239 //For parallel computing (no AMR)
240 //-------------------------------
241 virtual void pushBackSlope() {};
242 virtual void popBackSlope() {};
243 virtual int getRankOfNeighborCPU() const { return -1; };
244 virtual void setRankOfNeighborCPU(int /*rank*/) {};
245 void fillBufferPrimitives(double* buffer, int& counter, const int& lvl, const int& neighbour, Prim type = vecPhases) const;
246 void getBufferPrimitives(double* buffer, int& counter, const int& lvl, Eos** eos, Prim type = vecPhases);
247 void fillBufferVector(double* buffer, int& counter, const int& lvl, const int& neighbour, const int& dim, Variable nameVector, int num = 0, int index = -1) const;
248 void getBufferVector(double* buffer, int& counter, const int& lvl, const int& dim, Variable nameVector, int num = 0, int index = -1);
249 void fillBufferTransports(double* buffer, int& counter, const int& lvl, const int& neighbour) const;
250 void getBufferTransports(double* buffer, int& counter, const int& lvl);
251 virtual void fillBufferSlopes(double* /*buffer*/, int& /*counter*/, const int& /*lvl*/, const int& /*neighbour*/) const { Errors::errorMessage("fillBufferSlopes not available for Cell"); };
252 virtual void getBufferSlopes(double* /*buffer*/, int& /*counter*/, const int& /*lvl*/) { Errors::errorMessage("getBufferSlopes not available for Cell"); };
253 virtual bool isCellGhost() const { return false; };
254 bool hasNeighboringGhostCellOfCPUneighbour(const int& neighbour) const;
255 int numberOfNeighboringGhostCellsOfCPUneighbour(const int& neighbour) const;
256 virtual GradPhase* getGradPhase(const int& /*phaseNumber*/) const { Errors::errorMessage("getGradPhase not available for Cell"); return nullptr; };
257 virtual GradMixture* getGradMixture() const { Errors::errorMessage("getGradMixture not available for Cell"); return nullptr; };
258 virtual GradTransport* getGradTransport(const int& /*transportNumber*/) const { Errors::errorMessage("getGradTransport not available for Cell"); return nullptr; };
259
260 //For parallel AMR computing
261 //--------------------------
262 void chooseRefineDeraffineGhost(const int& nbCellsY, const int& nbCellsZ, const std::vector<AddPhys*>& addPhys, std::vector<Cell*>* cellsLvlGhost);
263 void refineCellAndCellInterfacesGhost(const int& nbCellsY, const int& nbCellsZ, const std::vector<AddPhys*>& addPhys);
265 void fillBufferXi(double* buffer, int& counter, const int& lvl, const int& neighbour) const;
266 void getBufferXi(double* buffer, int& counter, const int& lvl);
267 void fillBufferSplit(bool* buffer, int& counter, const int& lvl, const int& neighbour) const;
268 void getBufferSplit(bool* buffer, int& counter, const int& lvl);
269 void fillNumberElementsToSendToNeighbour(int& numberElementsToSendToNeighbor, int& numberSlopesToSendToNeighbor, const int& lvl, const int& neighbour, int numberNeighboursOfCPUneighbour);
270 void fillDataToSend(std::vector<double>& dataToSend, std::vector<int>& dataSplitToSend, const int& lvl) const;
271 void getDataToReceiveAndRefine(std::vector<double>& dataToReceive, std::vector<int>& dataSplitToReceive, const int& lvl, Eos** eos, int& counter, int& counterSplit,
272 const int& nbCellsY, const int& nbCellsZ, const std::vector<AddPhys*>& addPhys);
273 void computeLoad(double& load, int lvl) const;
274 void computeLvlMax(int& lvlMax) const;
275 void clearExternalCellInterfaces(const int& nbCellsY, const int& nbCellsZ);
277 void updateNbCellsTotalAMR(int& nbCellsTotalAMR);
278
279 protected:
280 bool m_wall;
287 std::vector<CellInterface*> m_cellInterfaces;
288 std::vector<QuantitiesAddPhys*> m_vecQuantitiesAddPhys;
290 //Attributs pour methode AMR
291 int m_lvl;
292 double m_xi;
293 double m_consXi;
294 bool m_split;
295 std::vector<Cell*> m_childrenCells;
296 std::vector<CellInterface*> m_childrenInternalCellInterfaces;
298 private:
299};
300
301extern Model* model;
302extern Gradient* gradient;
303extern std::vector<Coord> gradRho;
304extern std::vector<Variable> variableDensity;
305extern std::vector<int> numeratorDefault;
307#endif // CELL_H
std::vector< Variable > variableDensity
Definition Cell.cpp:38
std::vector< int > numeratorDefault
Definition Cell.cpp:39
Model * model
Definition CellInterface.cpp:33
std::vector< Coord > gradRho
Definition Cell.cpp:37
Gradient * gradient
Definition Cell.cpp:36
Prim
Enumeration for the primitive-variable type (usefull for second order, slopes, etc....
Definition Tools.h:39
@ vecPhases
Definition Tools.h:39
Variable
Enumeration for the flow variables.
Definition Tools.h:78
General class for additional physics.
Definition AddPhys.h:46
Definition CellInterface.h:52
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:172
void setToZeroConsGlobal()
Definition Cell.cpp:269
bool getWall() const
Definition Cell.h:160
double getDensityGradient()
Definition Cell.cpp:627
void addCellInterface(CellInterface *cellInterface)
Add a cell interface to current cell.
Definition Cell.cpp:89
virtual void saveCons()
Definition Cell.h:186
void addFluxXi(double value)
Definition Cell.cpp:1478
void correctionEnergy()
Definition Cell.cpp:327
std::vector< Cell * > m_childrenCells
Definition Cell.h:295
void timeEvolution(const double &dt, Symmetry *symmetry)
Definition Cell.cpp:286
Flux * getCons() const
Definition Cell.cpp:543
Transport * m_vecTransports
Definition Cell.h:283
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:2056
void setConsTransport(double value, const int &numTransport)
Definition Cell.cpp:600
Transport * m_consTransports
Definition Cell.h:285
void sourceTermIntegration(const double &)
Definition Cell.h:95
Element * m_element
Definition Cell.h:286
Cell * getCellChild(const int &num)
Definition Cell.cpp:1492
const double & getSizeZ() const
Definition Cell.h:144
void refineCellAndCellInterfacesGhost(const int &nbCellsY, const int &nbCellsZ, const std::vector< AddPhys * > &addPhys)
Definition Cell.cpp:1694
void refineCellAndCellInterfaces(const int &nbCellsY, const int &nbCellsZ, const std::vector< AddPhys * > &addPhys, const bool &refineExternalCellInterfaces)
Definition Cell.cpp:984
void printPhasesMixture(std::ofstream &fileStream) const
Definition Cell.cpp:335
int m_lvl
Definition Cell.h:291
double distance(Cell *c)
Definition Cell.cpp:672
void chooseUnrefine(const double &xiJoin, int &nbCellsTotalAMR)
Definition Cell.cpp:961
void setGradTk(int &numPhase, int &numAddPhys, double *buffer, int &counter)
Definition Cell.cpp:464
void fillBufferXi(double *buffer, int &counter, const int &lvl, const int &neighbour) const
Definition Cell.cpp:1956
Element * getElement() const
Definition Cell.cpp:565
void computeMass(double &mass, double &alphaRef)
Definition Cell.cpp:847
int numberOfNeighboringGhostCellsOfCPUneighbour(const int &neighbour) const
Definition Cell.cpp:1649
double m_xi
Definition Cell.h:292
void fulfillStateRestart()
Definition Cell.cpp:372
Mixture * m_mixture
Definition Cell.h:282
void computeVolumePhaseK(double &integration, const int &numPhase)
Definition Cell.cpp:792
void lookForPmax(double *pMax, double *pMaxWall)
Definition Cell.cpp:897
void fillBufferPrimitives(double *buffer, int &counter, const int &lvl, const int &neighbour, Prim type=vecPhases) const
Definition Cell.cpp:1508
virtual void computeLocalSlopesLimite(CellInterface &, Limiter &, Limiter &, Limiter &, Limiter &, double &)
Definition Cell.h:181
void setToZeroConsXi()
Definition Cell.cpp:931
virtual Phase * getSlopes() const
Definition Cell.h:184
Cell()
Basic Cell constructor for a non AMR cell.
Definition Cell.cpp:43
const Coord & getSize() const
Definition Cell.h:141
void fillBufferTransports(double *buffer, int &counter, const int &lvl, const int &neighbour) const
Definition Cell.cpp:1587
void updatePointersInternalCellInterfaces()
Definition Cell.cpp:2208
const double & getSizeY() const
Definition Cell.h:143
Phase ** m_vecPhases
Definition Cell.h:281
void setCons(Flux *cons)
Definition Cell.cpp:550
virtual Mixture * getMixture(Prim=vecPhases) const
Definition Cell.cpp:536
void buildLvlCellsAndLvlInternalCellInterfacesArrays(std::vector< Cell * > *cellsLvl, std::vector< CellInterface * > *cellInterfacesLvl)
Definition Cell.cpp:1459
std::vector< Cell * > * getChildVector()
Definition Cell.cpp:1499
virtual void copyPhase(const int &phaseNumber, Phase *phase)
Definition Cell.cpp:245
virtual void popBackSlope()
Definition Cell.h:242
const int & getLvl() const
Definition Cell.h:230
bool m_split
Definition Cell.h:294
void computeTotalMass(double &mass)
Definition Cell.cpp:863
double selectScalar(Variable nameVariable, int num=0) const
Select a specific scalar variable.
Definition Cell.cpp:663
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:1551
std::vector< CellInterface * > m_cellInterfaces
Definition Cell.h:287
virtual void getBufferSlopes(double *, int &, const int &)
Definition Cell.h:252
void fillNumberElementsToSendToNeighbour(int &numberElementsToSendToNeighbor, int &numberSlopesToSendToNeighbor, const int &lvl, const int &neighbour, int numberNeighboursOfCPUneighbour)
Definition Cell.cpp:2016
void setCellInterface(const int &b, CellInterface *cellInterface)
Definition Cell.cpp:515
Flux * m_cons
Definition Cell.h:284
void setXi(double value)
Definition Cell.cpp:1471
bool lvlNeighborTooLow()
Definition Cell.cpp:1429
void addNonConsAddPhys(AddPhys &addPhys, Symmetry *symmetry)
Definition Cell.cpp:475
bool hasNeighboringGhostCellOfCPUneighbour(const int &neighbour) const
Definition Cell.cpp:1621
void associateExtVar(Model *mod, Gradient *grad)
Associate external variables.
Definition Cell.cpp:105
void timeEvolutionAddPhys(const double &dt)
Definition Cell.cpp:303
void getBufferTransports(double *buffer, int &counter, const int &lvl)
Definition Cell.cpp:1605
void fillBufferSplit(bool *buffer, int &counter, const int &lvl, const int &neighbour) const
Definition Cell.cpp:1986
void fillDataToSend(std::vector< double > &dataToSend, std::vector< int > &dataSplitToSend, const int &lvl) const
Definition Cell.cpp:2034
virtual void fulfillState(Prim=vecPhases)
Definition Cell.cpp:357
bool m_wall
Definition Cell.h:280
void prepareAddPhys()
Definition Cell.cpp:424
bool traverseObjet(const GeometricObject &objet) const
Definition Cell.cpp:728
virtual GradTransport * getGradTransport(const int &) const
Definition Cell.h:258
const double & getSizeX() const
Definition Cell.h:142
virtual Transport * getSlopesTransport() const
Definition Cell.h:185
virtual Transport * getTransports(Prim=vecPhases) const
Definition Cell.cpp:586
void getBufferXi(double *buffer, int &counter, const int &lvl)
Definition Cell.cpp:1972
virtual void allocateSecondOrderBuffersAndGradientVectors(Phase **, Mixture *)
Compute global variable buffers (min, max, etc.) and initialize speficic gradient vectors for 2nd-ord...
Definition Cell.h:169
std::vector< CellInterface * > m_childrenInternalCellInterfaces
Definition Cell.h:296
double distanceY(Cell *c)
Definition Cell.cpp:686
void chooseRefine(const double &xiSplit, const int &nbCellsY, const int &nbCellsZ, const std::vector< AddPhys * > &addPhys, int &nbCellsTotalAMR)
Definition Cell.cpp:945
void localProjection(const Coord &normal, const Coord &tangent, const Coord &binormal, Prim=vecPhases)
Definition Cell.cpp:380
Transport * getConsTransport(const int &numTransport) const
Definition Cell.cpp:593
void getBufferSplit(bool *buffer, int &counter, const int &lvl)
Definition Cell.cpp:2002
double m_consXi
Definition Cell.h:293
virtual void copyInCell(Cell &) const
Definition Cell.h:102
virtual void reverseProjection(const Coord &normal, const Coord &tangent, const Coord &binormal)
Definition Cell.cpp:390
double getPsat()
Compute saturation pressure for a liquid/vapor fluid mixture (first phase is considered predominant -...
Definition Cell.cpp:737
virtual void setRankOfNeighborCPU(int)
Definition Cell.h:244
Coord & getVelocity()
Definition Cell.cpp:606
void getBufferVector(double *buffer, int &counter, const int &lvl, const int &dim, Variable nameVector, int num=0, int index=-1)
Definition Cell.cpp:1569
bool lvlNeighborTooHigh()
Definition Cell.cpp:1411
virtual void limitGradientsO2(Limiter &)
Definition Cell.h:173
virtual Phase ** getPhases(Prim=vecPhases) const
Definition Cell.cpp:529
virtual void computeLocalSlopes(CellInterface &, Limiter &, Limiter &, Limiter &, Limiter &, double &, double &, double &, double &)
Definition Cell.h:177
const Coord & getPosition() const
Definition Cell.h:140
virtual ~Cell()
Definition Cell.cpp:63
void computeLoad(double &load, int lvl) const
Definition Cell.cpp:2087
void buildCons()
Definition Cell.cpp:320
const double & getXi() const
Definition Cell.h:232
CellInterface * getCellInterface(const int &b)
Definition Cell.cpp:508
void chooseRefineDeraffineGhost(const int &nbCellsY, const int &nbCellsZ, const std::vector< AddPhys * > &addPhys, std::vector< Cell * > *cellsLvlGhost)
Definition Cell.cpp:1679
int getNumberCellsChildren()
Definition Cell.cpp:1485
void copyMixture(Mixture *mixture)
Definition Cell.cpp:252
void unrefineCellAndCellInterfaces()
Definition Cell.cpp:1333
virtual void completeFulfillState()
Definition Cell.cpp:344
virtual GradMixture * getGradMixture() const
Definition Cell.h:257
virtual void getBackCons()
Definition Cell.h:187
Model * getModel()
Definition Cell.cpp:635
void averageChildrenInParent()
Definition Cell.cpp:1373
virtual void allocate(const std::vector< AddPhys * > &addPhys)
Memory allocation of cell attributes.
Definition Cell.cpp:118
virtual int getRankOfNeighborCPU() const
Definition Cell.h:243
const bool & getSplit() const
Definition Cell.h:231
const Coord & getGradTk(int &numPhase, int &numAddPhys) const
Allow to recover an additional physical quantity.
Definition Cell.cpp:457
void setWall(bool wall)
Definition Cell.cpp:620
virtual Transport & getTransport(const int &numTransport, Prim=vecPhases) const
Definition Cell.cpp:579
void setToZeroCons()
Definition Cell.cpp:259
void timeEvolutionXi()
Definition Cell.cpp:938
int getCellInterfacesSize() const
Definition Cell.cpp:501
void printInfo() const
Definition Cell.cpp:747
const QuantitiesAddPhys * getQPA(int &numQPA) const
Definition Cell.h:114
void copyVec(Phase **vecPhases, Mixture *mixture, Transport *vecTransports)
Definition Cell.cpp:400
void fill(std::vector< GeometricalDomain * > &domains, const int &)
Filling cell properties using a physical domain.
Definition Cell.cpp:147
void setVector(Variable nameVector, const Coord &value, int num=0, int subscript=-1)
Definition Cell.cpp:445
virtual void pushBackSlope()
Definition Cell.h:241
void unrefineCellAndCellInterfacesGhost()
Definition Cell.cpp:1933
void clearExternalCellInterfaces(const int &nbCellsY, const int &nbCellsZ)
Definition Cell.cpp:2116
void setElement(Element *element, const int &numCell)
Definition Cell.cpp:557
virtual bool isCellGhost() const
Definition Cell.h:253
double distanceX(Cell *c)
Definition Cell.cpp:679
double distanceZ(Cell *c)
Definition Cell.cpp:693
bool printGnuplotAMR(std::ofstream &fileStream, const int &dim, GeometricObject *objet=0, bool recordPsat=false)
Definition Cell.cpp:754
virtual void createChildCell(const int &lvl)
Definition Cell.cpp:1326
virtual void fillBufferSlopes(double *, int &, const int &, const int &) const
Definition Cell.h:251
Coord selectVector(Variable nameVector, int num=0, int subscript=-1) const
Definition Cell.cpp:433
void computeLvlMax(int &lvlMax) const
Definition Cell.cpp:2102
const int & getNumberTransports() const
Definition Cell.cpp:656
std::vector< QuantitiesAddPhys * > & getVecQuantitiesAddPhys()
Definition Cell.cpp:642
void buildPrim()
Definition Cell.cpp:313
virtual void predictionOrdre2(const double &, Symmetry *)
Definition Cell.h:188
virtual void computeLocalSlopes(CellInterface &)
Compute slopes for 2nd-order scheme on unstructured mesh.
Definition Cell.h:176
void computeTotalEnergy(double &totalEnergy)
Definition Cell.cpp:880
void deleteInterface(const int &b)
Definition Cell.cpp:413
void deleteCellInterface(CellInterface *cellInterface)
Delete the cell interface of current cell.
Definition Cell.cpp:96
virtual GradPhase * getGradPhase(const int &) const
Definition Cell.h:256
void setToZeroXi()
Definition Cell.cpp:924
void reinitializeColorFunction(const int &numTransport, const int &numPhase)
Re-initialize the color function (transport) with alpha.
Definition Cell.cpp:483
virtual void setTransport(double value, int &numTransport, Prim=vecPhases)
Definition Cell.cpp:572
void updateNbCellsTotalAMR(int &nbCellsTotalAMR)
Definition Cell.cpp:2218
virtual Phase * getPhase(const int &phaseNumber, Prim=vecPhases) const
Definition Cell.cpp:522
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:492
const int & getNumberPhases() const
Definition Cell.cpp:649
void allocateEos()
Definition Cell.cpp:140
std::vector< QuantitiesAddPhys * > m_vecQuantitiesAddPhys
Definition Cell.h:288
void getBufferPrimitives(double *buffer, int &counter, const int &lvl, Eos **eos, Prim type=vecPhases)
Definition Cell.cpp:1530
Class for a coordinate system object such as coordinates of the vertex or a vector.
Definition Coord.h:43
Definition Element.h:47
virtual const double & getSizeY()
Definition Element.h:88
virtual const Coord & getSize()
Definition Element.h:90
virtual const double & getSizeX()
Definition Element.h:87
virtual const double & getSizeZ()
Definition Element.h:89
const Coord & getPosition() const
Definition Element.h:54
General class for Equation of State (EOS).
Definition Eos.h:54
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