Loading [MathJax]/extensions/tex2jax.js
ug4
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
 
void clear ()
 
int find_target_proc (int procRank)
 returns the index at which the given process lies. -1 if it doesn't exist.
 
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
 

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 m_shPartitions, and make_sp().

Member Function Documentation

◆ add_target_proc()

◆ 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 m_targetProcs, num_target_procs(), and 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.

References m_targetProcs.

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

◆ get_partition_handler()

◆ get_target_proc()

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

◆ get_target_proc_vec()

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

References m_targetProcs.

Referenced by ug::DistributeDomain().

◆ get_target_procs()

int * ug::PartitionMap::get_target_procs ( )

References m_targetProcs.

◆ num_target_procs()

◆ shift_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().

Member Data Documentation

◆ m_shPartitions

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

◆ m_targetProcs


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