Peano
Loading...
Searching...
No Matches
Configuration.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
6#include "State.h"
7#include "peano4/grid/grid.h"
8
9
10namespace toolbox {
11 namespace loadbalancing {
12 class Configuration;
13 class DefaultConfiguration;
14 }
15}
16
17
29 public:
30 virtual ~Configuration() = default;
31
37 virtual bool makeSplitDependOnMemory(State state) = 0;
38
48 virtual int getMaxLocalTreesPerRank(State state) = 0;
49
53 virtual double getWorstCaseBalancingRatio(State state) = 0;
54
56
60 virtual int getMinTreeSize(State state) = 0;
61
62 virtual std::string toString() const;
63};
64
65
67 private:
69 public:
76 DefaultConfiguration(int maxTreesPerRank=0);
77
78 virtual bool makeSplitDependOnMemory(State state) override;
79
80 virtual int getMaxLocalTreesPerRank(State state) override;
81
82 virtual double getWorstCaseBalancingRatio(State state) override;
83
84 virtual int getMinTreeSize(State state) override;
85
87};
Abstract interface to tweak the behaviour of the recursive subdivision.
virtual peano4::SplitInstruction::Mode getMode(State state)=0
virtual int getMaxLocalTreesPerRank(State state)=0
Constraint on the number of trees per rank.
virtual std::string toString() const
virtual double getWorstCaseBalancingRatio(State state)=0
Control when to balance between ranks.
virtual int getMinTreeSize(State state)=0
Minimum tree size.
virtual bool makeSplitDependOnMemory(State state)=0
Use the operating system's memory queries to get the memory out and to veto too many local splits.
virtual int getMinTreeSize(State state) override
Minimum tree size.
virtual peano4::SplitInstruction::Mode getMode(State state) override
virtual int getMaxLocalTreesPerRank(State state) override
Constraint on the number of trees per rank.
DefaultConfiguration(int maxTreesPerRank=0)
Create default configuration.
virtual double getWorstCaseBalancingRatio(State state) override
Control when to balance between ranks.
virtual bool makeSplitDependOnMemory(State state) override
Use the operating system's memory queries to get the memory out and to veto too many local splits.
State
State descriptor of load balancing.
Definition State.h:22