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

Abstract class for a mesh. More...

#include <Mesh.h>

Inherited by MeshCartesian, and MeshUnStruct.

Public Member Functions

 Mesh ()
virtual ~Mesh ()
virtual void assignLimits (std::vector< BoundCond * > &boundCond)=0
virtual int initializeGeometrie (TypeMeshContainer< Cell * > &cells, TypeMeshContainer< Cell * > &cellsGhost, TypeMeshContainer< CellInterface * > &cellInterfaces, const int &resumeSimulation, bool pretraitementParallele=true, SimulationOrder schemeOrder=SimulationOrder::first)=0
 renvoi le number de dimensions (1,2 ou 3)
virtual std::string whoAmI () const
virtual void setImmersedBoundaries (TypeMeshContainer< CellInterface * > *, SimulationOrder) const
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 getNumberCellsX () const
virtual int getNumberCellsY () const
virtual int getNumberCellsZ () const
virtual int getNumberCellsXGlobal () const
virtual int getNumberCellsYGlobal () const
virtual int getNumberCellsZGlobal () const
virtual int getOffsetX () const
virtual int getOffsetY () const
virtual int getOffsetZ () const
virtual int getNumberCpuX () const
virtual int getNumberCpuY () const
virtual int getNumberCpuZ () 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 std::string getStringExtent (bool=false) const
virtual std::array< int, 6 > getArrayGlobalExtent () const
 For structured grid, get global grid extent under the form of an array.
virtual void getCoord (std::vector< double > &, Axis, bool global=false) const
 For structured grid, get coordinates along a given axis.
virtual size_t getNodes (std::vector< double > &, std::vector< Cell * > *) const
 Store coordinates of mesh nodes in a flat vector.
virtual size_t getConnectivity (std::vector< double > &, std::vector< Cell * > *) const
 Store connectivities of mesh cells in a flat vector of double.
virtual size_t getConnectivity (std::vector< int64_t > &, std::vector< Cell * > *) const
 Store connectivities of mesh cells in a flat vector of 'ECOGEN_VTKHDF_intType' integers.
virtual size_t getConnectivity (std::vector< int32_t > &, std::vector< Cell * > *) const
 Store connectivities of mesh cells in a flat vector of 'ECOGEN_VTKHDF_intType' integers.
virtual void getOffsets (std::vector< double > &, std::vector< Cell * > *) const
 Store offsets in connectivity array of mesh cells.
virtual void getOffsets (std::vector< int64_t > &, std::vector< Cell * > *) const
 Store offsets in connectivity array of mesh cells.
virtual void getOffsets (std::vector< int32_t > &, std::vector< Cell * > *) const
 Store offsets in connectivity array of mesh cells.
virtual void getTypeCell (std::vector< double > &, std::vector< Cell * > *) const
virtual void getTypeCell (std::vector< unsigned char > &, 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 Member Functions

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.

Protected Attributes

int m_numFile
int m_problemDimension
int m_numberElements
int m_numberFacesTotal
int m_numberCellsCalcul
int m_numberCellsTotal
TypeM m_type

Detailed Description

Abstract class for a mesh.

Can not be instanciated, depend on the mesh properties

Constructor & Destructor Documentation

◆ Mesh()

Mesh::Mesh ( )
Here is the caller graph for this function:

◆ ~Mesh()

Mesh::~Mesh ( )
virtual

Member Function Documentation

◆ assignLimits()

virtual void Mesh::assignLimits ( std::vector< BoundCond * > & boundCond)
pure virtual

Implemented in MeshCartesian, and MeshUnStruct.

◆ extractAbsVelocityMRF() [1/2]

virtual void Mesh::extractAbsVelocityMRF ( std::vector< Cell * > * ,
std::vector< double > & ,
Source *  ) const
inlinevirtual

Extracting absolute velocity for specific Moving Reference Frame computations.

Parameters
cellsLvldata structure containing pointer to cells
sourceMRFpointer to the corresponding MRF source
datasetdouble vector containing the extracted data
Here is the call graph for this function:
Here is the caller graph for this function:

◆ extractAbsVelocityMRF() [2/2]

virtual void Mesh::extractAbsVelocityMRF ( std::vector< Cell * > * ,
std::vector< float > & ,
Source *  ) const
inlinevirtual
Here is the call graph for this function:

◆ extractReferenceLength() [1/2]

virtual void Mesh::extractReferenceLength ( std::vector< Cell * > * ,
std::vector< double > &  ) const
inlinevirtual

Reimplemented in MeshUnStruct.

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

◆ extractReferenceLength() [2/2]

virtual void Mesh::extractReferenceLength ( std::vector< Cell * > * ,
std::vector< float > &  ) const
inlinevirtual

Reimplemented in MeshUnStruct.

Here is the call graph for this function:

◆ finalizeParallele()

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

Reimplemented in MeshCartesianAMR.

◆ getArrayGlobalExtent()

virtual std::array< int, 6 > Mesh::getArrayGlobalExtent ( ) const
inlinevirtual

For structured grid, get global grid extent under the form of an array.

Reimplemented in MeshCartesian.

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

◆ getConnectivity() [1/3]

virtual size_t Mesh::getConnectivity ( std::vector< double > & ,
std::vector< Cell * > *  ) const
inlinevirtual

Store connectivities of mesh cells in a flat vector of double.

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 in 'double' variables.
Remarks
Method has been kept to not break legacy I/Os but avoiding casts is probably better

Reimplemented in MeshCartesianAMR, and MeshUnStruct.

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

◆ getConnectivity() [2/3]

virtual size_t Mesh::getConnectivity ( std::vector< int32_t > & ,
std::vector< Cell * > *  ) const
inlinevirtual

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 in MeshCartesian, MeshCartesianAMR, and MeshUnStruct.

Here is the call graph for this function:

◆ getConnectivity() [3/3]

virtual size_t Mesh::getConnectivity ( std::vector< int64_t > & ,
std::vector< Cell * > *  ) const
inlinevirtual

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 in MeshCartesian, MeshCartesianAMR, and MeshUnStruct.

Here is the call graph for this function:

◆ getCoord()

virtual void Mesh::getCoord ( std::vector< double > & ,
Axis ,
bool global = false ) const
inlinevirtual

For structured grid, get coordinates along a given axis.

Reimplemented in MeshCartesian.

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

◆ getData() [1/2]

virtual void Mesh::getData ( std::vector< Cell * > * ,
std::vector< double > & ,
const int ,
int  ) const
inlinevirtual

Extracting data for printing results.

This method enable to extract a set of data for mixture or phase, scalar or vetor

Parameters
cellsLvldata structure containing pointer to cells
datasetdouble vector containing the extracted data
varnumber of requested varaible to extract (>0 for scalar, <0 for vector)
phasenumber of requested phase (-1 for mixture, -2 for transport, -3 for xi, -4 for gradient density mixture)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getData() [2/2]

virtual void Mesh::getData ( std::vector< Cell * > * ,
std::vector< float > & ,
const int ,
int  ) const
inlinevirtual
Here is the call graph for this function:

◆ getData_body()

template<typename T>
template void Mesh::getData_body< float > ( Cell * cell,
std::vector< T > & dataset,
const int var,
const int phase,
const bool isAMR ) const
protected

Access data of cell cell and append the wanted variable cell in dataset vector.

Instanciation of previous function with float type to force compilation of the function body and avoid link error.

Instanciation of previous function with double type to force compilation of the function body and avoid link error.

Template Parameters
TType of dataset vector.
Parameters
cellsLvlCell array.
datasetVector to fill with cell array variable.
varparameter to choose to get scalar (if strictly positive) or vector (in lower or ewal to 0) variable.
phaseidentifier of variable to store.
isAMRtrue if called from AMR.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLvlMax()

virtual int Mesh::getLvlMax ( ) const
inlinevirtual

Reimplemented in MeshCartesianAMR.

Here is the caller graph for this function:

◆ getMeshExtension()

virtual std::string Mesh::getMeshExtension ( ) const
inlinevirtual

Reimplemented in MUSGmsh.

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

◆ getNodes()

virtual size_t Mesh::getNodes ( std::vector< double > & ,
std::vector< Cell * > *  ) const
inlinevirtual

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 in MeshCartesian, MeshCartesianAMR, and MeshUnStruct.

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

◆ getNumberCells()

const int & Mesh::getNumberCells ( ) const
inline
Here is the caller graph for this function:

◆ getNumberCellsTotal()

const int & Mesh::getNumberCellsTotal ( ) const
inline

◆ getNumberCellsX()

virtual int Mesh::getNumberCellsX ( ) const
inlinevirtual

Reimplemented in MeshCartesian.

Here is the caller graph for this function:

◆ getNumberCellsXGlobal()

virtual int Mesh::getNumberCellsXGlobal ( ) const
inlinevirtual

Reimplemented in MeshCartesian.

Here is the caller graph for this function:

◆ getNumberCellsY()

virtual int Mesh::getNumberCellsY ( ) const
inlinevirtual

Reimplemented in MeshCartesian.

Here is the caller graph for this function:

◆ getNumberCellsYGlobal()

virtual int Mesh::getNumberCellsYGlobal ( ) const
inlinevirtual

Reimplemented in MeshCartesian.

Here is the caller graph for this function:

◆ getNumberCellsZ()

virtual int Mesh::getNumberCellsZ ( ) const
inlinevirtual

Reimplemented in MeshCartesian.

Here is the caller graph for this function:

◆ getNumberCellsZGlobal()

virtual int Mesh::getNumberCellsZGlobal ( ) const
inlinevirtual

Reimplemented in MeshCartesian.

Here is the caller graph for this function:

◆ getNumberCpuX()

virtual int Mesh::getNumberCpuX ( ) const
inlinevirtual

Reimplemented in MeshCartesian.

◆ getNumberCpuY()

virtual int Mesh::getNumberCpuY ( ) const
inlinevirtual

Reimplemented in MeshCartesian.

◆ getNumberCpuZ()

virtual int Mesh::getNumberCpuZ ( ) const
inlinevirtual

Reimplemented in MeshCartesian.

◆ getNumberFaces()

const int & Mesh::getNumberFaces ( ) const
inline

◆ getNumFichier()

const int & Mesh::getNumFichier ( ) const
inline

◆ getOffsets() [1/3]

virtual void Mesh::getOffsets ( std::vector< double > & ,
std::vector< Cell * > *  ) const
inlinevirtual

Store offsets in connectivity array of mesh cells.

Note
Check that the max offset doesn't overflow the maximal integer exactly representable by a 'double'.
Remarks
Method has been kept to not break legacy I/Os but avoiding casts is probably better

Reimplemented in MeshCartesianAMR, and MeshUnStruct.

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

◆ getOffsets() [2/3]

virtual void Mesh::getOffsets ( std::vector< int32_t > & ,
std::vector< Cell * > *  ) const
inlinevirtual

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 in MeshCartesian, MeshCartesianAMR, and MeshUnStruct.

Here is the call graph for this function:

◆ getOffsets() [3/3]

virtual void Mesh::getOffsets ( std::vector< int64_t > & ,
std::vector< Cell * > *  ) const
inlinevirtual

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 in MeshCartesian, MeshCartesianAMR, and MeshUnStruct.

Here is the call graph for this function:

◆ getOffsetX()

virtual int Mesh::getOffsetX ( ) const
inlinevirtual

Reimplemented in MeshCartesian.

Here is the caller graph for this function:

◆ getOffsetY()

virtual int Mesh::getOffsetY ( ) const
inlinevirtual

Reimplemented in MeshCartesian.

Here is the caller graph for this function:

◆ getOffsetZ()

virtual int Mesh::getOffsetZ ( ) const
inlinevirtual

Reimplemented in MeshCartesian.

Here is the caller graph for this function:

◆ getProblemDimension()

const int & Mesh::getProblemDimension ( ) const
inline
Here is the caller graph for this function:

◆ getStringExtent()

virtual std::string Mesh::getStringExtent ( bool = false) const
inlinevirtual

Reimplemented in MeshCartesian.

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

◆ getType()

const TypeM & Mesh::getType ( ) const
inline
Here is the caller graph for this function:

◆ getTypeCell() [1/2]

virtual void Mesh::getTypeCell ( std::vector< double > & ,
std::vector< Cell * > *  ) const
inlinevirtual

Reimplemented in MeshCartesianAMR, and MeshUnStruct.

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

◆ getTypeCell() [2/2]

virtual void Mesh::getTypeCell ( std::vector< unsigned char > & ,
std::vector< Cell * > *  ) const
inlinevirtual

Reimplemented in MeshCartesian, MeshCartesianAMR, and MeshUnStruct.

Here is the call graph for this function:

◆ initCpuMeshParallel()

virtual void Mesh::initCpuMeshParallel ( TypeMeshContainer< Cell * > & ,
SimulationOrder & ,
int  )
inlinevirtual

Initialize mesh of a single partition of a partionned mesh for restart with mesh mapping option.

This mesh object has only the elements and nodes filled

Reimplemented in MeshUnStruct, MUSGmsh, MUSGmshV2, and MUSGmshV4.

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

◆ initCpuMeshSequential()

virtual void Mesh::initCpuMeshSequential ( TypeMeshContainer< Cell * > & ,
SimulationOrder &  )
inlinevirtual

Initialize mesh of a single partition for restart with mesh mapping option.

This mesh object has only the elements and nodes filled

Reimplemented in MeshUnStruct, MUSGmsh, MUSGmshV2, and MUSGmshV4.

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

◆ initializeGeometrie()

virtual int Mesh::initializeGeometrie ( TypeMeshContainer< Cell * > & cells,
TypeMeshContainer< Cell * > & cellsGhost,
TypeMeshContainer< CellInterface * > & cellInterfaces,
const int & resumeSimulation,
bool pretraitementParallele = true,
SimulationOrder schemeOrder = SimulationOrder::first )
pure virtual

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

Implemented in MeshCartesian, MeshCartesianAMR, and MeshUnStruct.

◆ initializePersistentCommunications()

void Mesh::initializePersistentCommunications ( const TypeMeshContainer< Cell * > & cells,
SimulationOrder schemeOrder )
virtual

Reimplemented in MeshCartesianAMR.

Here is the call graph for this function:

◆ parallelLoadBalancingAMR()

virtual void Mesh::parallelLoadBalancingAMR ( std::vector< Cell * > * ,
TypeMeshContainer< Cell * > * ,
std::vector< CellInterface * > * ,
SimulationOrder ,
const std::vector< AddPhys * > & ,
Eos ** ,
int & ,
std::vector< GeometricalDomain * > & ,
bool = false )
inlinevirtual

◆ printDomainDecomposition()

virtual void Mesh::printDomainDecomposition ( std::ofstream & )
inlinevirtual

Reimplemented in MeshCartesianAMR.

Here is the caller graph for this function:

◆ procedureRaffinement()

virtual void Mesh::procedureRaffinement ( std::vector< Cell * > * ,
TypeMeshContainer< Cell * > * ,
std::vector< CellInterface * > * ,
const int & ,
const std::vector< AddPhys * > & ,
int & ,
Eos **  )
inlinevirtual

◆ procedureRaffinementInitialization()

virtual void Mesh::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 * > &  )
inlinevirtual

◆ readDomainDecomposition()

virtual void Mesh::readDomainDecomposition ( std::ifstream & )
inlinevirtual

Reimplemented in MeshCartesianAMR.

Here is the caller graph for this function:

◆ refineCellAndCellInterfaces()

virtual void Mesh::refineCellAndCellInterfaces ( Cell * ,
const std::vector< AddPhys * > & ,
int &  )
inlinevirtual

Reimplemented in MeshCartesianAMR.

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

◆ setDataSet()

virtual void Mesh::setDataSet ( std::vector< double > & ,
std::vector< Cell * > * ,
const int ,
int  ) const
inlinevirtual

Extracting data for printing results.

This method enable to extract a set of data for mixture or phase, scalar or vetor

Parameters
cellsLvldata structure containing pointer to cells
datasetdouble vector containing the extracted data
varnumber of requested varaible to extract (>0 for scalar, <0 for vector)
phasenumber of requested phase (-1 for mixture, -2 for transport, -3 for xi, -4 for gradient density mixture)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setImmersedBoundaries()

virtual void Mesh::setImmersedBoundaries ( TypeMeshContainer< CellInterface * > * ,
SimulationOrder  ) const
inlinevirtual

Reimplemented in MeshCartesian.

◆ whoAmI()

virtual std::string Mesh::whoAmI ( ) const
inlinevirtual

Reimplemented in MeshCartesian, MeshCartesianAMR, and MeshUnStruct.

Here is the call graph for this function:

◆ writeHeaderPiece()

virtual void Mesh::writeHeaderPiece ( std::ofstream & ,
std::vector< Cell * > *  ) const
inlinevirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeResultsGnuplot()

void Mesh::writeResultsGnuplot ( std::vector< Cell * > * cellsLvl,
std::ofstream & fileStream,
GeometricObject * objet = 0,
bool recordPsat = false ) const
Here is the caller graph for this function:

Member Data Documentation

◆ m_numberCellsCalcul

int Mesh::m_numberCellsCalcul
protected

◆ m_numberCellsTotal

int Mesh::m_numberCellsTotal
protected

◆ m_numberElements

int Mesh::m_numberElements
protected

◆ m_numberFacesTotal

int Mesh::m_numberFacesTotal
protected

◆ m_numFile

int Mesh::m_numFile
mutableprotected

◆ m_problemDimension

int Mesh::m_problemDimension
protected

◆ m_type

TypeM Mesh::m_type
protected

The documentation for this class was generated from the following files:
  • /home/runner/work/ECOGEN/ECOGEN/doc_sources/src/Meshes/Mesh.h
  • /home/runner/work/ECOGEN/ECOGEN/doc_sources/src/Meshes/Mesh.cpp