31#ifndef MESHCARTESIANAMR_H
32#define MESHCARTESIANAMR_H
39 MeshCartesianAMR(
double lX,
int numberCellsX,
double lY,
int numberCellsY,
double lZ,
int numberCellsZ,
40 std::vector<stretchZone> stretchX, std::vector<stretchZone> stretchY, std::vector<stretchZone> stretchZ,
41 int lvlMax = 0,
double criteriaVar = 1.e10,
bool varRho =
false,
bool varP =
false,
bool varU =
false,
42 bool varAlpha =
false,
double xiSplit = 1.,
double xiJoin = 1.);
46 const int& restartSimulation,
bool , std::string ordreCalcul);
51 const std::vector<AddPhys*>& addPhys,
int& nbCellsTotalAMR, std::vector<GeometricalDomain*>& domains,
52 Eos** eos,
const int& restartSimulation, std::string ordreCalcul, std::vector<GeometricalDomain*>& solidDomains);
54 const std::vector<AddPhys*>& addPhys,
int& nbCellsTotalAMR,
Eos** eos);
55 virtual std::string
whoAmI()
const;
59 virtual void getNodes(std::vector<double>& dataset, std::vector<Cell*>* cellsLvl)
const;
60 virtual void getConnectivity(std::vector<double>& dataset, std::vector<Cell*>* cellsLvl)
const;
61 virtual void getOffsets(std::vector<double>& dataset, std::vector<Cell*>* cellsLvl)
const;
62 virtual void getTypeCell(std::vector<double>& dataset, std::vector<Cell*>* cellsLvl)
const;
77 const std::vector<AddPhys*>& addPhys,
Eos** eos,
int& nbCellsTotalAMR, std::vector<GeometricalDomain*>& solidDomains,
bool init =
false);
83 const std::vector<AddPhys*>& addPhys,
Eos** eos,
int& nbCellsTotalAMR,
86 std::vector<GeometricalDomain*>& solidDomains);
Base class for a mesh cell.
Definition Cell.h:59
General class for Equation of State (EOS).
Definition Eos.h:54
Definition MeshCartesianAMR.h:37
virtual void getConnectivity(std::vector< double > &dataset, std::vector< Cell * > *cellsLvl) const
Definition MeshCartesianAMR.cpp:703
double m_xiJoin
Value of xi to split or join the cells.
Definition MeshCartesianAMR.h:92
virtual ~MeshCartesianAMR()
Definition MeshCartesianAMR.cpp:49
double m_xiSplit
Definition MeshCartesianAMR.h:92
virtual void refineCellAndCellInterfaces(Cell *cell, const std::vector< AddPhys * > &addPhys, int &nbCellsTotalAMR)
Definition MeshCartesianAMR.cpp:855
virtual void procedureRaffinement(TypeMeshContainer< Cell * > *cellsLvl, TypeMeshContainer< Cell * > *cellsLvlGhost, TypeMeshContainer< CellInterface * > *cellInterfacesLvl, const int &lvl, const std::vector< AddPhys * > &addPhys, int &nbCellsTotalAMR, Eos **eos)
Definition MeshCartesianAMR.cpp:543
bool m_varP
Definition MeshCartesianAMR.h:91
int m_lvlMax
Niveau maximal sur l arbre AMR (si m_lvlMax = 0, pas d AMR)
Definition MeshCartesianAMR.h:89
bool m_varU
Definition MeshCartesianAMR.h:91
bool m_varAlpha
Choice on which variation we coarsen or refine.
Definition MeshCartesianAMR.h:91
virtual void setDataSet(std::vector< double > &dataset, TypeMeshContainer< Cell * > *cellsLvl, const int var, int phase) const
Definition MeshCartesianAMR.cpp:821
virtual void getTypeCell(std::vector< double > &dataset, std::vector< Cell * > *cellsLvl) const
Definition MeshCartesianAMR.cpp:762
virtual void printDomainDecomposition(std::ofstream &fileStream)
Definition MeshCartesianAMR.cpp:864
decomposition::Decomposition m_decomp
Parallel domain decomposition based on keys.
Definition MeshCartesianAMR.h:93
virtual void parallelLoadBalancingAMR(TypeMeshContainer< Cell * > *cellsLvl, TypeMeshContainer< Cell * > *cellsLvlGhost, TypeMeshContainer< CellInterface * > *cellInterfacesLvl, std::string ordreCalcul, const std::vector< AddPhys * > &addPhys, Eos **eos, int &nbCellsTotalAMR, std::vector< GeometricalDomain * > &solidDomains, bool init=false)
Definition MeshCartesianAMR.cpp:911
virtual void balance(TypeMeshContainer< Cell * > *cellsLvl, TypeMeshContainer< Cell * > *cellsLvlGhost, TypeMeshContainer< CellInterface * > *cellInterfacesLvl, std::string ordreCalcul, const std::vector< AddPhys * > &addPhys, Eos **eos, int &nbCellsTotalAMR, std::vector< typename decomposition::Key< 3 >::value_type > &indicesSendStartGlobal, std::vector< typename decomposition::Key< 3 >::value_type > &indicesSendEndGlobal, std::vector< typename decomposition::Key< 3 >::value_type > &indicesReceiveStartGlobal, std::vector< typename decomposition::Key< 3 >::value_type > &indicesReceiveEndGlobal, std::vector< GeometricalDomain * > &solidDomains)
Definition MeshCartesianAMR.cpp:1157
virtual void getOffsets(std::vector< double > &dataset, std::vector< Cell * > *cellsLvl) const
Definition MeshCartesianAMR.cpp:745
virtual void readDomainDecomposition(std::ifstream &fileStream)
Definition MeshCartesianAMR.cpp:871
virtual void writeHeaderPiece(std::ofstream &fileStream, TypeMeshContainer< Cell * > *cellsLvl) const
Definition MeshCartesianAMR.cpp:631
virtual void procedureRaffinementInitialization(TypeMeshContainer< Cell * > *cellsLvl, TypeMeshContainer< Cell * > *cellsLvlGhost, TypeMeshContainer< CellInterface * > *cellInterfacesLvl, const std::vector< AddPhys * > &addPhys, int &nbCellsTotalAMR, std::vector< GeometricalDomain * > &domains, Eos **eos, const int &restartSimulation, std::string ordreCalcul, std::vector< GeometricalDomain * > &solidDomains)
Definition MeshCartesianAMR.cpp:509
double m_criteriaVar
Value of criteria to not pass on the variation of a variable for coarsening or refining (put xi=1....
Definition MeshCartesianAMR.h:90
void initializeGeometrieAMR(TypeMeshContainer< Cell * > &cells, TypeMeshContainer< Cell * > &cellsGhost, TypeMeshContainer< CellInterface * > &cellInterfaces, const int &restartSimulation, std::string ordreCalcul)
Definition MeshCartesianAMR.cpp:64
void assignElementProperties(TypeMeshContainer< Cell * > &cells, std::vector< decomposition::Key< 3 > > &keys)
Definition MeshCartesianAMR.cpp:105
void createCellInterfacesFacesAndGhostCells(TypeMeshContainer< Cell * > &cells, TypeMeshContainer< Cell * > &cellsGhost, TypeMeshContainer< CellInterface * > &cellInterfaces, std::string ordreCalcul)
Definition MeshCartesianAMR.cpp:131
bool m_varRho
Definition MeshCartesianAMR.h:91
virtual int initializeGeometrie(TypeMeshContainer< Cell * > &cells, TypeMeshContainer< Cell * > &cellsGhost, TypeMeshContainer< CellInterface * > &cellInterfaces, const int &restartSimulation, bool, std::string ordreCalcul)
renvoi le number de dimensions (1,2 ou 3)
Definition MeshCartesianAMR.cpp:53
virtual void finalizeParallele(const int &lvlMax)
Definition MeshCartesianAMR.cpp:904
virtual void getNodes(std::vector< double > &dataset, std::vector< Cell * > *cellsLvl) const
Definition MeshCartesianAMR.cpp:648
virtual void getData(TypeMeshContainer< Cell * > *cellsLvl, std::vector< double > &dataset, const int var, int phase) const
Definition MeshCartesianAMR.cpp:777
virtual void computePotentialBalancing(TypeMeshContainer< Cell * > *cellsLvl, bool init, int lvl, bool &balance, std::vector< typename decomposition::Key< 3 >::value_type > &indicesSendStartGlobal, std::vector< typename decomposition::Key< 3 >::value_type > &indicesSendEndGlobal, std::vector< typename decomposition::Key< 3 >::value_type > &indicesReceiveStartGlobal, std::vector< typename decomposition::Key< 3 >::value_type > &indicesReceiveEndGlobal)
Definition MeshCartesianAMR.cpp:942
virtual int getLvlMax() const
Definition MeshCartesianAMR.h:70
virtual std::string whoAmI() const
Definition MeshCartesianAMR.cpp:622
virtual void initializePersistentCommunications(const TypeMeshContainer< Cell * > &cells, std::string ordreCalcul)
Definition MeshCartesianAMR.cpp:882
Definition MeshCartesian.h:44
Definition decomposition.hpp:43
unsigned long long int value_type
Definition key.hpp:54