Sierra Toolkit Version of the Day
stk::rebalance::Partition Class Reference

Initialized with a list of mesh entities unique to each processor. More...

Inheritance diagram for stk::rebalance::Partition:

List of all members.

Public Member Functions

 Partition (stk::ParallelMachine comm)
virtual void set_mesh_info (const std::vector< mesh::Entity * > &mesh_entities, const VectorField *nodal_coord_ref, const ScalarField *elem_weight_ref=NULL)=0
 Define mesh entities to balance.
virtual ~Partition ()
ParallelMachine parallel () const
 Return the parallel communicator for this partition entity.
virtual unsigned num_elems () const =0
 Return the total number of mesh entities in all lists.
virtual void determine_new_partition (bool &RebalancingNeeded)=0
 determine New Partition.
virtual int get_new_partition (stk::mesh::EntityProcVec &new_partition)=0
 Perform communication to create new partition.
virtual bool partition_dependents_needed () const =0
 Query whether element dependents need to be rebalanced outside this Partition.

Protected Attributes

const stk::ParallelMachine comm_

Detailed Description

Initialized with a list of mesh entities unique to each processor.

track of a mesh entity partition.

the Field references determine what will be used for the physical coordinate reference and a weight. These fields are made available for the computation of a redistribution by a derived class.

The destination processors ids are initialized to the current processor. Thus the initialization defines a default partition that fits the current mesh entity distribution. It is then assumed that a new partition will be defined by updating the owing processors. Subsequently the new partition will be realized by a function that actually redistributes the mesh entities to the new owning processors. But these actions are beyond the scope of this class.

Definition at line 81 of file Partition.hpp.

Member Function Documentation

virtual void stk::rebalance::Partition::set_mesh_info ( const std::vector< mesh::Entity * > &  mesh_entities,
const VectorField nodal_coord_ref,
const ScalarField elem_weight_ref = NULL 
) [pure virtual]

Define mesh entities to balance.

mesh_entitiesVector of mesh entities to rebalance
nodal_coord_refNodal coordinate field to determine new partition if using geometric based partitioning.
elem_weight_refWeighting of elements used in defining the new partition. If used, the total element weight will be balanced across all of the processors. Can be NULL.
virtual void stk::rebalance::Partition::determine_new_partition ( bool &  RebalancingNeeded) [pure virtual]

determine New Partition.

RebalancingNeededIf true, then a new partition has been defined. If false, the new partition is the same as the old one and no rebalancing is needed.

This is where all of the real work takes place. This virtual function should be specialized to determine the new partition. RebalancingNeeded is set if the new partition is different than the old one.

virtual int stk::rebalance::Partition::get_new_partition ( stk::mesh::EntityProcVec &  new_partition) [pure virtual]

Perform communication to create new partition.

new_partitionNew layout of mesh entities on the processing grid.

Given a communication specification this function will apply the new partition by transferring the ownership of the registered mesh entities according to the specification determined by the function Determine_New_Partition. After move_mesh_entities is called, GeomDecomp should be reinitialized with new vectors of mesh entities before rebalancing is performed again.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends