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

#include <MeshCartesian.h>

Inherits Mesh.

Inherited by MeshCartesianAMR.

Collaboration diagram for MeshCartesian:
[legend]

Public Member Functions

 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)
 ~MeshCartesian () override
void assignLimits (std::vector< BoundCond * > &boundCond) override
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
int initializeGeometrie (TypeMeshContainer< Cell * > &cells, TypeMeshContainer< Cell * > &cellsGhost, TypeMeshContainer< CellInterface * > &cellInterfaces, const int &, bool, SimulationOrder schemeOrder) override
 renvoi le number de dimensions (1,2 ou 3)
void meshStretching ()
void initializeGeometrieMonoCpu (TypeMeshContainer< Cell * > &cells, TypeMeshContainer< CellInterface * > &cellInterfaces, SimulationOrder schemeOrder)
void initializeGeometrieParallele (TypeMeshContainer< Cell * > &cells, TypeMeshContainer< Cell * > &cellsGhost, TypeMeshContainer< CellInterface * > &cellInterfaces, SimulationOrder schemeOrder)
void parallelePartitioning (SimulationOrder schemeOrder, TypeMeshContainer< Cell * > &cells)
std::string whoAmI () const override
void setImmersedBoundaries (TypeMeshContainer< CellInterface * > *cellInterfacesLvl, SimulationOrder schemeOrder) const override
int getNumberCellsX () const override
int getNumberCellsY () const override
int getNumberCellsZ () const override
int getNumberCellsXGlobal () const override
int getNumberCellsYGlobal () const override
int getNumberCellsZGlobal () const override
int getOffsetX () const override
int getOffsetY () const override
int getOffsetZ () const override
int getNumberCpuX () const override
int getNumberCpuY () const override
int getNumberCpuZ () const override
std::string getStringExtent (bool global=false) const override
std::array< int, 6 > getArrayGlobalExtent () const override
 Return whole extent of global cartesian mesh under the form of an array.
void getCoord (std::vector< double > &dataset, Axis axis, bool global=false) const override
 For structured grid, get coordinates along a given axis.
size_t getNodes (std::vector< double > &dataset, std::vector< Cell * > *) const override
 Store coordinates of mesh nodes in a flat vector.
size_t getConnectivity (std::vector< int64_t > &dataset, std::vector< Cell * > *) const override
 Store connectivities of mesh cells in a flat vector of 'ECOGEN_VTKHDF_intType' integers.
size_t getConnectivity (std::vector< int32_t > &dataset, std::vector< Cell * > *) const override
 Store connectivities of mesh cells in a flat vector of 'ECOGEN_VTKHDF_intType' integers.
void getOffsets (std::vector< int64_t > &dataset, std::vector< Cell * > *) const override
 Store offsets in connectivity array of mesh cells.
void getOffsets (std::vector< int32_t > &dataset, std::vector< Cell * > *) const override
 Store offsets in connectivity array of mesh cells.
void getTypeCell (std::vector< unsigned char > &dataset, std::vector< Cell * > *) const override
void getData (TypeMeshContainer< Cell * > *cellsLvl, std::vector< double > &dataset, const int var, int phase) const override
void getData (TypeMeshContainer< Cell * > *cellsLvl, std::vector< float > &dataset, const int var, int phase) const override
void setDataSet (std::vector< double > &dataset, TypeMeshContainer< Cell * > *cellsLvl, const int var, int phase) const override
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
const TypeM & getType () const
virtual int getLvlMax () 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 size_t getConnectivity (std::vector< double > &, std::vector< Cell * > *) const
 Store connectivities of mesh cells in a flat vector of double.
virtual void getOffsets (std::vector< double > &, std::vector< Cell * > *) const
 Store offsets in connectivity array of mesh cells.
virtual void getTypeCell (std::vector< double > &, std::vector< Cell * > *) const
virtual void getData (std::vector< Cell * > *, std::vector< double > &, const int, int) const
 Extracting data for printing results.
virtual void getData (std::vector< Cell * > *, std::vector< float > &, const int, int) const
virtual void setDataSet (std::vector< double > &, std::vector< Cell * > *, const int, int) const
 Extracting data for printing results.
virtual void refineCellAndCellInterfaces (Cell *, const std::vector< AddPhys * > &, int &)
virtual void extractAbsVelocityMRF (std::vector< Cell * > *, std::vector< double > &, Source *) const
 Extracting absolute velocity for specific Moving Reference Frame computations.
virtual void extractAbsVelocityMRF (std::vector< Cell * > *, std::vector< float > &, Source *) const
virtual void extractReferenceLength (std::vector< Cell * > *, std::vector< double > &) const
virtual void extractReferenceLength (std::vector< Cell * > *, std::vector< float > &) const
virtual void printDomainDecomposition (std::ofstream &)
virtual void readDomainDecomposition (std::ifstream &)
virtual void procedureRaffinementInitialization (std::vector< Cell * > *, TypeMeshContainer< Cell * > *, std::vector< CellInterface * > *, const std::vector< AddPhys * > &, int &nbCellsTotalAMR, std::vector< GeometricalDomain * > &, Eos **, const int &, SimulationOrder, std::vector< GeometricalDomain * > &)
virtual void procedureRaffinement (std::vector< Cell * > *, TypeMeshContainer< Cell * > *, std::vector< CellInterface * > *, const int &, const std::vector< AddPhys * > &, int &, Eos **)
virtual void initializePersistentCommunications (const TypeMeshContainer< Cell * > &cells, SimulationOrder schemeOrder)
virtual void finalizeParallele (const int &lvlMax)
virtual void parallelLoadBalancingAMR (std::vector< Cell * > *, TypeMeshContainer< Cell * > *, std::vector< CellInterface * > *, SimulationOrder, const std::vector< AddPhys * > &, Eos **, int &, std::vector< GeometricalDomain * > &, bool=false)
virtual std::string getMeshExtension () const
virtual void initCpuMeshSequential (TypeMeshContainer< Cell * > &, SimulationOrder &)
 Initialize mesh of a single partition for restart with mesh mapping option.
virtual void initCpuMeshParallel (TypeMeshContainer< Cell * > &, SimulationOrder &, int)
 Initialize mesh of a single partition of a partionned mesh for restart with mesh mapping option.

Protected Attributes

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< stretchZone > m_stretchX
std::vector< stretchZone > m_stretchY
std::vector< stretchZone > m_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
BoundCond * m_limXm
BoundCond * m_limXp
BoundCond * m_limYm
BoundCond * m_limYp
BoundCond * m_limZm
BoundCond * m_limZp
Protected Attributes inherited from Mesh
int m_numFile
int m_problemDimension
int m_numberElements
int m_numberFacesTotal
int m_numberCellsCalcul
int m_numberCellsTotal
TypeM m_type

Private Member Functions

template<typename T>
size_t getConnectivity_private (std::vector< T > &dataset) const
template<typename T>
void getOffsets_private (std::vector< T > &dataset) const
template<typename T>
void getData_private (TypeMeshContainer< Cell * > *cellsLvl, std::vector< T > &dataset, const int var, int phase) const

Static Private Member Functions

static void meshStretchingAlongAxis (int &numberCells, const double &l, std::vector< double > &dl, std::vector< double > &pos, std::vector< stretchZone > &stretch)

Additional Inherited Members

Protected Member Functions inherited from Mesh
template<typename T>
void getData_body (Cell *cell, std::vector< T > &dataset, const int var, const int phase, const bool isAMR) const
 Access data of cell cell and append the wanted variable cell in dataset vector.

Constructor & Destructor Documentation

◆ MeshCartesian()

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 )
Here is the caller graph for this function:

◆ ~MeshCartesian()

MeshCartesian::~MeshCartesian ( )
override
Here is the call graph for this function:

Member Function Documentation

◆ assignLimits()

void MeshCartesian::assignLimits ( std::vector< BoundCond * > & boundCond)
overridevirtual

Implements Mesh.

Here is the call graph for this function:

◆ construitIGlobal()

void MeshCartesian::construitIGlobal ( const int & i,
const int & j,
const int & k,
int & index ) const
Here is the caller graph for this function:

◆ getArrayGlobalExtent()

std::array< int, 6 > MeshCartesian::getArrayGlobalExtent ( ) const
overridevirtual

Return whole extent of global cartesian mesh under the form of an array.

Reimplemented from Mesh.

◆ getConnectivity() [1/2]

size_t MeshCartesian::getConnectivity ( std::vector< int32_t > & ,
std::vector< Cell * > *  ) const
overridevirtual

Store connectivities of mesh cells in a flat vector of 'ECOGEN_VTKHDF_intType' integers.

Returns
Cell count if success, 0 in case of overflow
Note
Check that the cell count doesn't overflow the maximal value representable by a 'size_t'. Don't check that the connectivity values fit the vector type.

Reimplemented from Mesh.

Reimplemented in MeshCartesianAMR.

Here is the call graph for this function:

◆ getConnectivity() [2/2]

size_t MeshCartesian::getConnectivity ( std::vector< int64_t > & ,
std::vector< Cell * > *  ) const
overridevirtual

Store connectivities of mesh cells in a flat vector of 'ECOGEN_VTKHDF_intType' integers.

Returns
Cell count if success, 0 in case of overflow
Note
Check that the cell count doesn't overflow the maximal value representable by a 'size_t'. Don't check that the connectivity values fit the vector type.

Reimplemented from Mesh.

Reimplemented in MeshCartesianAMR.

Here is the call graph for this function:

◆ getConnectivity_private()

template<typename T>
size_t MeshCartesian::getConnectivity_private ( std::vector< T > & dataset) const
private
Here is the caller graph for this function:

◆ getCoord()

void MeshCartesian::getCoord ( std::vector< double > & ,
Axis ,
bool global = false ) const
overridevirtual

For structured grid, get coordinates along a given axis.

Reimplemented from Mesh.

◆ getData() [1/2]

void MeshCartesian::getData ( TypeMeshContainer< Cell * > * cellsLvl,
std::vector< double > & dataset,
const int var,
int phase ) const
override
Here is the call graph for this function:

◆ getData() [2/2]

void MeshCartesian::getData ( TypeMeshContainer< Cell * > * cellsLvl,
std::vector< float > & dataset,
const int var,
int phase ) const
override
Here is the call graph for this function:

◆ getData_private()

template<typename T>
void MeshCartesian::getData_private ( TypeMeshContainer< Cell * > * cellsLvl,
std::vector< T > & dataset,
const int var,
int phase ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIJK()

void MeshCartesian::getIJK ( const int & index,
int & i,
int & j,
int & k ) const
Here is the caller graph for this function:

◆ getNodes()

size_t MeshCartesian::getNodes ( std::vector< double > & ,
std::vector< Cell * > *  ) const
overridevirtual

Store coordinates of mesh nodes in a flat vector.

Returns
Node count if success, 0 in case of overflow
Note
Check that the node count doesn't overflow the maximal value representable by a 'size_t'

Reimplemented from Mesh.

Reimplemented in MeshCartesianAMR.

Here is the call graph for this function:

◆ getNumberCellsX()

int MeshCartesian::getNumberCellsX ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ getNumberCellsXGlobal()

int MeshCartesian::getNumberCellsXGlobal ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ getNumberCellsY()

int MeshCartesian::getNumberCellsY ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ getNumberCellsYGlobal()

int MeshCartesian::getNumberCellsYGlobal ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ getNumberCellsZ()

int MeshCartesian::getNumberCellsZ ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ getNumberCellsZGlobal()

int MeshCartesian::getNumberCellsZGlobal ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ getNumberCpuX()

int MeshCartesian::getNumberCpuX ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ getNumberCpuY()

int MeshCartesian::getNumberCpuY ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ getNumberCpuZ()

int MeshCartesian::getNumberCpuZ ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ getOffsets() [1/2]

void MeshCartesian::getOffsets ( std::vector< int32_t > & ,
std::vector< Cell * > *  ) const
overridevirtual

Store offsets in connectivity array of mesh cells.

Note
Check that the max offset doesn't overflow the maximal value representable by a int32_t variable.

Reimplemented from Mesh.

Reimplemented in MeshCartesianAMR.

Here is the call graph for this function:

◆ getOffsets() [2/2]

void MeshCartesian::getOffsets ( std::vector< int64_t > & ,
std::vector< Cell * > *  ) const
overridevirtual

Store offsets in connectivity array of mesh cells.

Note
Check that the max offset doesn't overflow the maximal value representable by a int64_t variable.

Reimplemented from Mesh.

Reimplemented in MeshCartesianAMR.

Here is the call graph for this function:

◆ getOffsets_private()

template<typename T>
void MeshCartesian::getOffsets_private ( std::vector< T > & dataset) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOffsetX()

int MeshCartesian::getOffsetX ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ getOffsetY()

int MeshCartesian::getOffsetY ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ getOffsetZ()

int MeshCartesian::getOffsetZ ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ getStringExtent()

std::string MeshCartesian::getStringExtent ( bool global = false) const
overridevirtual

Reimplemented from Mesh.

◆ getTypeCell()

void MeshCartesian::getTypeCell ( std::vector< unsigned char > & dataset,
std::vector< Cell * > *  ) const
overridevirtual

Reimplemented from Mesh.

Reimplemented in MeshCartesianAMR.

◆ initializeGeometrie()

int MeshCartesian::initializeGeometrie ( TypeMeshContainer< Cell * > & cells,
TypeMeshContainer< Cell * > & cellsGhost,
TypeMeshContainer< CellInterface * > & cellInterfaces,
const int & resumeSimulation,
bool pretraitementParallele,
SimulationOrder schemeOrder )
overridevirtual

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

Implements Mesh.

Reimplemented in MeshCartesianAMR.

Here is the call graph for this function:

◆ initializeGeometrieMonoCpu()

void MeshCartesian::initializeGeometrieMonoCpu ( TypeMeshContainer< Cell * > & cells,
TypeMeshContainer< CellInterface * > & cellInterfaces,
SimulationOrder schemeOrder )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initializeGeometrieParallele()

void MeshCartesian::initializeGeometrieParallele ( TypeMeshContainer< Cell * > & cells,
TypeMeshContainer< Cell * > & cellsGhost,
TypeMeshContainer< CellInterface * > & cellInterfaces,
SimulationOrder schemeOrder )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ meshStretching()

void MeshCartesian::meshStretching ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ meshStretchingAlongAxis()

void MeshCartesian::meshStretchingAlongAxis ( int & numberCells,
const double & l,
std::vector< double > & dl,
std::vector< double > & pos,
std::vector< stretchZone > & stretch )
staticprivate
Here is the caller graph for this function:

◆ parallelePartitioning()

void MeshCartesian::parallelePartitioning ( SimulationOrder schemeOrder,
TypeMeshContainer< Cell * > & cells )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDataSet()

void MeshCartesian::setDataSet ( std::vector< double > & dataset,
TypeMeshContainer< Cell * > * cellsLvl,
const int var,
int phase ) const
override
Here is the call graph for this function:

◆ setImmersedBoundaries()

void MeshCartesian::setImmersedBoundaries ( TypeMeshContainer< CellInterface * > * cellInterfacesLvl,
SimulationOrder schemeOrder ) const
overridevirtual

Reimplemented from Mesh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ whoAmI()

std::string MeshCartesian::whoAmI ( ) const
overridevirtual

Reimplemented from Mesh.

Reimplemented in MeshCartesianAMR.

Here is the caller graph for this function:

Member Data Documentation

◆ m_CpuCoordX

int MeshCartesian::m_CpuCoordX
protected

X-coordinate of the current CPU

◆ m_CpuCoordY

int MeshCartesian::m_CpuCoordY
protected

Y-coordinate of the current CPU

◆ m_CpuCoordZ

int MeshCartesian::m_CpuCoordZ
protected

Z-coordinate of the current CPU

◆ m_dXi

std::vector<double> MeshCartesian::m_dXi
protected

Array of the lengths of the cells in the x-direction

◆ m_dYj

std::vector<double> MeshCartesian::m_dYj
protected

Array of the lengths of the cells in the y-direction

◆ m_dZk

std::vector<double> MeshCartesian::m_dZk
protected

Array of the lengths of the cells in the z-direction

◆ m_elements

TypeMeshContainer<Element*> MeshCartesian::m_elements
protected

Vector of element objects: Contains geometrical attributes.

◆ m_faces

TypeMeshContainer<Face*> MeshCartesian::m_faces
protected

Vector of face objects (between two elements or at boundaries): Contains geometrical attributes.

◆ m_limXm

BoundCond* MeshCartesian::m_limXm
protected

◆ m_limXp

BoundCond* MeshCartesian::m_limXp
protected

◆ m_limYm

BoundCond* MeshCartesian::m_limYm
protected

◆ m_limYp

BoundCond* MeshCartesian::m_limYp
protected

◆ m_limZm

BoundCond* MeshCartesian::m_limZm
protected

◆ m_limZp

BoundCond* MeshCartesian::m_limZp
protected

◆ m_lX

double MeshCartesian::m_lX
protected

◆ m_lY

double MeshCartesian::m_lY
protected

◆ m_lZ

double MeshCartesian::m_lZ
protected

◆ m_numberBoundCondInit

int MeshCartesian::m_numberBoundCondInit
protected

◆ m_numberCellsX

int MeshCartesian::m_numberCellsX
protected

◆ m_numberCellsXGlobal

int MeshCartesian::m_numberCellsXGlobal
protected

◆ m_numberCellsY

int MeshCartesian::m_numberCellsY
protected

◆ m_numberCellsYGlobal

int MeshCartesian::m_numberCellsYGlobal
protected

◆ m_numberCellsZ

int MeshCartesian::m_numberCellsZ
protected

◆ m_numberCellsZGlobal

int MeshCartesian::m_numberCellsZGlobal
protected

◆ m_numberCpuX

int MeshCartesian::m_numberCpuX
protected

Optimal number of processors in the x-direction

◆ m_numberCpuY

int MeshCartesian::m_numberCpuY
protected

Optimal number of processors in the y-direction

◆ m_numberCpuZ

int MeshCartesian::m_numberCpuZ
protected

Optimal number of processors in the z-direction

◆ m_offsetX

int MeshCartesian::m_offsetX
protected

Offset in the x-direction of the current CPU for the array of cell lenghts and cell positions

◆ m_offsetY

int MeshCartesian::m_offsetY
protected

Offset in the y-direction of the current CPU for the array of cell lenghts and cell positions

◆ m_offsetZ

int MeshCartesian::m_offsetZ
protected

Offset in the z-direction of the current CPU for the array of cell lenghts and cell positions

◆ m_posXi

std::vector<double> MeshCartesian::m_posXi
protected

Array of the positions of the cells in the x-direction

◆ m_posYj

std::vector<double> MeshCartesian::m_posYj
protected

Array of the positions of the cells in the y-direction

◆ m_posZk

std::vector<double> MeshCartesian::m_posZk
protected

Array of the positions of the cells in the z-direction

◆ m_stretchX

std::vector<stretchZone> MeshCartesian::m_stretchX
protected

Array of stretch zones in the x-direction

◆ m_stretchY

std::vector<stretchZone> MeshCartesian::m_stretchY
protected

Array of stretch zones in the y-direction

◆ m_stretchZ

std::vector<stretchZone> MeshCartesian::m_stretchZ
protected

Array of stretch zones in the z-direction


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