CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
Geometrical information of 1,2 or 3D distributed cells.
A mesh holds geometrical data distributed on the different process. Each process has a part of the global mesh data.
Templated on _Dim, which refers to the dimension of the mesh: volumes (3), surfaces (2) or cables (1).
Cells are separated between regular cells and boundary cells of dimension _Dim-1.
Nodes are separated between owned nodes (local to the process) and halo nodes (shared by one or more other processes). Same goes with cells, which can be shared or not. Ownership of cells is determined by the ownership of the first node of the cell's nodes list.
#include <Mesh.hpp>
Public Member Functions | |
Mesh (CepsUInt dim) | |
Default constructor. More... | |
~Mesh () | |
Destructor. More... | |
CepsUInt | getDimension () const |
Geometrical dimension. More... | |
void | addCell (GeomCell *cell) |
Add an cell to the mesh. More... | |
void | addBoundaryCell (GeomCell *boundaryCell) |
Add a boundary cell to the mesh. More... | |
void | addNode (GeomNode *node) |
Add a node to the mesh. More... | |
void | addHaloNode (GeomNode *node) |
Add a halo node to the mesh. More... | |
void | refreshCells () |
Forces re-evaluation of each cell structure (boundary elmts included). More... | |
void | setNbCells (CepsUInt n) |
Set the total number of cells of this mesh. More... | |
void | setNbBoundaryCells (CepsUInt n) |
Set the total number of boundary cells of this mesh. More... | |
void | setNbNodes (CepsUInt n) |
Set the total number of nodes of this mesh. More... | |
GeomNode * | getNode (CepsNodeGlobalIndex globalIndex) const |
Get node referenced by global index. More... | |
GeomNode * | getHaloNode (CepsNodeGlobalIndex geomIndex) const |
Get node referenced by geom index. More... | |
GeomNode * | getNodeOrHaloNode (CepsNodeGlobalIndex geomIndex) const |
Get node referenced by geom index. More... | |
CepsInt | getLocalIndexOfCell (CepsCellGlobalIndex geomIndex) const |
Geom global to local mapping for cells. More... | |
CepsInt | getLocalIndexOfBoundaryCell (CepsCellGlobalIndex geomIndex) const |
Geom global to local mapping for boundary cells. More... | |
GeomCell * | getCell (CepsCellGlobalIndex geomIndex) const |
pointer on requested cell, nullptr if not owned More... | |
GeomCell * | getBoundaryCell (CepsCellGlobalIndex geomIndex) const |
pointer on requested boundary cell, nullptr if not owned More... | |
const CepsVector< GeomCell * > & | getCells () |
CepsVector of cells stored on this process. More... | |
const CepsVector< GeomCell * > & | getBoundaryCells () |
CepsVector of boundary cells stored on this process. More... | |
const CepsVector< GeomNode * > & | getOwnedNodes () |
CepsVector of local nodes stored on this process. More... | |
const CepsVector< GeomNode * > & | getHaloNodes () |
CepsVector of halo nodes stored on this process. More... | |
CepsUInt | getNbCells () const |
Total number of non-boundary cells of the mesh. More... | |
CepsUInt | getNbBoundaryCells () const |
Total number of boundary cells of the mesh. More... | |
CepsUInt | getNbNodes () const |
Total number of nodes of the mesh. More... | |
CepsUInt | getLocalNbCells () const |
Number of non-boundary cells stored on this process. More... | |
CepsUInt | getLocalNbBoundaryCells () const |
Number of boundary cells stored on this process. More... | |
CepsUInt | getLocalNbNodes () const |
Number of nodes stored on this process. More... | |
CepsUInt | getLocalNbHaloNodes () const |
Number of halo nodes stored on this process. More... | |
CepsUInt | getMaxNodeConnectivity () |
Local maximum node connectivity (nb of adjacent nodes) More... | |
CepsReal | getMaxCellDiameter () const |
Maximum size of cells. More... | |
void | setGeometry (Geometry *geom) |
Link geometry. More... | |
Geometry * | getGeometry () const |
Geometry this mesh is tied too. More... | |
void | scale (CepsReal scaleFactor) |
Each node coordinate is scaled by scaleFactor. More... | |
Protected Member Functions | |
CepsUInt | computeMaxNodeConnectivity () |
Locally computes the maximum node connectivity (nb of adjacent nodes) More... | |
CepsHash | getNodeHash (GeomNode *n) |
gets an identifier for the node (here its global index) More... | |
CepsHash | getCellHash (GeomCell *c) |
gets an identifier for the node, (here its global index) More... | |
Protected Attributes | |
CepsUInt | m_dim |
Dimension of the cells. More... | |
Geometry * | m_geom |
Link to geometry. More... | |
CepsUInt | m_nbCells |
whole mesh cells count More... | |
CepsUInt | m_nbBoundaryCells |
whole mesh boundary cells count More... | |
CepsUInt | m_nbNodes |
whole mesh nodes count More... | |
CepsBool | m_connectivityComputed |
computation flag More... | |
CepsReal | m_maxCellDiameter |
Largest cell size. More... | |
LocalGlobalMapping< GeomCell * > | m_cells |
Cells of main dimension. More... | |
LocalGlobalMapping< GeomCell * > | m_bCells |
Boundary cells (dim-1) More... | |
LocalGlobalMapping< GeomNode * > | m_ownedNodes |
Nodes of that proc. More... | |
LocalGlobalMapping< GeomNode * > | m_haloNodes |
Nodes in halo. More... | |
CepsUInt | m_maxNodeConnectivity |
maximum nb adjacent nodes. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Mesh &m) |
Displays some info on the mesh. More... | |
void Mesh::addBoundaryCell | ( | GeomCell * | boundaryCell | ) |
void Mesh::addCell | ( | GeomCell * | cell | ) |
void Mesh::addHaloNode | ( | GeomNode * | node | ) |
void Mesh::addNode | ( | GeomNode * | node | ) |
|
protected |
GeomCell * Mesh::getBoundaryCell | ( | CepsCellGlobalIndex | geomIndex | ) | const |
const CepsVector< GeomCell * > & Mesh::getBoundaryCells | ( | ) |
GeomCell * Mesh::getCell | ( | CepsCellGlobalIndex | geomIndex | ) | const |
const CepsVector< GeomCell * > & Mesh::getCells | ( | ) |
CepsUInt Mesh::getDimension | ( | ) | const |
Geometry * Mesh::getGeometry | ( | ) | const |
GeomNode * Mesh::getHaloNode | ( | CepsNodeGlobalIndex | geomIndex | ) | const |
const CepsVector< GeomNode * > & Mesh::getHaloNodes | ( | ) |
CepsInt Mesh::getLocalIndexOfBoundaryCell | ( | CepsCellGlobalIndex | geomIndex | ) | const |
CepsInt Mesh::getLocalIndexOfCell | ( | CepsCellGlobalIndex | geomIndex | ) | const |
CepsUInt Mesh::getLocalNbBoundaryCells | ( | ) | const |
CepsUInt Mesh::getLocalNbCells | ( | ) | const |
CepsUInt Mesh::getLocalNbHaloNodes | ( | ) | const |
CepsUInt Mesh::getLocalNbNodes | ( | ) | const |
CepsReal Mesh::getMaxCellDiameter | ( | ) | const |
CepsUInt Mesh::getMaxNodeConnectivity | ( | ) |
CepsUInt Mesh::getNbBoundaryCells | ( | ) | const |
CepsUInt Mesh::getNbCells | ( | ) | const |
CepsUInt Mesh::getNbNodes | ( | ) | const |
GeomNode * Mesh::getNode | ( | CepsNodeGlobalIndex | globalIndex | ) | const |
GeomNode * Mesh::getNodeOrHaloNode | ( | CepsNodeGlobalIndex | geomIndex | ) | const |
const CepsVector< GeomNode * > & Mesh::getOwnedNodes | ( | ) |
void Mesh::refreshCells | ( | ) |
void Mesh::scale | ( | CepsReal | scaleFactor | ) |
void Mesh::setNbBoundaryCells | ( | CepsUInt | n | ) |
void Mesh::setNbCells | ( | CepsUInt | n | ) |
void Mesh::setNbNodes | ( | CepsUInt | n | ) |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |