ug4
|
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< SubsetHandler > | get_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< SubsetHandler > | m_shPartitions |
std::vector< int > | m_targetProcs |
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.
ug::PartitionMap::PartitionMap | ( | ) |
References make_sp().
void ug::PartitionMap::add_target_proc | ( | int | tarProcRank | ) |
Referenced by ug::PartitionDomain_MetisKWay(), and ug::PartitionDomain_RegularGrid().
void ug::PartitionMap::add_target_procs | ( | int | first, |
int | num | ||
) |
void ug::PartitionMap::assign_grid | ( | Grid & | grid | ) |
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.
void ug::PartitionMap::clear | ( | ) |
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().
SmartPtr< SubsetHandler > ug::PartitionMap::get_partition_handler | ( | ) |
int ug::PartitionMap::get_target_proc | ( | size_t | index | ) |
References UG_LOG.
Referenced by ug::SavePartitionMapToFile().
std::vector< int > & ug::PartitionMap::get_target_proc_vec | ( | ) |
Referenced by ug::DistributeDomain().
int * ug::PartitionMap::get_target_procs | ( | ) |
size_t ug::PartitionMap::num_target_procs | ( | ) |
Referenced by ug::PartitionDomain_MetisKWay(), and ug::PartitionDomain_RegularGrid().
void ug::PartitionMap::shift_target_procs | ( | int | offset | ) |
adds the given offset to all target-proc-ranks
|
private |
|
private |