CepsGlobalIndex CepsCellGlobalIndex
Indices of cells.
CepsSize CepsHash
Hashes for distributed data.
std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
CepsGlobalIndex CepsNodeGlobalIndex
Indices of nodes.
int32_t CepsInt
Need 32 bit integer.
std::ostream & operator<<(std::ostream &os, const Mesh &m)
Displays some info on the mesh.
Abstract class for geometrical cell. On top of index and attributes managament, the cell has informat...
Base class for nodes used in meshes.
Encapsulates all the geometrical data.
Geometrical information of 1,2 or 3D distributed cells.
CepsReal m_maxCellDiameter
Largest cell size.
void addBoundaryCell(GeomCell *boundaryCell)
Add a boundary cell to the mesh.
CepsInt getLocalIndexOfBoundaryCell(CepsCellGlobalIndex geomIndex) const
Geom global to local mapping for boundary cells.
const CepsVector< GeomNode * > & getOwnedNodes()
CepsVector of local nodes stored on this process.
CepsUInt getNbBoundaryCells() const
Total number of boundary cells of the mesh.
CepsUInt getMaxNodeConnectivity()
Local maximum node connectivity (nb of adjacent nodes)
CepsUInt m_nbNodes
whole mesh nodes count
CepsUInt computeMaxNodeConnectivity()
Locally computes the maximum node connectivity (nb of adjacent nodes)
LocalGlobalMapping< GeomNode * > m_haloNodes
Nodes in halo.
CepsUInt getLocalNbCells() const
Number of non-boundary cells stored on this process.
void addHaloNode(GeomNode *node)
Add a halo node to the mesh.
void refreshCells()
Forces re-evaluation of each cell structure (boundary elmts included).
CepsHash getNodeHash(GeomNode *n)
gets an identifier for the node (here its global index)
CepsUInt getNbNodes() const
Total number of nodes of the mesh.
CepsBool m_connectivityComputed
computation flag
CepsUInt getDimension() const
Geometrical dimension.
void setNbCells(CepsUInt n)
Set the total number of cells of this mesh.
void setNbNodes(CepsUInt n)
Set the total number of nodes of this mesh.
GeomNode * getHaloNode(CepsNodeGlobalIndex geomIndex) const
Get node referenced by geom index.
Geometry * getGeometry() const
Geometry this mesh is tied too.
LocalGlobalMapping< GeomCell * > m_bCells
Boundary cells (dim-1)
void scale(CepsReal scaleFactor)
Each node coordinate is scaled by scaleFactor.
const CepsVector< GeomCell * > & getCells()
CepsVector of cells stored on this process.
const CepsVector< GeomNode * > & getHaloNodes()
CepsVector of halo nodes stored on this process.
Mesh(CepsUInt dim)
Default constructor.
CepsUInt m_maxNodeConnectivity
maximum nb adjacent nodes.
CepsUInt getNbCells() const
Total number of non-boundary cells of the mesh.
void addNode(GeomNode *node)
Add a node to the mesh.
void addCell(GeomCell *cell)
Add an cell to the mesh.
CepsHash getCellHash(GeomCell *c)
gets an identifier for the node, (here its global index)
CepsReal getMaxCellDiameter() const
Maximum size of cells.
CepsUInt getLocalNbNodes() const
Number of nodes stored on this process.
Geometry * m_geom
Link to geometry.
CepsUInt getLocalNbBoundaryCells() const
Number of boundary cells stored on this process.
void setGeometry(Geometry *geom)
Link geometry.
GeomCell * getCell(CepsCellGlobalIndex geomIndex) const
pointer on requested cell, nullptr if not owned
LocalGlobalMapping< GeomNode * > m_ownedNodes
Nodes of that proc.
GeomCell * getBoundaryCell(CepsCellGlobalIndex geomIndex) const
pointer on requested boundary cell, nullptr if not owned
CepsUInt getLocalNbHaloNodes() const
Number of halo nodes stored on this process.
GeomNode * getNodeOrHaloNode(CepsNodeGlobalIndex geomIndex) const
Get node referenced by geom index.
CepsUInt m_dim
Dimension of the cells.
void setNbBoundaryCells(CepsUInt n)
Set the total number of boundary cells of this mesh.
CepsUInt m_nbCells
whole mesh cells count
CepsUInt m_nbBoundaryCells
whole mesh boundary cells count
GeomNode * getNode(CepsNodeGlobalIndex globalIndex) const
Get node referenced by global index.
const CepsVector< GeomCell * > & getBoundaryCells()
CepsVector of boundary cells stored on this process.
friend std::ostream & operator<<(std::ostream &os, const Mesh &m)
Displays some info on the mesh.
LocalGlobalMapping< GeomCell * > m_cells
Cells of main dimension.
CepsInt getLocalIndexOfCell(CepsCellGlobalIndex geomIndex) const
Geom global to local mapping for cells.