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

A class responsible to do the interface between the different kinds of agglomerator. More...

#include <Agglomerator.h>

Inheritance diagram for comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >:
comma::Agglomerator_Anisotropic< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > comma::Agglomerator_Isotropic< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > comma::Agglomerator_Biconnected< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > comma::Agglomerator_Iterative< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >

Public Member Functions

 Agglomerator (std::shared_ptr< Dual_Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > > graph, std::shared_ptr< Coarse_Cell_Container< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > > cc_graph, std::shared_ptr< Seeds_Pool< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > > seeds_pool, CoMMAIntType dimension)
 The constructor of the interface. More...
 
virtual ~Agglomerator ()=default
 The destructor of the class. More...
 
std::vector< CoMMAIndexType > get_fc_2_cc () const
 Accessor to retrieve the fine cells to coarse cells from the coarse cell graphs class. More...
 
virtual void agglomerate_one_level (const CoMMAIntType goal_card, const CoMMAIntType min_card, const CoMMAIntType max_card, const std::vector< CoMMAWeightType > &priority_weights, bool correction_steps)=0
 Pure virtual function which implementation is specified in the related child classes and that defines the agglomeration of one level. More...
 

Protected Attributes

CoMMAIntType _dimension
 Dimensionality of the problem (_dimension = 2 -> 2D, _dimension = 3 -> 3D) More...
 
CoMMAIntType _min_neighbourhood = 3
 Minimum number of neighbourhood we extend to search the neighbourhood in the greedy algorithm. Set as default to 3. More...
 
CoMMAIntType _min_card = 0
 Minimum cardinality (default = 0, meaning, equal to the dimension) More...
 
CoMMAIntType _max_card = 0
 Maximum cardinality (default = 0, meaning, 5 or 10 for, resp., 2- and 3D. More...
 
CoMMAIntType _goal_card = 0
 Goal cardinality (default = 0, meaning, 4 or 8 for, resp., 2- and 3D. More...
 
CoMMAIntType _threshold_card = 0
 Threshold cardinality (default = 0, meaning, equal to the dimension) More...
 
std::vector< CoMMAIndexType > _l_nb_of_cells
 List of number of cells per coarse cell created. More...
 
std::shared_ptr< Dual_Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > > _fc_graph
 Dual_Graph object determining Fine cells graph and hence the connectivity. More...
 
std::shared_ptr< Coarse_Cell_Container< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > > _cc_graph
 pointer to Coarse_Cell_Container element More...
 
std::shared_ptr< Seeds_Pool< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > > _seeds_pool
 Seeds_Pool object giving the order in which the fine cells should be considered when agglomerating. More...
 

Detailed Description

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

A class responsible to do the interface between the different kinds of agglomerator.

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

Constructor & Destructor Documentation

◆ Agglomerator()

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::Agglomerator ( std::shared_ptr< Dual_Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > >  graph,
std::shared_ptr< Coarse_Cell_Container< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > >  cc_graph,
std::shared_ptr< Seeds_Pool< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > >  seeds_pool,
CoMMAIntType  dimension 
)
inline

The constructor of the interface.

Parameters
[in]graphDual_Graph object that determines the connectivity of the matrix
[in]cc_graphContainer for the coarse cells
[in]seeds_poolSeeds_Pool object giving the order in which the fine cells should be considered when agglomerating
[in]dimensionDimension of the problem

◆ ~Agglomerator()

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

The destructor of the class.

Member Function Documentation

◆ agglomerate_one_level()

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
virtual void comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::agglomerate_one_level ( const CoMMAIntType  goal_card,
const CoMMAIntType  min_card,
const CoMMAIntType  max_card,
const std::vector< CoMMAWeightType > &  priority_weights,
bool  correction_steps 
)
pure virtual

Pure virtual function which implementation is specified in the related child classes and that defines the agglomeration of one level.

Parameters
[in]goal_cardgoal cardinality of the coarse cell
[in]min_cardminimum cardinality of the coarse cell
[in]max_cardmaximum cardinality of the coarse cell
[in]priority_weightsWeights used to set the order telling where to start agglomerating. The higher the weight, the higher the priority
[in]correction_stepsit defines if corrections for the isotropic algorithm are activated or not, for anisotropic algorithm not taken into account.

Implemented in comma::Agglomerator_Anisotropic< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >, and comma::Agglomerator_Isotropic< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >.

◆ get_fc_2_cc()

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
std::vector< CoMMAIndexType > comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::get_fc_2_cc ( ) const
inline

Accessor to retrieve the fine cells to coarse cells from the coarse cell graphs class.

Member Data Documentation

◆ _cc_graph

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
std::shared_ptr< Coarse_Cell_Container<CoMMAIndexType, CoMMAWeightType, CoMMAIntType> > comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_cc_graph
protected

pointer to Coarse_Cell_Container element

◆ _dimension

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
CoMMAIntType comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_dimension
protected

Dimensionality of the problem (_dimension = 2 -> 2D, _dimension = 3 -> 3D)

◆ _fc_graph

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
std::shared_ptr<Dual_Graph<CoMMAIndexType, CoMMAWeightType, CoMMAIntType> > comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_fc_graph
protected

Dual_Graph object determining Fine cells graph and hence the connectivity.

◆ _goal_card

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
CoMMAIntType comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_goal_card = 0
protected

Goal cardinality (default = 0, meaning, 4 or 8 for, resp., 2- and 3D.

◆ _l_nb_of_cells

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
std::vector<CoMMAIndexType> comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_l_nb_of_cells
protected

List of number of cells per coarse cell created.

◆ _max_card

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
CoMMAIntType comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_max_card = 0
protected

Maximum cardinality (default = 0, meaning, 5 or 10 for, resp., 2- and 3D.

◆ _min_card

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
CoMMAIntType comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_min_card = 0
protected

Minimum cardinality (default = 0, meaning, equal to the dimension)

◆ _min_neighbourhood

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
CoMMAIntType comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_min_neighbourhood = 3
protected

Minimum number of neighbourhood we extend to search the neighbourhood in the greedy algorithm. Set as default to 3.

◆ _seeds_pool

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
std::shared_ptr<Seeds_Pool<CoMMAIndexType, CoMMAWeightType, CoMMAIntType> > comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_seeds_pool
protected

Seeds_Pool object giving the order in which the fine cells should be considered when agglomerating.

◆ _threshold_card

template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
CoMMAIntType comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_threshold_card = 0
protected

Threshold cardinality (default = 0, meaning, equal to the dimension)


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