walberla::blockforest::WeightAssignmentFunctor Class Reference

Detailed Description

General assignment functor for load balancing.

Uses BlockInfo::computationalWeight as PhantomBlockWeight

#include <WeightAssignmentFunctor.h>

Public Types

using PhantomBlockWeight = walberla::blockforest::PODPhantomWeight< double >
 Convenience typedef to be used as PhantomBlock weight in conjunction with this weight assignment functor. More...
 
using PhantomBlockWeightPackUnpackFunctor = walberla::blockforest::PODPhantomWeightPackUnpack< double >
 Convenience typedef for pack and unpack functions to be used in conjunction with PhantomBlockWeight. More...
 

Public Member Functions

 WeightAssignmentFunctor (shared_ptr< blockforest::InfoCollection > &ic, const real_t baseWeight=real_t(10.0))
 
void operator() (std::vector< std::pair< const PhantomBlock *, walberla::any > > &blockData, const PhantomBlockForest &)
 
void setBaseWeight (const double weight)
 
double getBaseWeight () const
 

Private Attributes

shared_ptr< blockforest::InfoCollectionic_
 
double baseWeight_ = real_t(10.0)
 Base weight due to allocated data structures. A weight of zero for blocks is dangerous as empty blocks might accumulate on one process! More...
 

Member Typedef Documentation

◆ PhantomBlockWeight

Convenience typedef to be used as PhantomBlock weight in conjunction with this weight assignment functor.

◆ PhantomBlockWeightPackUnpackFunctor

Convenience typedef for pack and unpack functions to be used in conjunction with PhantomBlockWeight.

Constructor & Destructor Documentation

◆ WeightAssignmentFunctor()

walberla::blockforest::WeightAssignmentFunctor::WeightAssignmentFunctor ( shared_ptr< blockforest::InfoCollection > &  ic,
const real_t  baseWeight = real_t(10.0) 
)
inline

Member Function Documentation

◆ getBaseWeight()

double walberla::blockforest::WeightAssignmentFunctor::getBaseWeight ( ) const
inline

◆ operator()()

void walberla::blockforest::WeightAssignmentFunctor::operator() ( std::vector< std::pair< const PhantomBlock *, walberla::any > > &  blockData,
const PhantomBlockForest  
)
inline

◆ setBaseWeight()

void walberla::blockforest::WeightAssignmentFunctor::setBaseWeight ( const double  weight)
inline

Member Data Documentation

◆ baseWeight_

double walberla::blockforest::WeightAssignmentFunctor::baseWeight_ = real_t(10.0)
private

Base weight due to allocated data structures. A weight of zero for blocks is dangerous as empty blocks might accumulate on one process!

◆ ic_

shared_ptr<blockforest::InfoCollection> walberla::blockforest::WeightAssignmentFunctor::ic_
private

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