33 #ifndef __H__UG__partitioner_dynamic_biscection__
34 #define __H__UG__partitioner_dynamic_biscection__
56 template <
class TElem,
int dim>
110 virtual bool partition(
size_t baseLvl,
size_t elementThreshold);
157 (*m_entries)[
m_last].next = entryInd;
211 int partitionLvl,
ANumber aWeight,
215 std::vector<TreeNode>& treeNodes,
ANumber aWeight,
221 std::vector<TreeNode>& parentNodes,
224 int cutRecursion,
int splitAxis);
245 bool copyToVMastersOnBaseLvl,
bool markedElemsOnly);
250 size_t maxIterations,
ANumber aWeight,
Definition: smart_pointer.h:296
Definition: smart_pointer.h:108
Performs communication between interfaces on different processes.
Definition: pcl_interface_communicator.h:68
Definition: pcl_process_communicator.h:70
the standard single-level-layout implementation
Definition: pcl_communication_structs.h:452
Partitions elements of a grid into several subsets.
Definition: subset_handler_grid.h:53
Partitioners can be used inside a LoadBalancer or separately to create partition maps.
Definition: partitioner.h:162
Definition: subset_handler_interface.h:223
Definition: multi_grid.h:72
Parallel bisection partitioner.
Definition: partitioner_dynamic_bisection.h:57
std::vector< Entry > m_entries
Definition: partitioner_dynamic_bisection.h:261
int m_startSplitAxis
Definition: partitioner_dynamic_bisection.h:273
virtual ConstSPProcessHierarchy current_process_hierarchy() const
Definition: partitioner_dynamic_bisection.cpp:156
void perform_bisection(int numTargetProcs, int minLvl, int maxLvl, int partitionLvl, ANumber aWeight, pcl::ProcessCommunicator com)
Definition: partitioner_dynamic_bisection.cpp:421
int m_longestSplitAxisEnabled
Definition: partitioner_dynamic_bisection.h:272
TElem::side side_t
Definition: partitioner_dynamic_bisection.h:61
virtual void set_next_process_hierarchy(SPProcessHierarchy procHierarchy)
Definition: partitioner_dynamic_bisection.cpp:122
virtual bool partition(size_t baseLvl, size_t elementThreshold)
Definition: partitioner_dynamic_bisection.cpp:229
void enable_split_axis(int axis, bool enable)
enable or disable splits along a certain axis.
Definition: partitioner_dynamic_bisection.cpp:103
int m_numSplitAxisEnabled
Definition: partitioner_dynamic_bisection.h:276
constants
Definition: partitioner_dynamic_bisection.h:123
@ NUM_CONSTANTS
Definition: partitioner_dynamic_bisection.h:131
@ RIGHT
Definition: partitioner_dynamic_bisection.h:126
@ CUTTING_CENTER_LEFT
Definition: partitioner_dynamic_bisection.h:128
@ LEFT
Definition: partitioner_dynamic_bisection.h:125
@ CUTTING_CENTER_RIGHT
Definition: partitioner_dynamic_bisection.h:129
@ CUTTING
Definition: partitioner_dynamic_bisection.h:127
@ UNCLASSIFIED
Definition: partitioner_dynamic_bisection.h:124
@ TOTAL
Definition: partitioner_dynamic_bisection.h:130
virtual ConstSPProcessHierarchy next_process_hierarchy() const
Definition: partitioner_dynamic_bisection.cpp:164
virtual bool supports_balance_weights() const
Definition: partitioner_dynamic_bisection.cpp:172
Attachment< vector_t > apos_t
Definition: partitioner_dynamic_bisection.h:63
void control_bisection(ISubsetHandler &partitionSH, std::vector< TreeNode > &treeNodes, ANumber aWeight, number maxChildWeight, pcl::ProcessCommunicator &com)
Definition: partitioner_dynamic_bisection.cpp:558
int classify_elem(elem_t *e, int splitAxis, number splitValue)
Definition: partitioner_dynamic_bisection.cpp:1051
SPProcessHierarchy m_nextProcessHierarchy
Definition: partitioner_dynamic_bisection.h:259
void enable_longest_split_axis(bool enable)
enables automatical determination of split-axis by longest geometry extension
Definition: partitioner_dynamic_bisection.h:81
SPProcessHierarchy m_processHierarchy
Definition: partitioner_dynamic_bisection.h:258
int num_split_improvement_iterations() const
the maximum number of iterations performed to find a good split plane
Definition: partitioner_dynamic_bisection.h:93
TElem elem_t
Definition: partitioner_dynamic_bisection.h:60
void gather_weights_from_level(int baseLvl, int childLvl, ANumber aWeight, bool copyToVMastersOnBaseLvl, bool markedElemsOnly)
Definition: partitioner_dynamic_bisection.cpp:940
void improve_split_values(std::vector< TreeNode > &treeNodes, size_t maxIterations, ANumber aWeight, pcl::ProcessCommunicator &com)
Definition: partitioner_dynamic_bisection.cpp:1145
virtual void set_balance_weights(SPBalanceWeights balanceWeights)
Definition: partitioner_dynamic_bisection.cpp:129
void calculate_global_dimensions(std::vector< TreeNode > &treeNodes, number maxChildWeight, ANumber aWeight, pcl::ProcessCommunicator &com)
Definition: partitioner_dynamic_bisection.cpp:1075
void set_tolerance(number tol)
sets the tolerance threshold. 1: no tolerance, 0: full tolerance.
Definition: partitioner_dynamic_bisection.h:77
int m_highestRedistLevel
Definition: partitioner_dynamic_bisection.h:282
void bisect_elements(std::vector< TreeNode > &childNodesOut, std::vector< TreeNode > &parentNodes, ANumber aWeight, number maxChildWeight, pcl::ProcessCommunicator &com, int cutRecursion, int splitAxis)
Definition: partitioner_dynamic_bisection.cpp:652
void set_num_split_improvement_iterations(int num)
Definition: partitioner_dynamic_bisection.h:94
void set_subset_handler(SmartPtr< SubsetHandler > sh)
allows to optionally specify a subset-handler on which the balancer shall operate
Definition: partitioner_dynamic_bisection.cpp:94
int m_firstSplitAxisEnabled
Definition: partitioner_dynamic_bisection.h:277
MultiGrid * m_mg
Definition: partitioner_dynamic_bisection.h:254
number m_tolerance
Definition: partitioner_dynamic_bisection.h:269
pcl::InterfaceCommunicator< layout_t > m_intfcCom
Definition: partitioner_dynamic_bisection.h:260
bool static_partitioning_enabled() const
Definition: partitioner_dynamic_bisection.cpp:218
void copy_partitions_to_children(ISubsetHandler &partitionSH, int lvl)
Definition: partitioner_dynamic_bisection.cpp:905
virtual const std::vector< int > * get_process_map() const
returns the processes map. Updated during partitioning. may be NULL.
Definition: partitioner_dynamic_bisection.cpp:199
std::vector< int > m_procMap
Definition: partitioner_dynamic_bisection.h:281
virtual void set_partition_pre_processor(SPPartitionPreProcessor ppp)
Definition: partitioner_dynamic_bisection.cpp:142
SPPartitionPostProcessor m_partitionPostProcessor
Definition: partitioner_dynamic_bisection.h:265
Partitioner_DynamicBisection()
Definition: partitioner_dynamic_bisection.cpp:50
aapos_t m_aaPos
Definition: partitioner_dynamic_bisection.h:256
Grid::VertexAttachmentAccessor< apos_t > aapos_t
Definition: partitioner_dynamic_bisection.h:64
IPartitioner base_class
Definition: partitioner_dynamic_bisection.h:59
virtual ~Partitioner_DynamicBisection()
Definition: partitioner_dynamic_bisection.cpp:74
GridLayoutMap::Types< elem_t >::Layout::LevelLayout layout_t
Definition: partitioner_dynamic_bisection.h:65
void set_start_split_axis(int axis)
sets the axis with which bisection is started.
Definition: partitioner_dynamic_bisection.h:90
SPBalanceWeights m_balanceWeights
Definition: partitioner_dynamic_bisection.h:263
SPPartitionPreProcessor m_partitionPreProcessor
Definition: partitioner_dynamic_bisection.h:264
void enable_static_partitioning(bool enable)
Definition: partitioner_dynamic_bisection.cpp:210
apos_t m_aPos
Definition: partitioner_dynamic_bisection.h:255
int m_lastSplitAxis
Definition: partitioner_dynamic_bisection.h:274
int get_next_split_axis()
returns the next valid split axis to m_lastSplitAxis.
Definition: partitioner_dynamic_bisection.cpp:876
size_t m_splitImproveIterations
Definition: partitioner_dynamic_bisection.h:270
virtual SubsetHandler & get_partitions()
Definition: partitioner_dynamic_bisection.cpp:186
void set_grid(MultiGrid *mg, Attachment< MathVector< dim > > aPos)
Definition: partitioner_dynamic_bisection.cpp:83
bool m_staticPartitioning
Definition: partitioner_dynamic_bisection.h:267
SmartPtr< SubsetHandler > m_sh
Definition: partitioner_dynamic_bisection.h:257
static const size_t s_invalidIndex
Definition: partitioner_dynamic_bisection.h:134
virtual bool supports_connection_weights() const
Definition: partitioner_dynamic_bisection.cpp:179
virtual bool supports_repartitioning() const
Definition: partitioner_dynamic_bisection.h:108
MathVector< dim > vector_t
Definition: partitioner_dynamic_bisection.h:62
bool m_splitAxisEnabled[dim]
Definition: partitioner_dynamic_bisection.h:275
virtual void set_partition_post_processor(SPPartitionPostProcessor ppp)
Definition: partitioner_dynamic_bisection.cpp:149
double number
Definition: types.h:124
Definition: partitioner_dynamic_bisection.h:142
size_t size() const
Definition: partitioner_dynamic_bisection.h:170
bool empty() const
Definition: partitioner_dynamic_bisection.h:171
ElemList(std::vector< Entry > *entries)
Definition: partitioner_dynamic_bisection.h:145
size_t last() const
Definition: partitioner_dynamic_bisection.h:174
size_t m_first
Definition: partitioner_dynamic_bisection.h:182
elem_t * elem(size_t entryInd) const
Definition: partitioner_dynamic_bisection.h:176
size_t m_last
Definition: partitioner_dynamic_bisection.h:183
size_t first() const
Definition: partitioner_dynamic_bisection.h:173
void add(size_t entryInd)
Definition: partitioner_dynamic_bisection.h:150
size_t m_num
Definition: partitioner_dynamic_bisection.h:184
std::vector< Entry > * m_entries
Definition: partitioner_dynamic_bisection.h:181
ElemList()
Definition: partitioner_dynamic_bisection.h:143
void set_entry_list(std::vector< Entry > *entries)
Definition: partitioner_dynamic_bisection.h:148
size_t next(size_t entryInd) const
Definition: partitioner_dynamic_bisection.h:175
void clear()
Definition: partitioner_dynamic_bisection.h:164
std::vector< Entry > * entries()
Definition: partitioner_dynamic_bisection.h:178
Definition: partitioner_dynamic_bisection.h:136
elem_t * elem
Definition: partitioner_dynamic_bisection.h:137
Entry(elem_t *e)
Definition: partitioner_dynamic_bisection.h:139
size_t next
Definition: partitioner_dynamic_bisection.h:138
Definition: partitioner_dynamic_bisection.h:188
int splitAxis
Definition: partitioner_dynamic_bisection.h:202
number minSplitValue
Definition: partitioner_dynamic_bisection.h:203
number splitValue
Definition: partitioner_dynamic_bisection.h:201
vector_t center
Definition: partitioner_dynamic_bisection.h:196
number ratioLeft
Definition: partitioner_dynamic_bisection.h:193
int numTargetProcs
Definition: partitioner_dynamic_bisection.h:191
ElemList elems
Definition: partitioner_dynamic_bisection.h:189
vector_t boxMax
Definition: partitioner_dynamic_bisection.h:198
bool bisectionComplete
Definition: partitioner_dynamic_bisection.h:206
int firstProc
Definition: partitioner_dynamic_bisection.h:190
size_t firstChildNode
Definition: partitioner_dynamic_bisection.h:194
vector_t boxMin
Definition: partitioner_dynamic_bisection.h:197
number maxSplitValue
Definition: partitioner_dynamic_bisection.h:204
number totalWeight
Definition: partitioner_dynamic_bisection.h:199