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

ARComputer. Here, AR is the ratio of the diameter over the smallest edge. More...

#include <ARComputer.h>

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

Public Member Functions

 ARDiamOverMinEdge (std::shared_ptr< Dual_Graph< IndexT, RealT, IntT > > graph)
 Constructor. More...
 
 ~ARDiamOverMinEdge () 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>
class comma::ARDiamOverMinEdge< IndexT, RealT, IntT >

ARComputer. Here, AR is the ratio of the diameter over the smallest edge.

Template Parameters
IndexTtype used for indices
RealTtype used for features
IntTtype used for integers (e.g., number of cells, faces,...)

Constructor & Destructor Documentation

◆ ARDiamOverMinEdge()

template<typename IndexT , typename RealT , typename IntT >
comma::ARDiamOverMinEdge< IndexT, RealT, IntT >::ARDiamOverMinEdge ( std::shared_ptr< Dual_Graph< IndexT, RealT, IntT > >  graph)
inlineexplicit

Constructor.

Parameters
[in]graphDual_Graph object that determines the connectivity

◆ ~ARDiamOverMinEdge()

template<typename IndexT , typename RealT , typename IntT >
comma::ARDiamOverMinEdge< IndexT, RealT, IntT >::~ARDiamOverMinEdge ( )
overridedefault

Destructor.

Member Function Documentation

◆ compute_and_update_features()

template<typename IndexT , typename RealT , typename IntT >
void comma::ARDiamOverMinEdge< IndexT, RealT, IntT >::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

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


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