CoMMA 1.3.2
A geometric agglomerator for unstructured meshes
|
An interface class responsible of storing the cell centered dual graph and of acting on it (it is an interface for the global Dual_Graph and the Subgraph) More...
#include <Dual_Graph.h>
Public Types | |
using | ContainerIndexType = std::vector< CoMMAIndexType > |
Type for containers of indices. More... | |
using | ContainerWeightType = std::vector< CoMMAWeightType > |
Type for containers of weights. More... | |
using | ContainerIndexConstIt = typename ContainerIndexType::const_iterator |
Type for constant iterators of containers of indices. More... | |
using | ContainerWeightConstIt = typename ContainerWeightType::const_iterator |
Type for constant iterators of containers of weights. More... | |
Public Member Functions | |
Graph (const CoMMAIndexType &nb_c, const ContainerIndexType &m_crs_row_ptr, const ContainerIndexType &m_crs_col_ind, const ContainerWeightType &m_crs_values, const ContainerWeightType &volumes) | |
Constructor of the class. More... | |
virtual | ~Graph ()=default |
Destructor of the class. More... | |
void | DFS (const CoMMAIndexType &i_fc) |
Depth First Search (DFS) recursive function. More... | |
void | BFS (const CoMMAIndexType &root) |
Breadth First Search (BFS) function. More... | |
CoMMAIntType | get_nb_of_neighbours (const CoMMAIndexType i_c) const |
Retrieve the number of neighbours. More... | |
ContainerIndexType | get_neighbours (const CoMMAIndexType &i_c) const |
Based on the CRS representation retrieves the neighbours of the cell given as an input. More... | |
ContainerIndexConstIt | neighbours_cbegin (const CoMMAIndexType &i_c) const |
Get constant pointer to the first neighbour of cell i_c . More... | |
ContainerIndexConstIt | neighbours_cend (const CoMMAIndexType &i_c) const |
Get constant pointer to the element following the last neighbour of cell i_c . More... | |
ContainerWeightType | get_weights (const CoMMAIndexType &i_c) const |
Based on the area of the faces composing the cell given as an input, we retrieve the faces connecting the given cell with the neighbourhood that can be described also as the weight of the graph. More... | |
ContainerWeightConstIt | weights_cbegin (const CoMMAIndexType &i_c) const |
Get constant pointer to the first neighbour of cell i_c . More... | |
ContainerWeightConstIt | weights_cend (const CoMMAIndexType &i_c) const |
Get constant pointer to the element following the last neighbour of cell i_c . More... | |
bool | check_connectivity () |
Check the connectivity of the graph. More... | |
CoMMAIntType | compute_min_fc_compactness_inside_a_cc (const std::unordered_set< CoMMAIndexType > &s_fc) const |
Compute the minimum compactness of fine cells inside a coarse cell. More... | |
std::unordered_map< CoMMAIndexType, CoMMAIntType > | compute_fc_compactness_inside_a_cc (const std::unordered_set< CoMMAIndexType > &s_fc) const |
Compute the dictionary of compactness of fine cells inside a coarse cell. More... | |
Public Attributes | |
CoMMAIndexType | _number_of_cells |
Number of nodes in the Graph (it corresponds to the number of cells in the subgraph or the dual graph. More... | |
std::vector< bool > | _visited |
Helper vector for the DFS. More... | |
ContainerIndexType | _m_CRS_Row_Ptr |
Vector of row pointer of CRS representation. More... | |
ContainerIndexType | _m_CRS_Col_Ind |
Vector of column index of CRS representation. More... | |
ContainerWeightType | _m_CRS_Values |
Vector of area weight of CRS representation. More... | |
ContainerWeightType | _volumes |
Vector of volumes. More... | |
An interface class responsible of storing the cell centered dual graph and of acting on it (it is an interface for the global Dual_Graph and the Subgraph)
CoMMAIndexType | the CoMMA index type for the global index of the mesh |
CoMMAWeightType | the CoMMA weight type for the weights (volume or area) of the nodes or edges of the Mesh |
CoMMAIntType | the CoMMA type for integers |
using comma::Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::ContainerIndexConstIt = typename ContainerIndexType::const_iterator |
Type for constant iterators of containers of indices.
using comma::Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::ContainerIndexType = std::vector<CoMMAIndexType> |
Type for containers of indices.
using comma::Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::ContainerWeightConstIt = typename ContainerWeightType::const_iterator |
Type for constant iterators of containers of weights.
using comma::Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::ContainerWeightType = std::vector<CoMMAWeightType> |
Type for containers of weights.
|
inline |
Constructor of the class.
[in] | nb_c | Number of cells |
[in] | m_crs_row_ptr | The row pointer of the CRS representation |
[in] | m_crs_col_ind | The column index of the CRS representation |
[in] | m_crs_values | The weight of the CRS representation (in CoMMA case will be the area of the faces that in the graph representation are the edges between two nodes represented by the cell centers. |
[in] | volumes | The volumes of the cells |
|
virtualdefault |
Destructor of the class.
|
inline |
Breadth First Search (BFS) function.
[in] | root | Root of the spanning tree |
|
inline |
Check the connectivity of the graph.
|
inline |
Compute the dictionary of compactness of fine cells inside a coarse cell.
[in] | s_fc | Set of fine cells to analyse |
|
inline |
Compute the minimum compactness of fine cells inside a coarse cell.
[in] | s_fc | Set of fine cells to analyse |
|
inline |
Depth First Search (DFS) recursive function.
[in] | i_fc | Index of the node to print |
|
inline |
Retrieve the number of neighbours.
[in] | i_c | Index of the cell |
|
inline |
Based on the CRS representation retrieves the neighbours of the cell given as an input.
[in] | i_c | Index of the cell |
|
inline |
Based on the area of the faces composing the cell given as an input, we retrieve the faces connecting the given cell with the neighbourhood that can be described also as the weight of the graph.
[in] | i_c | Index of the cell |
|
inline |
Get constant pointer to the first neighbour of cell i_c
.
[in] | i_c | Index of the cell |
|
inline |
Get constant pointer to the element following the last neighbour of cell i_c
.
[in] | i_c | Index of the cell |
|
inline |
Get constant pointer to the first neighbour of cell i_c
.
[in] | i_c | Index of the cell |
|
inline |
Get constant pointer to the element following the last neighbour of cell i_c
.
[in] | i_c | Index of the cell |
ContainerIndexType comma::Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_m_CRS_Col_Ind |
Vector of column index of CRS representation.
ContainerIndexType comma::Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_m_CRS_Row_Ptr |
Vector of row pointer of CRS representation.
ContainerWeightType comma::Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_m_CRS_Values |
Vector of area weight of CRS representation.
CoMMAIndexType comma::Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_number_of_cells |
Number of nodes in the Graph (it corresponds to the number of cells in the subgraph or the dual graph.
std::vector<bool> comma::Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_visited |
Helper vector for the DFS.
ContainerWeightType comma::Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_volumes |
Vector of volumes.