|
| Agglomerator_Isotropic (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, CoMMAAspectRatioT aspect_ratio, CoMMANeighbourhoodT neighbourhood_type, CoMMAIntType fc_iter) |
| Constructor. The constructor takes as arguments the same arguments of the father and in this way activates also the constructor of the base class. More...
|
|
| ~Agglomerator_Isotropic () override=default |
| Destructor. More...
|
|
void | set_agglomeration_parameter (CoMMAIntType goal_card=0, CoMMAIntType min_card=0, CoMMAIntType max_card=0) |
| The task of the function is to set the parameters of determine the cardinality limits with respect to the parameters passed. More...
|
|
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) override |
| Specialization of the pure virtual function to the class Agglomerator_Isotropic. We add the override key as a guard to possible mistakes: https://stackoverflow.com/questions/46446652/is-there-any-point-in-using-override-when-overriding-a-pure-virtual-function
The function calls function choose_optimal_cc_and_update_seeds_pool of the derived class. For further information about the structure, have a look at: http://www.cplusplus.com/forum/general/31851/
The pseudo-code considers the while function and the agglomeration process is not completed until all the cells are not agglomerated. Hence, while there are still non agglomerate fine cells, repeat the following steps: More...
|
|
virtual std::unordered_set< CoMMAIndexType > | choose_optimal_cc_and_update_seeds_pool (const CoMMAIndexType seed, const std::vector< CoMMAWeightType > &priority_weights, CoMMAIntType &compactness)=0 |
| Pure virtual function that must be implemented in child classes to define the optimal coarse cell. More...
|
|
| 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...
|
|
|
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...
|
|
template<typename CoMMAIndexType, typename CoMMAWeightType, typename CoMMAIntType>
class comma::Agglomerator_Isotropic< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >
Agglomerator_Isotropic class is a child class of the Agglomerator class that specializes the implementation to the case of Isotropic agglomeration.
- Template Parameters
-
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 |
template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
void comma::Agglomerator_Isotropic< 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 |
|
) |
| |
|
inlineoverridevirtual |
template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
virtual std::unordered_set< CoMMAIndexType > comma::Agglomerator_Isotropic< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::choose_optimal_cc_and_update_seeds_pool |
( |
const CoMMAIndexType |
seed, |
|
|
const std::vector< CoMMAWeightType > & |
priority_weights, |
|
|
CoMMAIntType & |
compactness |
|
) |
| |
|
pure virtual |
Pure virtual function that must be implemented in child classes to define the optimal coarse cell.
- Parameters
-
[in] | seed | Cell from which the agglomeration of the CC starts |
[in] | priority_weights | Weights used to set the order telling where to start agglomerating. The higher the weight, the higher the priority |
[out] | compactness | Compactness of the final CC, that is, the minimum number of neighbours of a fine cell inside a coarse cell |
- Returns
- the (unordered) set of the fine cells composing the coarse cell
Implemented in comma::Agglomerator_Biconnected< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >.