walberla::blockforest::DynamicParMetis Class Reference

#include <DynamicParMetis.h>

Public Types

enum  Algorithm {
  PARMETIS_PART_GEOM, PARMETIS_PART_GEOM_KWAY, PARMETIS_PART_KWAY, PARMETIS_ADAPTIVE_REPART,
  PARMETIS_REFINE_KWAY
}
 
enum  WeightsToUse { PARMETIS_NO_WEIGHTS = 0, PARMETIS_EDGE_WEIGHTS = 1, PARMETIS_VERTEX_WEIGHTS = 2, PARMETIS_BOTH_WEIGHTS = 3 }
 
enum  EdgeSource { PARMETIS_EDGES_FROM_FOREST, PARMETIS_EDGES_FROM_EDGE_WEIGHTS }
 

Public Member Functions

 DynamicParMetis (const Algorithm algorithm=PARMETIS_PART_GEOM_KWAY, const WeightsToUse weightsToUse=PARMETIS_BOTH_WEIGHTS, const EdgeSource edgeSource=PARMETIS_EDGES_FROM_EDGE_WEIGHTS, const uint_t ncon=uint_t(1))
 
bool operator() (std::vector< std::pair< const PhantomBlock *, uint_t > > &targetProcess, std::set< uint_t > &processesToRecvFrom, const PhantomBlockForest &phantomForest, const uint_t iteration) const
 
void setipc2redist (double val)
 
double getipc2redist () const
 
void setImbalanceTolerances (const std::vector< double > &tolerances)
 
void setImbalanceTolerance (double tolerance, const uint_t con=0)
 
double getImbalanceTolerance (const uint_t con=0) const
 
bool edgeWeightsUsed () const
 
bool vertexWeightsUsed () const
 
bool vertexSizeUsed () const
 
std::string algorithmToString () const
 
std::string weightsToUseToString () const
 
std::string edgeSourceToString () const
 

Static Public Member Functions

static Algorithm stringToAlgorithm (std::string s)
 
static WeightsToUse stringToWeightsToUse (std::string s)
 
static EdgeSource stringToEdgeSource (std::string s)
 

Protected Attributes

Algorithm algorithm_
 
WeightsToUse weightsToUse_
 
EdgeSource edgeSource_
 
uint_t ncon_ = uint_t(1)
 number of constraints More...
 
std::vector< double > ubvec_
 imbalance tolerance for each constraint, value between 1 (perfect balance) and number of subdomains (= number of processes, perfect imbalance) More...
 
double ipc2redist_ = real_t( 1000.0 )
 compute repartitioning with low edge cut (set lower (down to 0.000001) to get minimal repartitioning ) More...
 

Member Enumeration Documentation

◆ Algorithm

Enumerator
PARMETIS_PART_GEOM 
PARMETIS_PART_GEOM_KWAY 
PARMETIS_PART_KWAY 
PARMETIS_ADAPTIVE_REPART 
PARMETIS_REFINE_KWAY 

◆ EdgeSource

Enumerator
PARMETIS_EDGES_FROM_FOREST 
PARMETIS_EDGES_FROM_EDGE_WEIGHTS 

◆ WeightsToUse

Enumerator
PARMETIS_NO_WEIGHTS 
PARMETIS_EDGE_WEIGHTS 
PARMETIS_VERTEX_WEIGHTS 
PARMETIS_BOTH_WEIGHTS 

Constructor & Destructor Documentation

◆ DynamicParMetis()

walberla::blockforest::DynamicParMetis::DynamicParMetis ( const Algorithm  algorithm = PARMETIS_PART_GEOM_KWAY,
const WeightsToUse  weightsToUse = PARMETIS_BOTH_WEIGHTS,
const EdgeSource  edgeSource = PARMETIS_EDGES_FROM_EDGE_WEIGHTS,
const uint_t  ncon = uint_t(1) 
)
inline

Member Function Documentation

◆ algorithmToString()

std::string walberla::blockforest::DynamicParMetis::algorithmToString ( ) const

◆ edgeSourceToString()

std::string walberla::blockforest::DynamicParMetis::edgeSourceToString ( ) const

◆ edgeWeightsUsed()

bool walberla::blockforest::DynamicParMetis::edgeWeightsUsed ( ) const
inline

◆ getImbalanceTolerance()

double walberla::blockforest::DynamicParMetis::getImbalanceTolerance ( const uint_t  con = 0) const
inline

◆ getipc2redist()

double walberla::blockforest::DynamicParMetis::getipc2redist ( ) const
inline

◆ operator()()

bool walberla::blockforest::DynamicParMetis::operator() ( std::vector< std::pair< const PhantomBlock *, uint_t > > &  targetProcess,
std::set< uint_t > &  processesToRecvFrom,
const PhantomBlockForest phantomForest,
const uint_t  iteration 
) const

◆ setImbalanceTolerance()

void walberla::blockforest::DynamicParMetis::setImbalanceTolerance ( double  tolerance,
const uint_t  con = 0 
)
inline

◆ setImbalanceTolerances()

void walberla::blockforest::DynamicParMetis::setImbalanceTolerances ( const std::vector< double > &  tolerances)
inline

◆ setipc2redist()

void walberla::blockforest::DynamicParMetis::setipc2redist ( double  val)
inline

◆ stringToAlgorithm()

DynamicParMetis::Algorithm walberla::blockforest::DynamicParMetis::stringToAlgorithm ( std::string  s)
static

◆ stringToEdgeSource()

DynamicParMetis::EdgeSource walberla::blockforest::DynamicParMetis::stringToEdgeSource ( std::string  s)
static

◆ stringToWeightsToUse()

DynamicParMetis::WeightsToUse walberla::blockforest::DynamicParMetis::stringToWeightsToUse ( std::string  s)
static

◆ vertexSizeUsed()

bool walberla::blockforest::DynamicParMetis::vertexSizeUsed ( ) const
inline

◆ vertexWeightsUsed()

bool walberla::blockforest::DynamicParMetis::vertexWeightsUsed ( ) const
inline

◆ weightsToUseToString()

std::string walberla::blockforest::DynamicParMetis::weightsToUseToString ( ) const

Member Data Documentation

◆ algorithm_

Algorithm walberla::blockforest::DynamicParMetis::algorithm_
protected

◆ edgeSource_

EdgeSource walberla::blockforest::DynamicParMetis::edgeSource_
protected

◆ ipc2redist_

double walberla::blockforest::DynamicParMetis::ipc2redist_ = real_t( 1000.0 )
protected

compute repartitioning with low edge cut (set lower (down to 0.000001) to get minimal repartitioning )

◆ ncon_

uint_t walberla::blockforest::DynamicParMetis::ncon_ = uint_t(1)
protected

number of constraints

◆ ubvec_

std::vector<double> walberla::blockforest::DynamicParMetis::ubvec_
protected

imbalance tolerance for each constraint, value between 1 (perfect balance) and number of subdomains (= number of processes, perfect imbalance)

◆ weightsToUse_

WeightsToUse walberla::blockforest::DynamicParMetis::weightsToUse_
protected

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