ug4
ug::PartitionMap Class Reference

Used to describe how a domain shall be distributed in a parallel environment. More...

#include <partition_map.h>

Public Member Functions

void add_target_proc (int tarProcRank)
 
void add_target_procs (int first, int num)
 
void assign_grid (Grid &grid)
 
bool change_target_proc (size_t index, int newRank)
 changes an existing target process. Make sure that index < num_target_procs More...
 
void clear ()
 
int find_target_proc (int procRank)
 returns the index at which the given process lies. -1 if it doesn't exist. More...
 
SmartPtr< SubsetHandlerget_partition_handler ()
 
int get_target_proc (size_t index)
 
std::vector< int > & get_target_proc_vec ()
 
int * get_target_procs ()
 
size_t num_target_procs ()
 
 PartitionMap ()
 
void shift_target_procs (int offset)
 adds the given offset to all target-proc-ranks More...
 

Private Attributes

SmartPtr< SubsetHandlerm_shPartitions
 
std::vector< int > m_targetProcs
 

Detailed Description

Used to describe how a domain shall be distributed in a parallel environment.

A partition map holds a subset handler and a map, which specifies the target process of each subset. Make sure to assign a grid before performing the partitioning.

Todo:
a partition map should feature a constructor which takes a grid.

Constructor & Destructor Documentation

◆ PartitionMap()

ug::PartitionMap::PartitionMap ( )

References make_sp().

Member Function Documentation

◆ add_target_proc()

void ug::PartitionMap::add_target_proc ( int  tarProcRank)

◆ add_target_procs()

void ug::PartitionMap::add_target_procs ( int  first,
int  num 
)

◆ assign_grid()

◆ change_target_proc()

bool ug::PartitionMap::change_target_proc ( size_t  index,
int  newRank 
)

changes an existing target process. Make sure that index < num_target_procs

References UG_LOG.

◆ clear()

void ug::PartitionMap::clear ( )

◆ find_target_proc()

int ug::PartitionMap::find_target_proc ( int  procRank)

returns the index at which the given process lies. -1 if it doesn't exist.

Referenced by ug::PartitionDomain_MetisKWay(), and ug::PartitionDomain_RegularGrid().

◆ get_partition_handler()

◆ get_target_proc()

int ug::PartitionMap::get_target_proc ( size_t  index)

References UG_LOG.

Referenced by ug::SavePartitionMapToFile().

◆ get_target_proc_vec()

std::vector< int > & ug::PartitionMap::get_target_proc_vec ( )

Referenced by ug::DistributeDomain().

◆ get_target_procs()

int * ug::PartitionMap::get_target_procs ( )

◆ num_target_procs()

size_t ug::PartitionMap::num_target_procs ( )

◆ shift_target_procs()

void ug::PartitionMap::shift_target_procs ( int  offset)

adds the given offset to all target-proc-ranks

Member Data Documentation

◆ m_shPartitions

SmartPtr<SubsetHandler> ug::PartitionMap::m_shPartitions
private

◆ m_targetProcs

std::vector<int> ug::PartitionMap::m_targetProcs
private

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