Peano
Loading...
Searching...
No Matches
CustomCellWeight.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
6
7#include "tarch/logging/Log.h"
9
10#include <map>
11
12
13namespace toolbox {
14 namespace loadbalancing {
15 namespace metrics {
16 class CustomCellWeight;
17 }
18 }
19}
20
21
30 public:
32 virtual ~CustomCellWeight() = default;
33
34 virtual std::string toString() const override;
35
49 virtual void updateGlobalView() override;
50
58 virtual double getCostOfLocalTree(int spacetreeNumber) const override;
59
67 static void logCellWeight( int spacetreeNumber, double weight );
68 private:
71
76 static std::map<int, double> _previousCellWeights;
77
85 static std::map<int, double> _currentCellWeights;
86};
87
Log Device.
Definition Log.h:516
Cost metrics based solely on cell counts.
virtual double getCostOfLocalTree(int spacetreeNumber) const override
Implementation of abstract superclass routine.
static void logCellWeight(int spacetreeNumber, double weight)
Report weight of one cell.
static std::map< int, double > _previousCellWeights
Mapping of trees onto cell weights.
static tarch::multicore::BooleanSemaphore _semaphore
static std::map< int, double > _currentCellWeights
Mapping of trees onto cell weights.
virtual void updateGlobalView() override
Update global view.
virtual std::string toString() const override
Feel free to invoke the variant below if you want.