ECOGEN 4.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
MeshCartesianAMR Class Reference

#include <MeshCartesianAMR.h>

Inherits MeshCartesian.

Public Member Functions

 MeshCartesianAMR (double lX, int numberCellsX, double lY, int numberCellsY, double lZ, int numberCellsZ, std::vector< stretchZone > stretchX, std::vector< stretchZone > stretchY, std::vector< stretchZone > stretchZ, int lvlMax=0, double criteriaVar=1.e10, bool varRho=false, bool varP=false, bool varU=false, bool varAlpha=false, double xiSplit=1., double xiJoin=1.)
 
virtual ~MeshCartesianAMR ()
 
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)
 
void initializeGeometrieAMR (TypeMeshContainer< Cell * > &cells, TypeMeshContainer< Cell * > &cellsGhost, TypeMeshContainer< CellInterface * > &cellInterfaces, const int &restartSimulation, std::string ordreCalcul)
 
void assignElementProperties (TypeMeshContainer< Cell * > &cells, std::vector< decomposition::Key< 3 > > &keys)
 
void createCellInterfacesFacesAndGhostCells (TypeMeshContainer< Cell * > &cells, TypeMeshContainer< Cell * > &cellsGhost, TypeMeshContainer< CellInterface * > &cellInterfaces, std::string ordreCalcul)
 
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)
 
virtual void procedureRaffinement (TypeMeshContainer< Cell * > *cellsLvl, TypeMeshContainer< Cell * > *cellsLvlGhost, TypeMeshContainer< CellInterface * > *cellInterfacesLvl, const int &lvl, const std::vector< AddPhys * > &addPhys, int &nbCellsTotalAMR, Eos **eos)
 
virtual std::string whoAmI () const
 
virtual void writeHeaderPiece (std::ofstream &fileStream, TypeMeshContainer< Cell * > *cellsLvl) const
 
virtual void getNodes (std::vector< double > &dataset, std::vector< Cell * > *cellsLvl) const
 
virtual void getConnectivity (std::vector< double > &dataset, std::vector< Cell * > *cellsLvl) const
 
virtual void getOffsets (std::vector< double > &dataset, std::vector< Cell * > *cellsLvl) const
 
virtual void getTypeCell (std::vector< double > &dataset, std::vector< Cell * > *cellsLvl) const
 
virtual void getData (TypeMeshContainer< Cell * > *cellsLvl, std::vector< double > &dataset, const int var, int phase) const
 
virtual void setDataSet (std::vector< double > &dataset, TypeMeshContainer< Cell * > *cellsLvl, const int var, int phase) const
 
virtual void refineCellAndCellInterfaces (Cell *cell, const std::vector< AddPhys * > &addPhys, int &nbCellsTotalAMR)
 
virtual void printDomainDecomposition (std::ofstream &fileStream)
 
virtual void readDomainDecomposition (std::ifstream &fileStream)
 
virtual int getLvlMax () const
 
virtual void initializePersistentCommunications (const TypeMeshContainer< Cell * > &cells, std::string ordreCalcul)
 
virtual void finalizeParallele (const int &lvlMax)
 
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)
 
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)
 
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)
 
- Public Member Functions inherited from MeshCartesian
 MeshCartesian (double lX, int numberCellsX, double lY, int numberCellsY, double lZ, int numberCellsZ, std::vector< stretchZone > stretchX, std::vector< stretchZone > stretchY, std::vector< stretchZone > stretchZ)
 
virtual ~MeshCartesian ()
 
virtual void assignLimits (std::vector< BoundCond * > &boundCond)
 
void getIJK (const int &index, int &i, int &j, int &k) const
 
void construitIGlobal (const int &i, const int &j, const int &k, int &index) const
 
void meshStretching ()
 
void initializeGeometrieMonoCpu (TypeMeshContainer< Cell * > &cells, TypeMeshContainer< CellInterface * > &cellInterfaces, std::string ordreCalcul)
 
void initializeGeometrieParallele (TypeMeshContainer< Cell * > &cells, TypeMeshContainer< Cell * > &cellsGhost, TypeMeshContainer< CellInterface * > &cellInterfaces, std::string ordreCalcul)
 
void decoupageParallele (std::string ordreCalcul, TypeMeshContainer< Cell * > &cells)
 
virtual void setImmersedBoundaries (TypeMeshContainer< CellInterface * > *cellInterfacesLvl, std::string ordreCalcul) const
 
virtual int getNumberCellsY ()
 
virtual int getNumberCellsZ ()
 
virtual std::string getStringExtent (bool global=false) const
 
virtual void getCoord (std::vector< double > &dataset, Axis axis) const
 
- Public Member Functions inherited from Mesh
 Mesh ()
 
virtual ~Mesh ()
 
const int & getProblemDimension () const
 
const int & getNumberCells () const
 
const int & getNumberCellsTotal () const
 
const int & getNumberFaces () const
 
const int & getNumFichier () const
 
virtual double getdX () const
 
virtual double getdY () const
 
virtual double getdZ () const
 
const TypeMgetType () const
 
void writeResultsGnuplot (std::vector< Cell * > *cellsLvl, std::ofstream &fileStream, GeometricObject *objet=0, bool recordPsat=false) const
 
virtual void writeHeaderPiece (std::ofstream &, std::vector< Cell * > *) const
 
virtual void getData (std::vector< Cell * > *, std::vector< double > &, const int, int) const
 Extracting data for printing results.
 
virtual void setDataSet (std::vector< double > &, std::vector< Cell * > *, const int, int) const
 Extracting data for printing results.
 
virtual void extractAbsVelocityMRF (std::vector< Cell * > *, std::vector< double > &, Source *) const
 Extracting absolute velocity for specific Moving Reference Frame computations.
 
virtual void extractReferenceLength (std::vector< Cell * > *, std::vector< double > &) const
 
virtual void procedureRaffinementInitialization (std::vector< Cell * > *, TypeMeshContainer< Cell * > *, std::vector< CellInterface * > *, const std::vector< AddPhys * > &, int &nbCellsTotalAMR, std::vector< GeometricalDomain * > &, Eos **, const int &, std::string, std::vector< GeometricalDomain * > &)
 
virtual void procedureRaffinement (std::vector< Cell * > *, TypeMeshContainer< Cell * > *, std::vector< CellInterface * > *, const int &, const std::vector< AddPhys * > &, int &, Eos **)
 
virtual void parallelLoadBalancingAMR (std::vector< Cell * > *, TypeMeshContainer< Cell * > *, std::vector< CellInterface * > *, std::string, const std::vector< AddPhys * > &, Eos **, int &, std::vector< GeometricalDomain * > &, bool=false)
 
virtual std::string getMeshExtension () const
 
virtual void initCpuMeshSequential (TypeMeshContainer< Cell * > &, std::string &)
 Initialize mesh of a single partition for restart with mesh mapping option.
 
virtual void initCpuMeshParallel (TypeMeshContainer< Cell * > &, std::string &, int)
 Initialize mesh of a single partition of a partionned mesh for restart with mesh mapping option.
 

Private Attributes

int m_lvlMax
 Niveau maximal sur l arbre AMR (si m_lvlMax = 0, pas d AMR)
 
double m_criteriaVar
 Value of criteria to not pass on the variation of a variable for coarsening or refining (put xi=1.)
 
bool m_varRho
 
bool m_varP
 
bool m_varU
 
bool m_varAlpha
 Choice on which variation we coarsen or refine.
 
double m_xiSplit
 
double m_xiJoin
 Value of xi to split or join the cells.
 
decomposition::Decomposition m_decomp
 Parallel domain decomposition based on keys.
 

Additional Inherited Members

- Protected Attributes inherited from MeshCartesian
TypeMeshContainer< Element * > m_elements
 Vector of element objects: Contains geometrical attributes.
 
TypeMeshContainer< Face * > m_faces
 Vector of face objects (between two elements or at boundaries): Contains geometrical attributes.
 
double m_lX
 
double m_lY
 
double m_lZ
 
int m_numberCellsX
 
int m_numberCellsY
 
int m_numberCellsZ
 
int m_numberCellsXGlobal
 
int m_numberCellsYGlobal
 
int m_numberCellsZGlobal
 
std::vector< double > m_dXi
 
std::vector< double > m_dYj
 
std::vector< double > m_dZk
 
std::vector< double > m_posXi
 
std::vector< double > m_posYj
 
std::vector< double > m_posZk
 
std::vector< stretchZonem_stretchX
 
std::vector< stretchZonem_stretchY
 
std::vector< stretchZonem_stretchZ
 
int m_numberCpuX
 
int m_numberCpuY
 
int m_numberCpuZ
 
int m_CpuCoordX
 
int m_CpuCoordY
 
int m_CpuCoordZ
 
int m_offsetX
 
int m_offsetY
 
int m_offsetZ
 
int m_numberBoundCondInit
 
BoundCondm_limXm
 
BoundCondm_limXp
 
BoundCondm_limYm
 
BoundCondm_limYp
 
BoundCondm_limZm
 
BoundCondm_limZp
 
- Protected Attributes inherited from Mesh
int m_numFichier
 
int m_problemDimension
 
int m_numberElements
 
int m_numberFacesTotal
 
int m_numberCellsCalcul
 
int m_numberCellsTotal
 
TypeM m_type
 

Constructor & Destructor Documentation

◆ MeshCartesianAMR()

MeshCartesianAMR::MeshCartesianAMR ( double  lX,
int  numberCellsX,
double  lY,
int  numberCellsY,
double  lZ,
int  numberCellsZ,
std::vector< stretchZone stretchX,
std::vector< stretchZone stretchY,
std::vector< stretchZone stretchZ,
int  lvlMax = 0,
double  criteriaVar = 1.e10,
bool  varRho = false,
bool  varP = false,
bool  varU = false,
bool  varAlpha = false,
double  xiSplit = 1.,
double  xiJoin = 1. 
)

◆ ~MeshCartesianAMR()

MeshCartesianAMR::~MeshCartesianAMR ( )
virtual

Member Function Documentation

◆ assignElementProperties()

void MeshCartesianAMR::assignElementProperties ( TypeMeshContainer< Cell * > &  cells,
std::vector< decomposition::Key< 3 > > &  keys 
)

◆ balance()

void MeshCartesianAMR::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 
)
virtual

◆ computePotentialBalancing()

void MeshCartesianAMR::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 
)
virtual

◆ createCellInterfacesFacesAndGhostCells()

void MeshCartesianAMR::createCellInterfacesFacesAndGhostCells ( TypeMeshContainer< Cell * > &  cells,
TypeMeshContainer< Cell * > &  cellsGhost,
TypeMeshContainer< CellInterface * > &  cellInterfaces,
std::string  ordreCalcul 
)

◆ finalizeParallele()

void MeshCartesianAMR::finalizeParallele ( const int &  lvlMax)
virtual

Reimplemented from Mesh.

◆ getConnectivity()

void MeshCartesianAMR::getConnectivity ( std::vector< double > &  dataset,
std::vector< Cell * > *  cellsLvl 
) const
virtual

Reimplemented from Mesh.

◆ getData()

void MeshCartesianAMR::getData ( TypeMeshContainer< Cell * > *  cellsLvl,
std::vector< double > &  dataset,
const int  var,
int  phase 
) const
virtual

Reimplemented from MeshCartesian.

◆ getLvlMax()

virtual int MeshCartesianAMR::getLvlMax ( ) const
inlinevirtual

Reimplemented from Mesh.

◆ getNodes()

void MeshCartesianAMR::getNodes ( std::vector< double > &  dataset,
std::vector< Cell * > *  cellsLvl 
) const
virtual

Reimplemented from Mesh.

◆ getOffsets()

void MeshCartesianAMR::getOffsets ( std::vector< double > &  dataset,
std::vector< Cell * > *  cellsLvl 
) const
virtual

Reimplemented from Mesh.

◆ getTypeCell()

void MeshCartesianAMR::getTypeCell ( std::vector< double > &  dataset,
std::vector< Cell * > *  cellsLvl 
) const
virtual

Reimplemented from Mesh.

◆ initializeGeometrie()

int MeshCartesianAMR::initializeGeometrie ( TypeMeshContainer< Cell * > &  cells,
TypeMeshContainer< Cell * > &  cellsGhost,
TypeMeshContainer< CellInterface * > &  cellInterfaces,
const int &  restartSimulation,
bool  pretraitementParallele,
std::string  ordreCalcul 
)
virtual

renvoi le number de dimensions (1,2 ou 3)

Reimplemented from MeshCartesian.

◆ initializeGeometrieAMR()

void MeshCartesianAMR::initializeGeometrieAMR ( TypeMeshContainer< Cell * > &  cells,
TypeMeshContainer< Cell * > &  cellsGhost,
TypeMeshContainer< CellInterface * > &  cellInterfaces,
const int &  restartSimulation,
std::string  ordreCalcul 
)

◆ initializePersistentCommunications()

void MeshCartesianAMR::initializePersistentCommunications ( const TypeMeshContainer< Cell * > &  cells,
std::string  ordreCalcul 
)
virtual

Reimplemented from Mesh.

◆ parallelLoadBalancingAMR()

void MeshCartesianAMR::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 
)
virtual

◆ printDomainDecomposition()

void MeshCartesianAMR::printDomainDecomposition ( std::ofstream &  fileStream)
virtual

Reimplemented from Mesh.

◆ procedureRaffinement()

void MeshCartesianAMR::procedureRaffinement ( TypeMeshContainer< Cell * > *  cellsLvl,
TypeMeshContainer< Cell * > *  cellsLvlGhost,
TypeMeshContainer< CellInterface * > *  cellInterfacesLvl,
const int &  lvl,
const std::vector< AddPhys * > &  addPhys,
int &  nbCellsTotalAMR,
Eos **  eos 
)
virtual

◆ procedureRaffinementInitialization()

void MeshCartesianAMR::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 
)
virtual

◆ readDomainDecomposition()

void MeshCartesianAMR::readDomainDecomposition ( std::ifstream &  fileStream)
virtual

Reimplemented from Mesh.

◆ refineCellAndCellInterfaces()

void MeshCartesianAMR::refineCellAndCellInterfaces ( Cell cell,
const std::vector< AddPhys * > &  addPhys,
int &  nbCellsTotalAMR 
)
virtual

Reimplemented from Mesh.

◆ setDataSet()

void MeshCartesianAMR::setDataSet ( std::vector< double > &  dataset,
TypeMeshContainer< Cell * > *  cellsLvl,
const int  var,
int  phase 
) const
virtual

Reimplemented from MeshCartesian.

◆ whoAmI()

std::string MeshCartesianAMR::whoAmI ( ) const
virtual

Reimplemented from MeshCartesian.

◆ writeHeaderPiece()

void MeshCartesianAMR::writeHeaderPiece ( std::ofstream &  fileStream,
TypeMeshContainer< Cell * > *  cellsLvl 
) const
virtual

Member Data Documentation

◆ m_criteriaVar

double MeshCartesianAMR::m_criteriaVar
private

Value of criteria to not pass on the variation of a variable for coarsening or refining (put xi=1.)

◆ m_decomp

decomposition::Decomposition MeshCartesianAMR::m_decomp
private

Parallel domain decomposition based on keys.

◆ m_lvlMax

int MeshCartesianAMR::m_lvlMax
private

Niveau maximal sur l arbre AMR (si m_lvlMax = 0, pas d AMR)

◆ m_varAlpha

bool MeshCartesianAMR::m_varAlpha
private

Choice on which variation we coarsen or refine.

◆ m_varP

bool MeshCartesianAMR::m_varP
private

◆ m_varRho

bool MeshCartesianAMR::m_varRho
private

◆ m_varU

bool MeshCartesianAMR::m_varU
private

◆ m_xiJoin

double MeshCartesianAMR::m_xiJoin
private

Value of xi to split or join the cells.

◆ m_xiSplit

double MeshCartesianAMR::m_xiSplit
private

The documentation for this class was generated from the following files: