CoMMA 1.3.2
A geometric agglomerator for unstructured meshes
Loading...
Searching...
No Matches
comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > Class Template Reference

Class describing a coarse cell with a full description, that is, it also holds a subgraph describing how the fine cells are connected inside the coarse one. More...

#include <Coarse_Cell.h>

Inheritance diagram for comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >:
comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >

Public Types

using BaseClass = Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >
 Type for the base Coarse_Cell class. More...
 
using SubGraphType = Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >
 Type for a Subgraph object. More...
 
using SubGraphPtr = std::shared_ptr< SubGraphType >
 Type for a shared pointer to a Subgraph object. More...
 
using DualGraphPtr = std::shared_ptr< Dual_Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > >
 Type for a shared pointer to a Dual_Graph object. More...
 

Public Member Functions

 Coarse_Cell_Subgraph (DualGraphPtr fc_graph, CoMMAIndexType i_cc, const std::unordered_set< CoMMAIndexType > &s_fc, CoMMAIntType compactness, bool is_isotropic=true)
 Constructor of the class. More...
 
void insert_cell (const CoMMAIndexType i_fc, const std::optional< CoMMAIntType > new_compactness) override
 Insert a FC in the CC (and update sub-graph if necessary) More...
 
void insert_cells (const std::unordered_set< CoMMAIndexType > &fcs, const std::optional< CoMMAIntType > new_compactness) override
 Insert several FC in the CC (and update sub-graph if necessary) More...
 
void update_connectivity ()
 Analyse subgraph and update the connectivity. More...
 

Public Attributes

SubGraphPtr _cc_graph
 Shared pointer of the subgraph structure (CSR representation) More...
 
bool _is_connected
 Whether the cell connected. More...
 
bool _is_connectivity_up_to_date
 Whether the connectivity has been checked. More...
 

Detailed Description

template<typename CoMMAIndexType, typename CoMMAWeightType, typename CoMMAIntType>
class comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >

Class describing a coarse cell with a full description, that is, it also holds a subgraph describing how the fine cells are connected inside the coarse one.

Template Parameters
CoMMAIndexTypethe CoMMA index type for the global index of the mesh
CoMMAWeightTypethe CoMMA weight type for the weights (volume or area) of the nodes or edges of the Mesh
CoMMAIntTypethe CoMMA type for integers

Member Typedef Documentation

◆ BaseClass

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
using comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::BaseClass = Coarse_Cell<CoMMAIndexType, CoMMAWeightType, CoMMAIntType>

Type for the base Coarse_Cell class.

◆ DualGraphPtr

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
using comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::DualGraphPtr = std::shared_ptr<Dual_Graph<CoMMAIndexType, CoMMAWeightType, CoMMAIntType> >

Type for a shared pointer to a Dual_Graph object.

◆ SubGraphPtr

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
using comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::SubGraphPtr = std::shared_ptr<SubGraphType>

Type for a shared pointer to a Subgraph object.

◆ SubGraphType

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
using comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::SubGraphType = Subgraph<CoMMAIndexType, CoMMAWeightType, CoMMAIntType>

Type for a Subgraph object.

Constructor & Destructor Documentation

◆ Coarse_Cell_Subgraph()

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::Coarse_Cell_Subgraph ( DualGraphPtr  fc_graph,
CoMMAIndexType  i_cc,
const std::unordered_set< CoMMAIndexType > &  s_fc,
CoMMAIntType  compactness,
bool  is_isotropic = true 
)
inline

Constructor of the class.

Parameters
[in]fc_graphDual_Graph object from where are taken the set of fine cells to create the coarse cell.
[in]i_ccIndex of the coarse cell
[in]s_fcUnordered set of fine cells constituting the coarse cell
[in]compactnessCompactness degree of the CC
[in]is_isotropic(default = true) boolean describing if the cell is coming from an isotropic agglomeration process or an anisotropic agglomeration process.

Member Function Documentation

◆ insert_cell()

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
void comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::insert_cell ( const CoMMAIndexType  i_fc,
const std::optional< CoMMAIntType >  new_compactness 
)
inlineoverridevirtual

Insert a FC in the CC (and update sub-graph if necessary)

Parameters
[in]i_fcIndex of the fine cell to add
[in]new_compactnessOptional, default void, giving the compactness of the CC after the addition

Reimplemented from comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >.

◆ insert_cells()

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
void comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::insert_cells ( const std::unordered_set< CoMMAIndexType > &  fcs,
const std::optional< CoMMAIntType >  new_compactness 
)
inlineoverridevirtual

Insert several FC in the CC (and update sub-graph if necessary)

Parameters
[in]fcsSet of indices of the fine cells to add
[in]new_compactnessOptional, default void, giving the compactness of the CC after the addition

Reimplemented from comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >.

◆ update_connectivity()

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
void comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::update_connectivity ( )
inline

Analyse subgraph and update the connectivity.

Member Data Documentation

◆ _cc_graph

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
SubGraphPtr comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_cc_graph

Shared pointer of the subgraph structure (CSR representation)

◆ _is_connected

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
bool comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_is_connected

Whether the cell connected.

◆ _is_connectivity_up_to_date

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
bool comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_is_connectivity_up_to_date

Whether the connectivity has been checked.


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