Class representing the pool of all the seeds for creating a coarse cell. This derived class gives higher priority to cells that are neighbours of already existing coarse cells.
More...
|
| Seeds_Pool_Neighbourhood_Priority (const std::vector< CoMMAIntType > &n_bnd_faces, const std::vector< CoMMAWeightType > &priority_weights, const bool one_point_init) |
| Constructor. More...
|
|
| ~Seeds_Pool_Neighbourhood_Priority () override=default |
| Destructor. More...
|
|
std::optional< CoMMAIndexType > | choose_new_seed (const std::vector< bool > &is_agglomerated) override |
| Choose a new seed in the pool. More...
|
|
void | update (const std::deque< CoMMAIndexType > &new_seeds) override |
| Add the provided seeds to a seeds pool queue according to the number of boundary faces. More...
|
|
void | order_new_seeds_and_update (const std::unordered_set< CoMMAIndexType > &new_seeds) override |
| Add the provided seeds to a seeds pool queue according to the number of boundary faces. The seeds will be ordered considering their priority weights before being added to the queue. More...
|
|
bool | need_initialization (const std::vector< bool > &is_agglomerated) override |
| Whether the seeds pool need to be initialized. More...
|
|
| Seeds_Pool (const std::vector< CoMMAIntType > &n_bnd_faces, const std::vector< CoMMAWeightType > &priority_weights, const bool one_point_init) |
| Constructor. More...
|
|
virtual | ~Seeds_Pool ()=default |
| Destructor. More...
|
|
std::optional< CoMMAIndexType > | spoil_queue (const std::vector< bool > &is_fc_agglomerated, CoMMAQueueType &queue) |
| Spoil a queue looking for an not-yet-agglomerated seed. More...
|
|
virtual std::optional< CoMMAIndexType > | choose_new_seed (const std::vector< bool > &is_agglomerated)=0 |
| Choose a new seed in the pool. More...
|
|
virtual void | update (const std::deque< CoMMAIndexType > &new_seeds)=0 |
| Add the provided seeds to a seeds pool queue according to the number of boundary faces. More...
|
|
virtual void | order_new_seeds_and_update (const std::unordered_set< CoMMAIndexType > &new_seeds)=0 |
| Add the provided seeds to a seeds pool queue according to the number of boundary faces. The seeds will be ordered considering their priority weights before being added to the queue. More...
|
|
void | build_queue (const std::vector< bool > &is_fc_agglomerated, const CoMMAIntType target) |
| Build the weight-ordered queue of seed for a given target level. A set of (index, weight) pair with special comparator is used to enforced order, then the indices are extracted. More...
|
|
std::optional< CoMMAIntType > | get_highest_n_bnd_yet_to_agglomerate (const std::vector< bool > &is_fc_agglomerated, const CoMMAIntType expected_max=CoMMACellT::CORNER) const |
| Compute the highest number of boundary faces of cells which are not agglomerated yet. More...
|
|
bool | is_empty (CoMMAIntType i_level=CoMMACellT::N_CELL_TYPES) const |
| Given the default levels we define if the list of the targeted level is empty. More...
|
|
virtual bool | need_initialization (const std::vector< bool > &is_agglomerated)=0 |
| Whether the seeds pool need to be initialized. More...
|
|
void | initialize () |
| Initialize the seeds pool via a call to its initializator. More...
|
|
void | set_top_queue (const CoMMAIntType q_lvl) |
| Setter for the top queue member. More...
|
|
template<typename CoMMAIndexType, typename CoMMAWeightType, typename CoMMAIntType>
class comma::Seeds_Pool_Neighbourhood_Priority< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >
Class representing the pool of all the seeds for creating a coarse cell. This derived class gives higher priority to cells that are neighbours of already existing coarse 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 |