This class implements a diffusive algorithm for load balancing.
All algorithms are implemented to work levelwise. Load balancing with levels ignored is possible by specifying levelwise = false in the constructor.
#include <DynamicDiffusive.h>
Public Types | |
enum | Mode { DIFFUSION_PUSH, DIFFUSION_PULL, DIFFUSION_PUSHPULL } |
Public Member Functions | |
DynamicDiffusionBalance (const uint_t maxIterations, const uint_t flowIterations, const bool levelwise=true) | |
void | setMode (const Mode mode) |
Mode | getMode () const |
void | setMaxIterations (const uint_t maxIterations) |
uint_t | getMaxIterations () const |
void | defineProcessWeightLimitByMultipleOfMaxBlockWeight (const bool b) |
bool | defineProcessWeightLimitByMultipleOfMaxBlockWeight () const |
void | checkForEarlyAbort (const bool check, const double abortThreshold=1.0) |
bool | checkForEarlyAbort () const |
void | adaptOutflowWithGlobalInformation (const bool adapt) |
bool | adaptOutflowWithGlobalInformation () const |
void | adaptInflowWithGlobalInformation (const bool adapt) |
bool | adaptInflowWithGlobalInformation () const |
void | setFlowIterations (const uint_t flowIterations) |
uint_t | getFlowIterations () const |
void | setDynamicFlowIterationsIncrease (const uint_t startingBalanceIteration, const double increasePerBalanceIteration) |
void | regardConnectivity (const bool c) |
bool | regardConnectivity () const |
void | disregardConnectivity (const uint_t startingBalanceIteration) |
void | setOutflowExceedFactor (const double f) |
double | getOutflowExceedFactor () const |
void | setInflowExceedFactor (const double f) |
double | getInflowExceedFactor () const |
bool | operator() (std::vector< std::pair< const PhantomBlock *, uint_t > > &targetProcess, std::set< uint_t > &processesToRecvFrom, const PhantomBlockForest &phantomForest, const uint_t iteration) |
Private Member Functions | |
double | weight (const PhantomBlock *block) const |
Private Attributes | |
Mode | mode_ |
uint_t | maxIterations_ |
bool | defineProcessWeightLimitByMultipleOfMaxBlockWeight_ |
bool | checkForEarlyAbort_ |
double | abortThreshold_ |
bool | adaptOutflowWithGlobalInformation_ |
bool | adaptInflowWithGlobalInformation_ |
uint_t | flowIterations_ |
uint_t | flowIterationsIncreaseStart_ |
double | flowIterationsIncrease_ |
bool | regardConnectivity_ |
uint_t | disregardConnectivityStart_ |
double | outflowExceedFactor_ |
double | inflowExceedFactor_ |
math::IntRandom< uint_t > | random_ |
bool | levelwise_ |
All gets for levels are wrapped like. More... | |
enum walberla::blockforest::DynamicDiffusionBalance::Mode |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool walberla::blockforest::DynamicDiffusionBalance< PhantomData_T >::operator() | ( | std::vector< std::pair< const PhantomBlock *, uint_t > > & | targetProcess, |
std::set< uint_t > & | processesToRecvFrom, | ||
const PhantomBlockForest & | phantomForest, | ||
const uint_t | iteration | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
All gets for levels are wrapped like.
This allows to use the same algorithm for levelwise balancing as well as for balancing without levels.
|
private |
|
private |
|
private |
|
private |
|
private |