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

#include <lbdeux.h>

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

Public Member Functions

 LBNodeDeux ()
 
 LBNodeDeux (const LBNodeDeux< NDIM > &other)
 
void add (double cost, bool got_kids)
 Accumulates cost into this node.
 
void deleter (const treeT &tree, const keyT &key)
 Logically deletes this node by setting cost to -1.
 
double get_total_cost () const
 
bool has_children () const
 
LBNodeDeux< NDIM > & operator= (const LBNodeDeux< NDIM > &other)
 
void partition (const treeT &tree, const keyT &key, double avg)
 Descends tree deleting all except internal nodes and sub-tree parents.
 
template<typename Archive >
void serialize (Archive &ar)
 
void sum (const treeT &tree, const keyT &child, double value)
 Accumulates cost up the tree from children.
 

Private Types

typedef Key< NDIMkeyT
 
typedef LBNodeDeux< NDIMnodeT
 
typedef WorldContainer< keyT, nodeTtreeT
 

Private Member Functions

int index (const keyT &key)
 Computes index of child key in this node using last bit of translations.
 

Private Attributes

double child_cost [nchild]
 
bool gotkids
 
double my_cost
 
AtomicInt nsummed
 
double total_cost
 

Static Private Attributes

static const int nchild = (1<<NDIM)
 

Member Typedef Documentation

◆ keyT

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

◆ nodeT

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

◆ treeT

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

Constructor & Destructor Documentation

◆ LBNodeDeux() [1/2]

template<std::size_t NDIM>
madness::LBNodeDeux< NDIM >::LBNodeDeux ( )
inline

◆ LBNodeDeux() [2/2]

template<std::size_t NDIM>
madness::LBNodeDeux< NDIM >::LBNodeDeux ( const LBNodeDeux< NDIM > &  other)
inline

Member Function Documentation

◆ add()

template<std::size_t NDIM>
void madness::LBNodeDeux< NDIM >::add ( double  cost,
bool  got_kids 
)
inline

◆ deleter()

template<std::size_t NDIM>
void madness::LBNodeDeux< NDIM >::deleter ( const treeT tree,
const keyT key 
)
inline

Logically deletes this node by setting cost to -1.

Cannot actually erase this node from the container since the send() handler is holding an accessor to it.

References madness::LBNodeDeux< NDIM >::has_children(), madness::LBNodeDeux< NDIM >::my_cost, task(), and madness::LBNodeDeux< NDIM >::total_cost.

◆ get_total_cost()

template<std::size_t NDIM>
double madness::LBNodeDeux< NDIM >::get_total_cost ( ) const
inline

◆ has_children()

template<std::size_t NDIM>
bool madness::LBNodeDeux< NDIM >::has_children ( ) const
inline

◆ index()

template<std::size_t NDIM>
int madness::LBNodeDeux< NDIM >::index ( const keyT key)
inlineprivate

Computes index of child key in this node using last bit of translations.

References d, and NDIM.

Referenced by madness::LBNodeDeux< NDIM >::partition(), and madness::LBNodeDeux< NDIM >::sum().

◆ operator=()

template<std::size_t NDIM>
LBNodeDeux< NDIM > & madness::LBNodeDeux< NDIM >::operator= ( const LBNodeDeux< NDIM > &  other)
inline

◆ partition()

template<std::size_t NDIM>
void madness::LBNodeDeux< NDIM >::partition ( const treeT tree,
const keyT key,
double  avg 
)
inline

◆ serialize()

template<std::size_t NDIM>
template<typename Archive >
void madness::LBNodeDeux< NDIM >::serialize ( Archive &  ar)
inline

◆ sum()

template<std::size_t NDIM>
void madness::LBNodeDeux< NDIM >::sum ( const treeT tree,
const keyT child,
double  value 
)
inline

Member Data Documentation

◆ child_cost

template<std::size_t NDIM>
double madness::LBNodeDeux< NDIM >::child_cost[nchild]
private

◆ gotkids

template<std::size_t NDIM>
bool madness::LBNodeDeux< NDIM >::gotkids
private

◆ my_cost

template<std::size_t NDIM>
double madness::LBNodeDeux< NDIM >::my_cost
private

◆ nchild

template<std::size_t NDIM>
const int madness::LBNodeDeux< NDIM >::nchild = (1<<NDIM)
staticprivate

◆ nsummed

template<std::size_t NDIM>
AtomicInt madness::LBNodeDeux< NDIM >::nsummed
private

◆ total_cost

template<std::size_t NDIM>
double madness::LBNodeDeux< NDIM >::total_cost
private

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