|
| Agglomerator_Iterative (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 of the class. No specific implementation, it instantiates the base class Agglomerator_Biconnected. More...
|
|
| ~Agglomerator_Iterative () override=default |
| Destructor. More...
|
|
void | compute_best_fc_to_add (const CoMMAIntType fc_iter, const std::shared_ptr< Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > > neighbourhood, const std::unordered_map< CoMMAIndexType, CoMMAIntType > &d_n_of_seed, const bool &is_order_primary, const CellFeatures< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > &cc_feats, const std::unordered_set< CoMMAIndexType > &s_of_fc_for_current_cc, CoMMAIndexType &argmin_ar, CoMMAIntType &max_faces_in_common, CellFeatures< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > &min_ar_cc_feats) const override |
| Specialization of the parent function. This is an iterative version. Computes the best fine cell to add to the coarse cell. The choice depends on: the number of shared faces (tries to maximize it), the neighbourhood order (tries to minimize it), and the aspect-ratio of the coarse cell (tries to minimize it). More...
|
|
| Agglomerator_Biconnected (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 of the class. No specific implementation, it instantiates the base class Agglomerator_Isotropic. More...
|
|
| ~Agglomerator_Biconnected () override=default |
| Destructor. More...
|
|
std::unordered_set< CoMMAIndexType > | choose_optimal_cc_and_update_seeds_pool (const CoMMAIndexType seed, const std::vector< CoMMAWeightType > &priority_weights, CoMMAIntType &compactness) override |
| Specialization of the pure virtual function in the parent class, to be used in couple with the agglomerate_one_level of the Agglomerator_Isotropic. More...
|
|
virtual void | compute_best_fc_to_add (const CoMMAIntType fc_iter, const std::shared_ptr< Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > > neighbourhood, const std::unordered_map< CoMMAIndexType, CoMMAIntType > &d_n_of_seed, const bool &is_order_primary, const CellFeatures< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > &cc_feats, const std::unordered_set< CoMMAIndexType > &s_of_fc_for_current_cc, CoMMAIndexType &argmin_ar, CoMMAIntType &max_faces_in_common, CellFeatures< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > &min_ar_cc_feats) const |
| Computes the best fine cell to add to the coarse cell. The choice depends on: the number of shared faces (tries to maximize it), the neighbourhood order (tries to minimize it), and the aspect-ratio of the coarse cell (tries to minimize it). More...
|
|
| 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...
|
|
|
using | NeighbourhoodCreatorBaseType = NeighbourhoodCreator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
| NeighbourhoodCreator type (base class) More...
|
|
using | NeighbourhoodCreatorExtType = NeighbourhoodExtendedCreator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
| NeighbourhoodExtendedCreator type (derived class) More...
|
|
using | NeighbourhoodCreatorPFType = NeighbourhoodPureFrontCreator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
| NeighbourhoodPureFrontCreator type (derived class) More...
|
|
CoMMAIntType | _fc_iter |
| Number of iterations allowed for the algorithm choosing which fine cell to add next. More...
|
|
std::shared_ptr< NeighbourhoodCreatorBaseType > | _neigh_crtor |
| Creator responsible for neighborhood objects. More...
|
|
std::shared_ptr< ARComputer< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > > | _ar_computer |
| Object computing the aspect-ratio of a coarse cell. 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_Iterative< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >
Child class of Agglomerator_Isotropic which implements a specialized iterative algorithm for the search of fine cells.
- 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 |