OOFEM 3.0
Loading...
Searching...
No Matches
oofem::LoadBalancerMonitor Class Referenceabstract

#include <loadbalancer.h>

Inheritance diagram for oofem::LoadBalancerMonitor:
Collaboration diagram for oofem::LoadBalancerMonitor:

Public Types

enum  LoadBalancerDecisionType { LBD_CONTINUE , LBD_RECOVER }

Public Member Functions

 LoadBalancerMonitor (EngngModel *em)
virtual ~LoadBalancerMonitor ()
virtual void initializeFrom (InputRecord &ir)
 Initializes receiver according to object description stored in input record.
Load evaluation and imbalance detection methods
virtual LoadBalancerDecisionType decide (TimeStep *)=0
 Returns flag indicating whether rebalancing is necessary; should update node weights as well.
const FloatArraygiveProcessorWeights ()
 Returns processor weights; the larger weight means more powerful node, sum of weights should equal to one.
virtual const char * giveClassName () const =0
 Returns class name of the receiver.

Protected Attributes

EngngModelemodel
FloatArray nodeWeights
bool staticNodeWeightFlag

Detailed Description

Abstract base class representing general load balancer monitor. The task of the monitor is to detect the imbalance and to make the decision, whether to redistribute the work or to continue with existing partitioning. It provides partition weights, reflecting their relative computational performance. These weights should be continuously updated to reflect changing work load during solution process.

Definition at line 68 of file loadbalancer.h.

Member Enumeration Documentation

◆ LoadBalancerDecisionType

Enumerator
LBD_CONTINUE 
LBD_RECOVER 

Definition at line 75 of file loadbalancer.h.

Constructor & Destructor Documentation

◆ LoadBalancerMonitor()

oofem::LoadBalancerMonitor::LoadBalancerMonitor ( EngngModel * em)
inline

Definition at line 77 of file loadbalancer.h.

References emodel.

Referenced by oofem::WallClockLoadBalancerMonitor::WallClockLoadBalancerMonitor().

◆ ~LoadBalancerMonitor()

virtual oofem::LoadBalancerMonitor::~LoadBalancerMonitor ( )
inlinevirtual

Definition at line 78 of file loadbalancer.h.

Member Function Documentation

◆ decide()

virtual LoadBalancerDecisionType oofem::LoadBalancerMonitor::decide ( TimeStep * )
pure virtual

Returns flag indicating whether rebalancing is necessary; should update node weights as well.

Implemented in oofem::WallClockLoadBalancerMonitor.

◆ giveClassName()

virtual const char * oofem::LoadBalancerMonitor::giveClassName ( ) const
pure virtual

Returns class name of the receiver.

Implemented in oofem::WallClockLoadBalancerMonitor.

◆ giveProcessorWeights()

const FloatArray & oofem::LoadBalancerMonitor::giveProcessorWeights ( )
inline

Returns processor weights; the larger weight means more powerful node, sum of weights should equal to one.

Definition at line 88 of file loadbalancer.h.

References nodeWeights.

Referenced by oofem::ParmetisLoadBalancer::calculateLoadTransfer().

◆ initializeFrom()

void oofem::LoadBalancerMonitor::initializeFrom ( InputRecord & ir)
virtual

Initializes receiver according to object description stored in input record.

Reimplemented in oofem::WallClockLoadBalancerMonitor.

Definition at line 548 of file loadbalancer.C.

References _IFT_LoadBalancerMonitor_initialnodeweights, _IFT_LoadBalancerMonitor_nodeWeightMode, emodel, IR_GIVE_OPTIONAL_FIELD, nodeWeights, OOFEM_ERROR, and staticNodeWeightFlag.

Member Data Documentation

◆ emodel

EngngModel* oofem::LoadBalancerMonitor::emodel
protected

◆ nodeWeights

FloatArray oofem::LoadBalancerMonitor::nodeWeights
protected

◆ staticNodeWeightFlag

bool oofem::LoadBalancerMonitor::staticNodeWeightFlag
protected

Definition at line 73 of file loadbalancer.h.

Referenced by oofem::WallClockLoadBalancerMonitor::decide(), and initializeFrom().


The documentation for this class was generated from the following files:

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011