![]() |
CoMMA 1.3.2
A geometric agglomerator for unstructured meshes
|
ARComputer. Here, AR is the reciprocal of the measure, hence the optimal solution should be the one with the max measure. More...
#include <ARComputer.h>
Public Member Functions | |
AROverMeasure (std::shared_ptr< Dual_Graph< IndexT, RealT, IntT > > graph) | |
Constructor. More... | |
~AROverMeasure () override=default | |
Destructor. More... | |
void | compute_and_update_features (const IndexT i_fc, const CellFeatures< IndexT, RealT, IntT > &cc_feats, const std::unordered_set< IndexT > &fc_of_cc, IntT &shared_faces, RealT &aspect_ratio, CellFeatures< IndexT, RealT, IntT > &new_feats) const override |
Computes features of the CC obtained by adding a given fine cell. The features are Aspect-Ratio, number of face shared with other cells already agglomerated (Current coarse cell means without i_fc ) and those of CellFeatures. More... | |
![]() | |
ARComputer (std::shared_ptr< Dual_Graph< IndexT, RealT, IntT > > graph) | |
Constructor. More... | |
virtual | ~ARComputer ()=default |
The destructor of the class. More... | |
virtual void | compute_and_update_features (const IndexT i_fc, const CellFeatures< IndexT, RealT, IntT > &cc_feats, const std::unordered_set< IndexT > &fc_of_cc, IntT &shared_faces, RealT &aspect_ratio, CellFeatures< IndexT, RealT, IntT > &new_feats) const =0 |
Computes features of the CC obtained by adding a given fine cell. The features are Aspect-Ratio, number of face shared with other cells already agglomerated (Current coarse cell means without i_fc ) and those of CellFeatures. More... | |
Additional Inherited Members | |
![]() | |
void | compute_shared_faces (const IndexT i_fc, const std::unordered_set< IndexT > &fc_of_cc, RealT &shared_weights, std::unordered_set< IndexT > &shared_faces) const |
Computes number of shared faces and features of the CC obtained by adding a given fine cell. The features are Aspect-Ratio and number of face shared with other cells already agglomerated (Current coarse cell means without i_fc ) More... | |
void | update_approximated_geometric_features (const IndexT i_fc, const CellFeatures< IndexT, RealT, IntT > &cc_feats, const std::unordered_set< IndexT > &fc_of_cc, CellFeatures< IndexT, RealT, IntT > &new_feats) const |
Compute approximated geometric features (e.g., diameter) More... | |
std::vector< RealT > | compute_and_update_barycenter (const IndexT i_fc, const CellFeatures< IndexT, RealT, IntT > &cc_feats, const std::unordered_set< IndexT > &fc_of_cc, CellFeatures< IndexT, RealT, IntT > &new_feats) const |
Compute the barycenter and update the features accordingly. More... | |
template<bool compute_weights = false, bool update_facets = false> | |
void | update_basic_features (const IndexT i_fc, const CellFeatures< IndexT, RealT, IntT > &cc_feats, const std::unordered_set< IndexT > &fc_of_cc, IntT &n_shared_faces, CellFeatures< IndexT, RealT, IntT > &new_feats) const |
Compute approximated geometric features (e.g., diameter) More... | |
template<unsigned int dim> | |
RealT constexpr | x_over_radius (const RealT sqx, const CellFeatures< IndexT, RealT, IntT > &feats) const |
Given a squared quantity and cell features, compute the ratio between the quantity and the radius of the cell (that is ![]() | |
![]() | |
std::shared_ptr< Dual_Graph< IndexT, RealT, IntT > > | _graph |
Dual_Graph object determining Fine cells graph and hence the connectivity. More... | |
ARComputer. Here, AR is the reciprocal of the measure, hence the optimal solution should be the one with the max measure.
IndexT | type used for indices |
RealT | type used for features |
IntT | type used for integers (e.g., number of cells, faces,...) |
|
inlineexplicit |
Constructor.
[in] | graph | Dual_Graph object that determines the connectivity |
|
overridedefault |
Destructor.
|
inlineoverridevirtual |
Computes features of the CC obtained by adding a given fine cell. The features are Aspect-Ratio, number of face shared with other cells already agglomerated (Current coarse cell means without i_fc
) and those of CellFeatures.
[in] | i_fc | Index of the fine cell to add to the coarse cell |
[in] | cc_feats | Features of the current coarse cell |
[in] | fc_of_cc | Index of the fine cells already agglomerated in the coarse cell |
[out] | shared_faces | Number of faces shared by the fine cell with the current coarse cell |
[out] | aspect_ratio | Aspect-Ratio of the (final) coarse cell |
[out] | new_feats | Features of the (final) coarse cell |
Implements comma::ARComputer< IndexT, RealT, IntT >.