35 #ifndef __H__UG_partitioner
36 #define __H__UG_partitioner
175 "This partitioner does not support balance weights.");
180 "This partitioner does not support communication weights.");
184 UG_THROW(
"Partition-Pre-Processing is currently not supported by the chosen partitioner.");
188 UG_THROW(
"Partition-Post-Processing is currently not supported by the chosen partitioner.");
218 virtual bool partition(
size_t baseLvl,
size_t elementThreshold) = 0;
223 UG_LOG(
"IPartitioner::set_subset_handler not implemented");
226 UG_LOG(
"IPartitioner::enable_static_partitioning not implemented");
Definition: smart_pointer.h:296
Base-class for edges.
Definition: grid_base_objects.h:397
Faces are 2-dimensional objects.
Definition: grid_base_objects.h:510
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
Partitions elements of a grid into several subsets.
Definition: subset_handler_grid.h:53
Definition: partitioner.h:49
virtual void refresh_weights(int baseLevel)
Definition: partitioner.h:53
virtual number get_refined_weight(Edge *e)
Definition: partitioner.h:61
virtual bool consider_in_level_above(Edge *)
Relative indicator in which level the specifed elements should be partitioned.
Definition: partitioner.h:71
virtual number get_refined_weight(Volume *e)
todo: use a more sophisticated implementation
Definition: partitioner.h:63
virtual bool consider_in_level_above(Face *)
Relative indicator in which level the specifed elements should be partitioned.
Definition: partitioner.h:72
virtual number get_weight(Vertex *)
Definition: partitioner.h:55
virtual number get_refined_weight(Face *e)
todo: use a more sophisticated implementation
Definition: partitioner.h:62
virtual number get_weight(Volume *)
Definition: partitioner.h:58
virtual number get_weight(Edge *)
Definition: partitioner.h:56
virtual number get_refined_weight(Vertex *e)
Definition: partitioner.h:60
virtual bool has_level_offsets()
Definition: partitioner.h:65
virtual ~IBalanceWeights()
Definition: partitioner.h:52
virtual number get_weight(Face *)
Definition: partitioner.h:57
virtual bool consider_in_level_above(Vertex *)
Relative indicator in which level the specifed elements should be partitioned.
Definition: partitioner.h:70
virtual bool consider_in_level_above(Volume *)
Relative indicator in which level the specifed elements should be partitioned.
Definition: partitioner.h:73
Definition: partitioner.h:91
virtual ~ICommunicationWeights()
Definition: partitioner.h:93
virtual number get_weight(GridObject *conn)=0
virtual bool reweigh(GridObject *conn)
Definition: partitioner.h:109
allows to post-process partitions
Definition: partitioner.h:146
virtual void partitioning_done()=0
virtual void init_post_processing(MultiGrid *mg, SubsetHandler *partitions)=0
virtual void post_process(int lvl)=0
virtual ~IPartitionPostProcessor()
Definition: partitioner.h:148
allows to pre-process data before partitioning starts
Definition: partitioner.h:119
virtual ~IPartitionPreProcessor()
Definition: partitioner.h:121
virtual void partitioning_starts(MultiGrid *mg, IPartitioner *partitioner)=0
virtual void partitioning_done(MultiGrid *mg, IPartitioner *partitioner)=0
Partitioners can be used inside a LoadBalancer or separately to create partition maps.
Definition: partitioner.h:162
virtual void set_next_process_hierarchy(SPProcessHierarchy procHierarchy)=0
virtual const std::vector< int > * get_process_map() const =0
returns the processes map. Updated during partitioning. may be NULL.
bool verbose() const
Definition: partitioner.h:240
virtual ~IPartitioner()
Definition: partitioner.h:169
virtual bool supports_repartitioning() const
Definition: partitioner.h:196
virtual ConstSPProcessHierarchy next_process_hierarchy() const =0
virtual bool supports_balance_weights() const
Definition: partitioner.h:194
virtual bool supports_communication_weights() const
Definition: partitioner.h:195
bool m_problemsOccurred
Definition: partitioner.h:243
void set_verbose(bool verbose)
Definition: partitioner.h:239
virtual void set_partition_pre_processor(SPPartitionPreProcessor)
Definition: partitioner.h:183
virtual void set_balance_weights(SPBalanceWeights balanceWeights)
Definition: partitioner.h:173
virtual bool problems_occurred()
indicates whether problems occurred during the last partitioning
Definition: partitioner.h:237
virtual bool clustered_siblings_enabled()
Definition: partitioner.h:210
virtual void enable_static_partitioning(bool)
Definition: partitioner.h:225
virtual SubsetHandler & get_partitions()=0
bool m_clusteredSiblings
Definition: partitioner.h:247
virtual ConstSPProcessHierarchy current_process_hierarchy() const =0
virtual bool partition(size_t baseLvl, size_t elementThreshold)=0
virtual void enable_clustered_siblings(bool bEnable)
Definition: partitioner.h:209
virtual void set_partition_post_processor(SPPartitionPostProcessor)
Definition: partitioner.h:187
virtual void set_subset_handler(SmartPtr< SubsetHandler >)
Definition: partitioner.h:222
bool m_verbose
Definition: partitioner.h:246
IPartitioner()
Definition: partitioner.h:164
virtual void set_communication_weights(SPCommunicationWeights commWeights)
Definition: partitioner.h:178
Definition: multi_grid.h:72
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
Volumes are 3-dimensional objects.
Definition: grid_base_objects.h:754
SmartPtr< IPartitionPreProcessor > SPPartitionPreProcessor
Definition: partitioner.h:129
SmartPtr< ICommunicationWeights > SPCommunicationWeights
Definition: partitioner.h:112
SmartPtr< IPartitionPostProcessor > SPPartitionPostProcessor
Definition: partitioner.h:156
SmartPtr< IPartitioner > SPPartitioner
Definition: partitioner.h:250
SmartPtr< IBalanceWeights > SPBalanceWeights
Definition: partitioner.h:77
#define UG_THROW(msg)
Definition: error.h:57
#define UG_LOG(msg)
Definition: log.h:367
#define UG_COND_THROW(cond, msg)
UG_COND_THROW(cond, msg) : performs a UG_THROW(msg) if cond == true.
Definition: error.h:61
double number
Definition: types.h:124