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

Class describing a coarse cell. More...

#include <Coarse_Cell.h>

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

Public Types

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 (DualGraphPtr fc_graph, CoMMAIndexType i_cc, const std::unordered_set< CoMMAIndexType > &s_fc, CoMMAIntType compactness, bool is_isotropic=true)
 Constructor of the class. More...
 
virtual ~Coarse_Cell ()=default
 Destructor of the class. More...
 
bool is_connected ()
 Method that return a boolean determining if the coarse cell is defined by a connected sub-graph or not. More...
 
virtual void insert_cell (const CoMMAIndexType i_fc, const std::optional< CoMMAIntType > new_compactness)
 Insert a FC in the CC (and update sub-graph if necessary) More...
 
virtual void insert_cells (const std::unordered_set< CoMMAIndexType > &fcs, const std::optional< CoMMAIntType > new_compactness)
 Insert several FC in the CC (and update sub-graph if necessary) More...
 

Public Attributes

CoMMAIndexType _idx
 Index of the coarse cell (It seems to be unused, but useful to have) More...
 
DualGraphPtr _fc_graph
 The global dual graph. More...
 
CoMMAIntType _compactness
 Compactness degree of the CC. More...
 
CoMMAIntType _cardinality
 Number of FC in the CC. More...
 
bool _is_isotropic
 Whether the cell isotropic or anisotropic. More...
 
std::unordered_set< CoMMAIndexType > _s_fc
 Set of fine cells composing the Coarse cell. More...
 

Detailed Description

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

Class describing a coarse cell.

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

◆ 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.

Constructor & Destructor Documentation

◆ Coarse_Cell()

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::Coarse_Cell ( 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.

◆ ~Coarse_Cell()

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
virtual comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::~Coarse_Cell ( )
virtualdefault

Destructor of the class.

Member Function Documentation

◆ insert_cell()

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
virtual void comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::insert_cell ( const CoMMAIndexType  i_fc,
const std::optional< CoMMAIntType >  new_compactness 
)
inlinevirtual

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 in comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >.

◆ insert_cells()

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

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 in comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >.

◆ is_connected()

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
bool comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::is_connected ( )
inline

Method that return a boolean determining if the coarse cell is defined by a connected sub-graph or not.

Returns
true if the subgraph is connected, false if the subgraph is not connected

Member Data Documentation

◆ _cardinality

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
CoMMAIntType comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_cardinality

Number of FC in the CC.

◆ _compactness

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
CoMMAIntType comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_compactness

Compactness degree of the CC.

◆ _fc_graph

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
DualGraphPtr comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_fc_graph

The global dual graph.

◆ _idx

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
CoMMAIndexType comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_idx

Index of the coarse cell (It seems to be unused, but useful to have)

◆ _is_isotropic

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
bool comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_is_isotropic

Whether the cell isotropic or anisotropic.

◆ _s_fc

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
std::unordered_set<CoMMAIndexType> comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_s_fc

Set of fine cells composing the Coarse cell.


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