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

#include <MeshUnStruct.h>

Inherits Mesh.

Inherited by MUSGmsh.

Collaboration diagram for MeshUnStruct:
[legend]

Public Member Functions

 MeshUnStruct (const std::string &meshFile, const std::string &meshExtension)
 ~MeshUnStruct () override
void assignLimits (std::vector< BoundCond * > &boundCond) override
int initializeGeometrie (TypeMeshContainer< Cell * > &cells, TypeMeshContainer< Cell * > &cellsGhost, TypeMeshContainer< CellInterface * > &cellInterfaces, const int &, bool pretraitementParallele=true, SimulationOrder schemeOrder=SimulationOrder::first) override
 renvoi le number de dimensions (1,2 ou 3)
std::string whoAmI () const override
virtual void initGeometryMonoCPU (TypeMeshContainer< Cell * > &cells, TypeMeshContainer< CellInterface * > &cellInterfaces, SimulationOrder schemeOrder=SimulationOrder::first)=0
 initialize the geometry for single CPU computation
virtual void initGeometryParallel (TypeMeshContainer< Cell * > &cells, TypeMeshContainer< Cell * > &cellsGhost, TypeMeshContainer< CellInterface * > &cellInterfaces, SimulationOrder schemeOrder=SimulationOrder::first)=0
 initialize the geometry for multi CPUs computation
virtual void preProcessMeshFileForParallel ()=0
 split original mesh file for computation on several CPUs
void initCpuMeshSequential (TypeMeshContainer< Cell * > &cells, SimulationOrder &schemeOrder) override=0
 Initialize mesh of a single partition for restart with mesh mapping option.
void initCpuMeshParallel (TypeMeshContainer< Cell * > &cells, SimulationOrder &schemeOrder, int cpu) override=0
 Initialize mesh of a single partition of a partionned mesh for restart with mesh mapping option.
void writeMeshInfoData () const
 write monocpu mesh information
void writeHeaderPiece (std::ofstream &fileStream, TypeMeshContainer< Cell * > *) const override
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< double > &dataset, std::vector< Cell * > *) const override
 Store connectivities of mesh cells in a flat vector of double.
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< double > &dataset, std::vector< Cell * > *) const override
 Store offsets in connectivity array of mesh cells.
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< double > &dataset, std::vector< Cell * > *) const override
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
void extractAbsVelocityMRF (TypeMeshContainer< Cell * > *cellsLvl, std::vector< double > &dataset, Source *sourceMRF) const override
void extractAbsVelocityMRF (TypeMeshContainer< Cell * > *cellsLvl, std::vector< float > &dataset, Source *sourceMRF) const override
void extractReferenceLength (std::vector< Cell * > *cellsLvl, std::vector< double > &dataset) const override
void extractReferenceLength (std::vector< Cell * > *cellsLvl, std::vector< float > &dataset) const override
Public Member Functions inherited from Mesh
 Mesh ()
virtual ~Mesh ()
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 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 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

Static Public Member Functions

static std::string readMeshFileExtension (const std::string &meshFile)

Protected Attributes

std::string m_meshFile
 Name of the mesh file read.
std::string m_nameMesh
 Name of the mesh file without extension.
int m_numberNodes
 Number of nodes of the geometric domain.
int m_numberInnerNodes
 Number of inner nodes (except from ghosts).
Coord * m_nodes
 Array of node coordinates in the geometric domain.
int m_numberInnerElements
 Number of elements of n dimension of internal compute.
int m_numberGhostElements
 Number of ghost elements of dimension n for parallel computation.
int m_numberCommunicatingElements
 Real number of communicating elements.
ElementNS ** m_elements
 Array of internal geometric elements.
FaceNS ** m_faces
 Array of geometrical faces.
std::vector< BoundCond * > m_bound
 Array of boundary conditions.
int m_numberInnerFaces
 Number of faces between two cells of compute.
int m_numberBoundFaces
 Number of faces between a compute cell and a boundary.
int m_numberFacesParallel
 Number of faces between a compute cell and a ghost cell.
int m_numberGhostCells
 Number of ghost cells.
int m_numberElements0D
int m_numberElements1D
int m_numberElements2D
int m_numberElements3D
int m_numberSegments
int m_numberTriangles
int m_numberQuadrangles
int m_numberTetrahedrons
int m_numberPyramids
int m_numberPoints
int m_numberHexahedrons
double m_totalSurface
 Sum of 2D element surfaces.
double m_totalVolume
 Sum of 3D element volumes.
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 getTypeCell_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
template<typename T>
void extractAbsVelocityMRF_private (TypeMeshContainer< Cell * > *cellsLvl, std::vector< T > &dataset, Source *sourceMRF) const
template<typename T>
void extractReferenceLength_private (std::vector< Cell * > *cellsLvl, std::vector< T > &dataset) const

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

◆ MeshUnStruct()

MeshUnStruct::MeshUnStruct ( const std::string & meshFile,
const std::string & meshExtension )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~MeshUnStruct()

MeshUnStruct::~MeshUnStruct ( )
override

Member Function Documentation

◆ assignLimits()

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

Implements Mesh.

◆ extractAbsVelocityMRF() [1/2]

void MeshUnStruct::extractAbsVelocityMRF ( TypeMeshContainer< Cell * > * cellsLvl,
std::vector< double > & dataset,
Source * sourceMRF ) const
override
Here is the call graph for this function:

◆ extractAbsVelocityMRF() [2/2]

void MeshUnStruct::extractAbsVelocityMRF ( TypeMeshContainer< Cell * > * cellsLvl,
std::vector< float > & dataset,
Source * sourceMRF ) const
override
Here is the call graph for this function:

◆ extractAbsVelocityMRF_private()

template<typename T>
void MeshUnStruct::extractAbsVelocityMRF_private ( TypeMeshContainer< Cell * > * cellsLvl,
std::vector< T > & dataset,
Source * sourceMRF ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ extractReferenceLength() [1/2]

void MeshUnStruct::extractReferenceLength ( std::vector< Cell * > * cellsLvl,
std::vector< double > & dataset ) const
overridevirtual

Reimplemented from Mesh.

Here is the call graph for this function:

◆ extractReferenceLength() [2/2]

void MeshUnStruct::extractReferenceLength ( std::vector< Cell * > * cellsLvl,
std::vector< float > & dataset ) const
overridevirtual

Reimplemented from Mesh.

Here is the call graph for this function:

◆ extractReferenceLength_private()

template<typename T>
void MeshUnStruct::extractReferenceLength_private ( std::vector< Cell * > * cellsLvl,
std::vector< T > & dataset ) const
private
Here is the caller graph for this function:

◆ getConnectivity() [1/3]

size_t MeshUnStruct::getConnectivity ( std::vector< double > & ,
std::vector< Cell * > *  ) const
overridevirtual

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 from Mesh.

Here is the call graph for this function:

◆ getConnectivity() [2/3]

size_t MeshUnStruct::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.

Here is the call graph for this function:

◆ getConnectivity() [3/3]

size_t MeshUnStruct::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.

Here is the call graph for this function:

◆ getConnectivity_private()

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

◆ getData() [1/2]

void MeshUnStruct::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 MeshUnStruct::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 MeshUnStruct::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:

◆ getNodes()

size_t MeshUnStruct::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.

◆ getOffsets() [1/3]

void MeshUnStruct::getOffsets ( std::vector< double > & ,
std::vector< Cell * > *  ) const
overridevirtual

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 from Mesh.

◆ getOffsets() [2/3]

void MeshUnStruct::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.

Here is the call graph for this function:

◆ getOffsets() [3/3]

void MeshUnStruct::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.

Here is the call graph for this function:

◆ getOffsets_private()

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

◆ getTypeCell() [1/2]

void MeshUnStruct::getTypeCell ( std::vector< double > & dataset,
std::vector< Cell * > *  ) const
overridevirtual

Reimplemented from Mesh.

Here is the call graph for this function:

◆ getTypeCell() [2/2]

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

Reimplemented from Mesh.

Here is the call graph for this function:

◆ getTypeCell_private()

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

◆ initCpuMeshParallel()

void MeshUnStruct::initCpuMeshParallel ( TypeMeshContainer< Cell * > & ,
SimulationOrder & ,
int  )
overridepure virtual

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 from Mesh.

Implemented in MUSGmsh, MUSGmshV2, and MUSGmshV4.

◆ initCpuMeshSequential()

void MeshUnStruct::initCpuMeshSequential ( TypeMeshContainer< Cell * > & ,
SimulationOrder &  )
overridepure virtual

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

This mesh object has only the elements and nodes filled

Reimplemented from Mesh.

Implemented in MUSGmsh, MUSGmshV2, and MUSGmshV4.

◆ initGeometryMonoCPU()

virtual void MeshUnStruct::initGeometryMonoCPU ( TypeMeshContainer< Cell * > & cells,
TypeMeshContainer< CellInterface * > & cellInterfaces,
SimulationOrder schemeOrder = SimulationOrder::first )
pure virtual

initialize the geometry for single CPU computation

Parameters
cells
cellInterfaces
schemeOrderscheme order (currently only first order working)

Implemented in MUSGmsh, MUSGmshV2, and MUSGmshV4.

Here is the caller graph for this function:

◆ initGeometryParallel()

virtual void MeshUnStruct::initGeometryParallel ( TypeMeshContainer< Cell * > & cells,
TypeMeshContainer< Cell * > & cellsGhost,
TypeMeshContainer< CellInterface * > & cellInterfaces,
SimulationOrder schemeOrder = SimulationOrder::first )
pure virtual

initialize the geometry for multi CPUs computation

Parameters
cells
cellInterfaces
schemeOrderscheme order (currently only first order working)

Implemented in MUSGmsh, MUSGmshV2, and MUSGmshV4.

Here is the caller graph for this function:

◆ initializeGeometrie()

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

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

Implements Mesh.

Here is the call graph for this function:

◆ preProcessMeshFileForParallel()

virtual void MeshUnStruct::preProcessMeshFileForParallel ( )
pure virtual

split original mesh file for computation on several CPUs

Implemented in MUSGmsh, MUSGmshV2, and MUSGmshV4.

Here is the caller graph for this function:

◆ readMeshFileExtension()

std::string MeshUnStruct::readMeshFileExtension ( const std::string & meshFile)
static
Here is the caller graph for this function:

◆ setDataSet()

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

◆ whoAmI()

std::string MeshUnStruct::whoAmI ( ) const
inlineoverridevirtual

Reimplemented from Mesh.

◆ writeHeaderPiece()

void MeshUnStruct::writeHeaderPiece ( std::ofstream & fileStream,
TypeMeshContainer< Cell * > *  ) const
override

◆ writeMeshInfoData()

void MeshUnStruct::writeMeshInfoData ( ) const

write monocpu mesh information

Here is the caller graph for this function:

Member Data Documentation

◆ m_bound

std::vector<BoundCond*> MeshUnStruct::m_bound
protected

Array of boundary conditions.

◆ m_elements

ElementNS** MeshUnStruct::m_elements
protected

Array of internal geometric elements.

◆ m_faces

FaceNS** MeshUnStruct::m_faces
protected

Array of geometrical faces.

◆ m_meshFile

std::string MeshUnStruct::m_meshFile
protected

Name of the mesh file read.

◆ m_nameMesh

std::string MeshUnStruct::m_nameMesh
protected

Name of the mesh file without extension.

◆ m_nodes

Coord* MeshUnStruct::m_nodes
protected

Array of node coordinates in the geometric domain.

◆ m_numberBoundFaces

int MeshUnStruct::m_numberBoundFaces
protected

Number of faces between a compute cell and a boundary.

◆ m_numberCommunicatingElements

int MeshUnStruct::m_numberCommunicatingElements
protected

Real number of communicating elements.

◆ m_numberElements0D

int MeshUnStruct::m_numberElements0D
protected

◆ m_numberElements1D

int MeshUnStruct::m_numberElements1D
protected

◆ m_numberElements2D

int MeshUnStruct::m_numberElements2D
protected

◆ m_numberElements3D

int MeshUnStruct::m_numberElements3D
protected

◆ m_numberFacesParallel

int MeshUnStruct::m_numberFacesParallel
protected

Number of faces between a compute cell and a ghost cell.

◆ m_numberGhostCells

int MeshUnStruct::m_numberGhostCells
protected

Number of ghost cells.

◆ m_numberGhostElements

int MeshUnStruct::m_numberGhostElements
protected

Number of ghost elements of dimension n for parallel computation.

◆ m_numberHexahedrons

int MeshUnStruct::m_numberHexahedrons
protected

◆ m_numberInnerElements

int MeshUnStruct::m_numberInnerElements
protected

Number of elements of n dimension of internal compute.

◆ m_numberInnerFaces

int MeshUnStruct::m_numberInnerFaces
protected

Number of faces between two cells of compute.

◆ m_numberInnerNodes

int MeshUnStruct::m_numberInnerNodes
protected

Number of inner nodes (except from ghosts).

◆ m_numberNodes

int MeshUnStruct::m_numberNodes
protected

Number of nodes of the geometric domain.

◆ m_numberPoints

int MeshUnStruct::m_numberPoints
protected

◆ m_numberPyramids

int MeshUnStruct::m_numberPyramids
protected

◆ m_numberQuadrangles

int MeshUnStruct::m_numberQuadrangles
protected

◆ m_numberSegments

int MeshUnStruct::m_numberSegments
protected

◆ m_numberTetrahedrons

int MeshUnStruct::m_numberTetrahedrons
protected

◆ m_numberTriangles

int MeshUnStruct::m_numberTriangles
protected

◆ m_totalSurface

double MeshUnStruct::m_totalSurface
protected

Sum of 2D element surfaces.

◆ m_totalVolume

double MeshUnStruct::m_totalVolume
protected

Sum of 3D element volumes.


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