MADNESS 0.10.1
Classes | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
madness::LoadBalanceDeux< NDIM > Class Template Reference

#include <lbdeux.h>

Collaboration diagram for madness::LoadBalanceDeux< NDIM >:
Collaboration graph
[legend]

Classes

struct  add_op
 
struct  CostPerProc
 

Public Member Functions

 LoadBalanceDeux (World &world)
 
template<typename T , typename costT >
void add_tree (const Function< T, NDIM > &f, const costT &costfn, bool fence=false)
 Accumulates cost from a function.
 
std::shared_ptr< WorldDCPmapInterface< keyT > > load_balance (double fac=1.0, bool printstuff=false)
 Actually does the partitioning of the tree.
 
void print_tree (const keyT &key=keyT(0))
 Printing for the curious.
 

Private Types

typedef treeT::const_iterator const_iteratorT
 
typedef treeT::iterator iteratorT
 
typedef Key< NDIMkeyT
 
typedef LBNodeDeux< NDIMnodeT
 
typedef WorldContainer< keyT, nodeTtreeT
 

Private Member Functions

double sum ()
 Sums costs up the tree returning to everyone the total cost.
 

Static Private Member Functions

static bool compare (const std::pair< keyT, double > &a, const std::pair< keyT, double > &b)
 Used to sort results into descending order.
 

Private Attributes

treeT tree
 
Worldworld
 

Member Typedef Documentation

◆ const_iteratorT

template<std::size_t NDIM>
typedef treeT::const_iterator madness::LoadBalanceDeux< NDIM >::const_iteratorT
private

◆ iteratorT

template<std::size_t NDIM>
typedef treeT::iterator madness::LoadBalanceDeux< NDIM >::iteratorT
private

◆ keyT

template<std::size_t NDIM>
typedef Key<NDIM> madness::LoadBalanceDeux< NDIM >::keyT
private

◆ nodeT

template<std::size_t NDIM>
typedef LBNodeDeux<NDIM> madness::LoadBalanceDeux< NDIM >::nodeT
private

◆ treeT

template<std::size_t NDIM>
typedef WorldContainer<keyT,nodeT> madness::LoadBalanceDeux< NDIM >::treeT
private

Constructor & Destructor Documentation

◆ LoadBalanceDeux()

template<std::size_t NDIM>
madness::LoadBalanceDeux< NDIM >::LoadBalanceDeux ( World world)
inline

Member Function Documentation

◆ add_tree()

template<std::size_t NDIM>
template<typename T , typename costT >
void madness::LoadBalanceDeux< NDIM >::add_tree ( const Function< T, NDIM > &  f,
const costT &  costfn,
bool  fence = false 
)
inline

◆ compare()

template<std::size_t NDIM>
static bool madness::LoadBalanceDeux< NDIM >::compare ( const std::pair< keyT, double > &  a,
const std::pair< keyT, double > &  b 
)
inlinestaticprivate

Used to sort results into descending order.

References a, and b.

Referenced by madness::LoadBalanceDeux< NDIM >::load_balance().

◆ load_balance()

template<std::size_t NDIM>
std::shared_ptr< WorldDCPmapInterface< keyT > > madness::LoadBalanceDeux< NDIM >::load_balance ( double  fac = 1.0,
bool  printstuff = false 
)
inline

◆ print_tree()

template<std::size_t NDIM>
void madness::LoadBalanceDeux< NDIM >::print_tree ( const keyT key = keyT(0))
inline

◆ sum()

template<std::size_t NDIM>
double madness::LoadBalanceDeux< NDIM >::sum ( )
inlineprivate

Member Data Documentation

◆ tree

template<std::size_t NDIM>
treeT madness::LoadBalanceDeux< NDIM >::tree
private

◆ world

template<std::size_t NDIM>
World& madness::LoadBalanceDeux< NDIM >::world
private

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