xc
Public Member Functions | List of all members
XC::ReleaseHeavierToLighterNeighbours Class Reference

A ReleaseHeavierToLighterNeighbours is an object used to balance a PartitionedDomain. More...

#include <ReleaseHeavierToLighterNeighbours.h>

Inheritance diagram for XC::ReleaseHeavierToLighterNeighbours:
XC::LoadBalancer

Public Member Functions

 ReleaseHeavierToLighterNeighbours (void)
 Default constructor.
 
 ReleaseHeavierToLighterNeighbours (double factorGreater, int numReleases, bool disallowDissconnectedGraph)
 Constructor. More...
 
virtual int balance (Graph &theWeightedGraph)
 For numRelease times the Vertices of theWeightedGraph are iterated through. More...
 
- Public Member Functions inherited from XC::LoadBalancer
 LoadBalancer (void)
 Default constructor.
 
 LoadBalancer (double factGreater, int releases, bool disallowDisconnected=true)
 Constructor. More...
 
virtual void setLinks (DomainPartitioner &thePartitioner)
 Sets the pointer to the DomainPartitioner object associated with the LoadBalancer to point to thePartitioner. More...
 

Additional Inherited Members

- Protected Member Functions inherited from XC::LoadBalancer
DomainPartitionergetDomainPartitioner (void)
 Returns a pointer to the DomainPartitioner. More...
 
- Protected Attributes inherited from XC::LoadBalancer
int numReleases
 
double factorGreater
 number of releases.
 
bool disallowDisconnectedGraphs
 

Detailed Description

A ReleaseHeavierToLighterNeighbours is an object used to balance a PartitionedDomain.

It does this by shedding the boundary vertices on the heaviest loaded partition (subdomain).

Constructor & Destructor Documentation

§ ReleaseHeavierToLighterNeighbours()

XC::ReleaseHeavierToLighterNeighbours::ReleaseHeavierToLighterNeighbours ( double  fG,
int  rels,
bool  disallowDisconnected 
)

Constructor.

Parameters
fGfactor greater.
relsnumber of releases.

Member Function Documentation

§ balance()

int XC::ReleaseHeavierToLighterNeighbours::balance ( Graph theWeightedGraph)
virtual

For numRelease times the Vertices of theWeightedGraph are iterated through.

For each Vertex, \(i\), {releaseBoundary(i, theWeightedGraph, true, factorGreater)} is invoked on the DomainPartitioner. Returns \(0\) if succesfull, otherwise a negative number and a warning message are returned if either no link has been set to the DomainPartitioner or releaseBoundary() returns a negative number.

Implements XC::LoadBalancer.


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