Peano
Loading...
Searching...
No Matches
CellCount.cpp
Go to the documentation of this file.
1
#include "
CellCount.h
"
2
3
4
#include "
peano4/parallel/SpacetreeSet.h
"
5
6
7
toolbox::loadbalancing::metrics::CellCount::CellCount
() {
8
9
}
10
11
12
std::string
toolbox::loadbalancing::metrics::CellCount::toString
()
const
{
13
return
CostMetrics::toString
(
"cell-count"
);
14
}
15
16
17
void
toolbox::loadbalancing::metrics::CellCount::updateGlobalView
() {
18
_localRankWeight =
peano4::parallel::SpacetreeSet::getInstance
().
getGridStatistics
().
getNumberOfLocalUnrefinedCells
();
19
CostMetrics::updateGlobalView
();
20
}
21
22
double
toolbox::loadbalancing::metrics::CellCount::getCostOfLocalTree
(
int
spacetreeNumber)
const
{
23
return
peano4::parallel::SpacetreeSet::getInstance
().
getGridStatistics
(spacetreeNumber).
getNumberOfLocalUnrefinedCells
();
24
}
CellCount.h
SpacetreeSet.h
peano4::parallel::SpacetreeSet::getGridStatistics
peano4::grid::GridStatistics getGridStatistics() const
Return statistics object for primary spacetree.
Definition
SpacetreeSet.cpp:707
peano4::parallel::SpacetreeSet::getInstance
static SpacetreeSet & getInstance()
Definition
SpacetreeSet.cpp:30
toolbox::loadbalancing::CostMetrics::updateGlobalView
virtual void updateGlobalView()
Please overwrite in subclass and set the value of _localRankWeight.
Definition
CostMetrics.cpp:68
toolbox::loadbalancing::CostMetrics::toString
virtual std::string toString() const =0
Feel free to invoke the variant below if you want.
toolbox::loadbalancing::metrics::CellCount::toString
virtual std::string toString() const override
Feel free to invoke the variant below if you want.
Definition
CellCount.cpp:12
toolbox::loadbalancing::metrics::CellCount::CellCount
CellCount()
Definition
CellCount.cpp:7
toolbox::loadbalancing::metrics::CellCount::updateGlobalView
virtual void updateGlobalView() override
Please overwrite in subclass and set the value of _localRankWeight.
Definition
CellCount.cpp:17
toolbox::loadbalancing::metrics::CellCount::getCostOfLocalTree
virtual double getCostOfLocalTree(int spacetreeNumber) const override
Query cost of one tree.
Definition
CellCount.cpp:22
peano4::grid::GridStatistics::getNumberOfLocalUnrefinedCells
int getNumberOfLocalUnrefinedCells() const
Definition
GridStatistics.cpp:39
src
toolbox
loadbalancing
metrics
CellCount.cpp
Generated on Thu Mar 6 2025 23:03:39 for Peano by
1.10.0