![]() |
CoMMA 1.3.2
A geometric agglomerator for unstructured meshes
|
Class representing the neighbourhood of a given cell in the graph. Mind that no information about the element being already agglomerated or not is known here. More...
#include <Neighbourhood.h>
Public Types | |
| using | CoMMAPairType = std::pair< CoMMAIndexType, CoMMAWeightType > |
| Type of pair. More... | |
| using | CoMMASetOfPairType = std::set< CoMMAPairType, CustomPairGreaterFunctor< CoMMAPairType > > |
| Type of set of pairs. More... | |
| using | CoMMAPairFindFirstBasedType = PairFindFirstBasedFunctor< CoMMAPairType > |
| Functor used if find-like function relying only on first element of the pair. More... | |
| using | CandidatesContainerType = std::deque< CoMMAIndexType > |
| Type for container of candidates. More... | |
| using | ContainerIndexType = std::vector< CoMMAIndexType > |
| Type for containers of indices. More... | |
| using | ContainerIndexConstIt = typename ContainerIndexType::const_iterator |
| Type for constant iterators of containers of indices. More... | |
Public Member Functions | |
| Neighbourhood (const std::unordered_set< CoMMAIndexType > &s_neighbours_of_seed, const std::vector< CoMMAWeightType > &weights) | |
| Constructor. More... | |
| Neighbourhood (const Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > &other)=default | |
| Copy constructor. More... | |
| virtual | ~Neighbourhood ()=default |
| Destructor. More... | |
| void | update (const CoMMAIndexType new_fc, const ContainerIndexType &new_neighbours) |
Method that updates the neighbourhood. Given the new_fc, if is in the neighbours, it is deleted. Then, the new neighbours are added as candidates. More... | |
| virtual void | update_it (const CoMMAIndexType new_fc, ContainerIndexConstIt neighs_begin, ContainerIndexConstIt neighs_end)=0 |
Method that updates the neighbourhood. Given the new_fc, if is in the neighbours, it is deleted. Then, the new neighbours are added as candidates. More... | |
| const CandidatesContainerType & | get_candidates () const |
| Get candidates that should be consider in the next step of the agglomeration. More... | |
Protected Member Functions | |
| void | extract_and_update_candidates (const CoMMASetOfPairType &candidates_w_weights) |
| Extract the indices from a list of index-weight pairs and add them at the back of the candidates list. More... | |
Protected Attributes | |
| const std::unordered_set< CoMMAIndexType > | _s_neighbours_of_seed |
| Set of the neighbours of seed given as an input in the constructor. Here, we can find all the neighbours of order up to a user-defined value of the initial seed. Hence, it holds the cells allowed to be agglomerated. More... | |
| const std::vector< CoMMAWeightType > & | _weights |
| Priority weights. More... | |
| std::unordered_set< CoMMAIndexType > | _s_fc |
| Set of the fine cells composing the coarse cell. More... | |
| CandidatesContainerType | _candidates |
| Candidates that should be considered when choosing the next fine cell to add to the coarse one. More... | |
Class representing the neighbourhood of a given cell in the graph. Mind that no information about the element being already agglomerated or not is known here.
| 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 |
| using comma::Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::CandidatesContainerType = std::deque<CoMMAIndexType> |
Type for container of candidates.
| using comma::Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::CoMMAPairFindFirstBasedType = PairFindFirstBasedFunctor<CoMMAPairType> |
Functor used if find-like function relying only on first element of the pair.
| using comma::Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::CoMMAPairType = std::pair<CoMMAIndexType, CoMMAWeightType> |
Type of pair.
| using comma::Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::CoMMASetOfPairType = std::set<CoMMAPairType, CustomPairGreaterFunctor<CoMMAPairType> > |
Type of set of pairs.
| using comma::Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::ContainerIndexConstIt = typename ContainerIndexType::const_iterator |
Type for constant iterators of containers of indices.
| using comma::Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::ContainerIndexType = std::vector<CoMMAIndexType> |
Type for containers of indices.
|
inline |
Constructor.
| [in] | s_neighbours_of_seed | Set of the neighbours of the given cell chosen as seed |
| [in] | weights | Weights used to set up the order of the neighbours to visit |
|
default |
Copy constructor.
|
virtualdefault |
Destructor.
|
inlineprotected |
Extract the indices from a list of index-weight pairs and add them at the back of the candidates list.
|
inline |
Get candidates that should be consider in the next step of the agglomeration.
|
inline |
Method that updates the neighbourhood. Given the new_fc, if is in the neighbours, it is deleted. Then, the new neighbours are added as candidates.
| [in] | new_fc | Index of the new fine cell to be added to the set of fine cells |
| [in] | new_neighbours | Vector of the new neighbours to be analysed |
|
pure virtual |
Method that updates the neighbourhood. Given the new_fc, if is in the neighbours, it is deleted. Then, the new neighbours are added as candidates.
| [in] | new_fc | Index of the new fine cell to be added to the set of fine cells |
| [in] | neighs_begin | Constant iterator giving the beginning of the neighbours |
| [in] | neighs_end | Constant iterator giving the end of the neighbours |
Implemented in comma::Neighbourhood_Extended< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >, and comma::Neighbourhood_Pure_Front< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >.
|
protected |
Candidates that should be considered when choosing the next fine cell to add to the coarse one.
|
protected |
Set of the fine cells composing the coarse cell.
|
protected |
Set of the neighbours of seed given as an input in the constructor. Here, we can find all the neighbours of order up to a user-defined value of the initial seed. Hence, it holds the cells allowed to be agglomerated.
|
protected |
Priority weights.