|
Peano
|
Cost metrics based solely on cell counts. More...
#include <CellCount.h>


Public Member Functions | |
| CellCount () | |
| virtual | ~CellCount ()=default |
| virtual std::string | toString () const override |
| Feel free to invoke the variant below if you want. | |
| virtual void | updateGlobalView () override |
| Please overwrite in subclass and set the value of _localRankWeight. | |
| virtual double | getCostOfLocalTree (int spacetreeNumber) const override |
| Query cost of one tree. | |
Public Member Functions inherited from toolbox::loadbalancing::CostMetrics | |
| CostMetrics () | |
| virtual | ~CostMetrics ()=default |
| std::string | toString (const std::string &metricName) const |
| virtual double | getCostOfLocalRank () const |
| Wrapper around getCostOfLocalTree(). | |
| virtual double | getGlobalCost () const |
| virtual int | getLightestRank () const |
| virtual double | getMinimumOfMaximumRankWeights () const |
Additional Inherited Members | |
Protected Attributes inherited from toolbox::loadbalancing::CostMetrics | |
| double | _localRankWeight |
| Weight of local rank. | |
| double | _globalWeight |
| ReductionBuffer | _lightestRank |
| double | _minimumOfMaximumOfRankWeights |
Cost metrics based solely on cell counts.
This is a very simple implementations which basically is based upon the mesh statistics that we have anyway. So the metrics do not require further user input.
Definition at line 23 of file CellCount.h.
| toolbox::loadbalancing::metrics::CellCount::CellCount | ( | ) |
|
virtualdefault |
|
overridevirtual |
Query cost of one tree.
This routine is only called by the rank which owns the tree spacetreeNumber. That is, you don't need global knowledge of the tree weight distribution.
The routine is used in multiple places, but the most important one is toolbox::loadbalancing::AbstractLoadBalancing::getIdOfHeaviestLocalSpacetree(), which analyses the whole tree cost distribution on a rank.
Implements toolbox::loadbalancing::CostMetrics.
|
overridevirtual |
Feel free to invoke the variant below if you want.
Or add additional info.
Implements toolbox::loadbalancing::CostMetrics.
|
overridevirtual |
Please overwrite in subclass and set the value of _localRankWeight.
Afterwards, call this superclass routine
The superclass routine all-reduces the global weight, the lightest rank and the minimum of the rank weights over all ranks through tarch::mpi::Rank::allReduce(). The reduction is blocking, i.e. all ranks hold the same values once the routine has terminated. The routine hence has to be called by all ranks at the same time, and only by one thread per rank.
Reimplemented from toolbox::loadbalancing::CostMetrics.