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 | |
void | clear () |
int | find_target_proc (int procRank) |
returns the index at which the given process lies. -1 if it doesn't exist. | |
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 | |
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 m_shPartitions, and make_sp().
void ug::PartitionMap::add_target_proc | ( | int | tarProcRank | ) |
void ug::PartitionMap::add_target_procs | ( | int | first, |
int | num | ||
) |
References add_target_proc().
Referenced by ug::bridge::RegisterGridBridge_Balancing().
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 m_targetProcs, num_target_procs(), and UG_LOG.
void ug::PartitionMap::clear | ( | ) |
References m_shPartitions, and m_targetProcs.
Referenced by ug::bridge::RegisterGridBridge_Balancing().
int ug::PartitionMap::find_target_proc | ( | int | procRank | ) |
returns the index at which the given process lies. -1 if it doesn't exist.
References m_targetProcs.
Referenced by ug::PartitionDomain_MetisKWay(), ug::PartitionDomain_MetisKWay(), and ug::PartitionDomain_RegularGrid().
SmartPtr< SubsetHandler > ug::PartitionMap::get_partition_handler | ( | ) |
References m_shPartitions.
Referenced by ug::DistributeDomain(), ug::PartitionDistributedDomain_LevelBased(), ug::PartitionDomain_LevelBased(), ug::PartitionDomain_MetisKWay(), ug::PartitionDomain_MetisKWay(), ug::PartitionDomain_RegularGrid(), ug::bridge::RegisterGridBridge_Balancing(), ug::SavePartitionMap(), and ug::SavePartitionMapToFile().
int ug::PartitionMap::get_target_proc | ( | size_t | index | ) |
References m_targetProcs, num_target_procs(), and UG_LOG.
Referenced by ug::bridge::RegisterGridBridge_Balancing(), and ug::SavePartitionMapToFile().
std::vector< int > & ug::PartitionMap::get_target_proc_vec | ( | ) |
References m_targetProcs.
Referenced by ug::DistributeDomain().
int * ug::PartitionMap::get_target_procs | ( | ) |
References m_targetProcs.
size_t ug::PartitionMap::num_target_procs | ( | ) |
void ug::PartitionMap::shift_target_procs | ( | int | offset | ) |
adds the given offset to all target-proc-ranks
References m_targetProcs.
Referenced by ug::bridge::RegisterGridBridge_Balancing().
|
private |
Referenced by assign_grid(), clear(), get_partition_handler(), and PartitionMap().
|
private |