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
5
#include "
toolbox/loadbalancing/CostMetrics.h
"
6
7
#include "
tarch/logging/Log.h
"
8
#include "
tarch/multicore/BooleanSemaphore.h
"
9
10
#include <map>
11
12
13
namespace
toolbox
{
14
namespace
loadbalancing {
15
namespace
metrics {
16
class
CustomCellWeight;
17
}
18
}
19
}
20
21
29
class
toolbox::loadbalancing::metrics::CustomCellWeight
:
public
toolbox::loadbalancing::CostMetrics
{
30
public
:
31
CustomCellWeight
();
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
:
69
static
tarch::multicore::BooleanSemaphore
_semaphore
;
70
static
tarch::logging::Log
_log
;
71
76
static
std::map<int, double>
_previousCellWeights
;
77
85
static
std::map<int, double>
_currentCellWeights
;
86
};
87
CostMetrics.h
Log.h
tarch::logging::Log
Log Device.
Definition
Log.h:516
tarch::multicore::BooleanSemaphore
Definition
BooleanSemaphore.h:21
toolbox::loadbalancing::CostMetrics
Abstract cost metric.
Definition
CostMetrics.h:32
toolbox::loadbalancing::metrics::CustomCellWeight
Cost metrics based solely on cell counts.
Definition
CustomCellWeight.h:29
toolbox::loadbalancing::metrics::CustomCellWeight::getCostOfLocalTree
virtual double getCostOfLocalTree(int spacetreeNumber) const override
Implementation of abstract superclass routine.
Definition
CustomCellWeight.cpp:40
toolbox::loadbalancing::metrics::CustomCellWeight::logCellWeight
static void logCellWeight(int spacetreeNumber, double weight)
Report weight of one cell.
Definition
CustomCellWeight.cpp:50
toolbox::loadbalancing::metrics::CustomCellWeight::_previousCellWeights
static std::map< int, double > _previousCellWeights
Mapping of trees onto cell weights.
Definition
CustomCellWeight.h:76
toolbox::loadbalancing::metrics::CustomCellWeight::CustomCellWeight
CustomCellWeight()
Definition
CustomCellWeight.cpp:16
toolbox::loadbalancing::metrics::CustomCellWeight::_semaphore
static tarch::multicore::BooleanSemaphore _semaphore
Definition
CustomCellWeight.h:69
toolbox::loadbalancing::metrics::CustomCellWeight::_log
static tarch::logging::Log _log
Definition
CustomCellWeight.h:70
toolbox::loadbalancing::metrics::CustomCellWeight::~CustomCellWeight
virtual ~CustomCellWeight()=default
toolbox::loadbalancing::metrics::CustomCellWeight::_currentCellWeights
static std::map< int, double > _currentCellWeights
Mapping of trees onto cell weights.
Definition
CustomCellWeight.h:85
toolbox::loadbalancing::metrics::CustomCellWeight::updateGlobalView
virtual void updateGlobalView() override
Update global view.
Definition
CustomCellWeight.cpp:25
toolbox::loadbalancing::metrics::CustomCellWeight::toString
virtual std::string toString() const override
Feel free to invoke the variant below if you want.
Definition
CustomCellWeight.cpp:20
BooleanSemaphore.h
toolbox
Definition
InterpolationRestriction.h:10
src
toolbox
loadbalancing
metrics
CustomCellWeight.h
Generated on Tue Mar 18 2025 20:03:30 for Peano by
1.10.0