CoMMA 1.3.2
A geometric agglomerator for unstructured meshes
Loading...
Searching...
No Matches
comma::ARMaxBaryDistanceOverRadius< IndexT, RealT, IntT, dim > Class Template Reference

ARComputer. Here, AR is the ratio of the maximum over minimum distance of the cell centers from the barycenter (computed as weighted average of centers). If a cell is totally internal, it won't be included in the computations. More...

#include <ARComputer.h>

Inheritance diagram for comma::ARMaxBaryDistanceOverRadius< IndexT, RealT, IntT, dim >:
comma::ARComputer< IndexT, RealT, IntT >

Public Member Functions

 ARMaxBaryDistanceOverRadius (std::shared_ptr< Dual_Graph< IndexT, RealT, IntT > > graph)
 Constructor. More...
 
 ~ARMaxBaryDistanceOverRadius () 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...
 
- Public Member Functions inherited from comma::ARComputer< IndexT, RealT, IntT >
 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

- Protected Member Functions inherited from comma::ARComputer< IndexT, RealT, IntT >
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 $ \sqrt[dim](vol(CC)) $), or an approximation of it where the numerator and denominator are raised to certain powers (instead of taking roots) to ensure non-dimensionality. More...
 
- Protected Attributes inherited from comma::ARComputer< IndexT, RealT, IntT >
std::shared_ptr< Dual_Graph< IndexT, RealT, IntT > > _graph
 Dual_Graph object determining Fine cells graph and hence the connectivity. More...
 

Detailed Description

template<typename IndexT, typename RealT, typename IntT, unsigned int dim>
class comma::ARMaxBaryDistanceOverRadius< IndexT, RealT, IntT, dim >

ARComputer. Here, AR is the ratio of the maximum over minimum distance of the cell centers from the barycenter (computed as weighted average of centers). If a cell is totally internal, it won't be included in the computations.

Template Parameters
IndexTtype used for indices
RealTtype used for features
IntTtype used for integers (e.g., number of cells, faces,...)
dimdimension of the problem (e.g., 1-, 2-, 3D,...)

Constructor & Destructor Documentation

◆ ARMaxBaryDistanceOverRadius()

template<typename IndexT , typename RealT , typename IntT , unsigned int dim>
comma::ARMaxBaryDistanceOverRadius< IndexT, RealT, IntT, dim >::ARMaxBaryDistanceOverRadius ( std::shared_ptr< Dual_Graph< IndexT, RealT, IntT > >  graph)
inlineexplicit

Constructor.

Parameters
[in]graphDual_Graph object that determines the connectivity null

◆ ~ARMaxBaryDistanceOverRadius()

template<typename IndexT , typename RealT , typename IntT , unsigned int dim>
comma::ARMaxBaryDistanceOverRadius< IndexT, RealT, IntT, dim >::~ARMaxBaryDistanceOverRadius ( )
overridedefault

Destructor.

Member Function Documentation

◆ compute_and_update_features()

template<typename IndexT , typename RealT , typename IntT , unsigned int dim>
void comma::ARMaxBaryDistanceOverRadius< IndexT, RealT, IntT, dim >::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
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.

Parameters
[in]i_fcIndex of the fine cell to add to the coarse cell
[in]cc_featsFeatures of the current coarse cell
[in]fc_of_ccIndex of the fine cells already agglomerated in the coarse cell
[out]shared_facesNumber of faces shared by the fine cell with the current coarse cell
[out]aspect_ratioAspect-Ratio of the (final) coarse cell
[out]new_featsFeatures of the (final) coarse cell
Note
The returned AR might not exactly the above-mentioned ration but a similar one where numerator and denominator are raised to certain powers (instead of their roots) as to ensure non-dimensionality

Implements comma::ARComputer< IndexT, RealT, IntT >.


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