SAMRAI::mesh::LoadBalanceStrategy< DIM > Class Template Reference

Class LoadBalanceStrategy<DIM> is an abstract base class that defines a Strategy pattern interface for operations that load balance patches on a single AMR patch hierarchy level. Typically, such operations are invoked after the domain of a new hierarchy level is determined (e.g., via some error estimation procedure) and is applied to the collection of boxes that describe the domain. The load balancing process produces a set of boxes from which patches on the new level are created and a processor mapping describing how the new patches are mapped to processors. More...

#include <source/mesh/load_balance/LoadBalanceStrategy.h>

Inheritance diagram for SAMRAI::mesh::LoadBalanceStrategy< DIM >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 LoadBalanceStrategy ()
virtual ~LoadBalanceStrategy ()
virtual bool getLoadBalanceDependsOnPatchData (int level_number) const =0
virtual void loadBalanceBoxes (hier::BoxArray< DIM > &out_boxes, hier::ProcessorMapping &mapping, const hier::BoxList< DIM > &in_boxes, const tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, const int level_number, const hier::BoxArray< DIM > &physical_domain, const hier::IntVector< DIM > &ratio_to_hierarchy_level_zero, const hier::IntVector< DIM > &min_size, const hier::IntVector< DIM > &max_size, const hier::IntVector< DIM > &cut_factor, const hier::IntVector< DIM > &bad_interval) const =0

Detailed Description

template<int DIM>
class SAMRAI::mesh::LoadBalanceStrategy< DIM >

Class LoadBalanceStrategy<DIM> is an abstract base class that defines a Strategy pattern interface for operations that load balance patches on a single AMR patch hierarchy level. Typically, such operations are invoked after the domain of a new hierarchy level is determined (e.g., via some error estimation procedure) and is applied to the collection of boxes that describe the domain. The load balancing process produces a set of boxes from which patches on the new level are created and a processor mapping describing how the new patches are mapped to processors.

See also:
hier::PatchLevel

hier::ProcessorMapping


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::mesh::LoadBalanceStrategy< DIM >::LoadBalanceStrategy (  ) 

Construct load balance strategy object.

template<int DIM>
SAMRAI::mesh::LoadBalanceStrategy< DIM >::~LoadBalanceStrategy (  )  [virtual]

This virtual destructor does nothing interesting.


Member Function Documentation

template<int DIM>
virtual bool SAMRAI::mesh::LoadBalanceStrategy< DIM >::getLoadBalanceDependsOnPatchData ( int  level_number  )  const [pure virtual]

Indicate whether load balancing procedure for given level depends on patch data on mesh. This can be used to determine whether a level needs to be rebalanced although its box configuration is unchanged.

Returns:
Boolean value of true if load balance routines for level depend on patch data; false otherwise.
Parameters:
level_number Integer level number.

Implemented in SAMRAI::mesh::LoadBalancer< DIM >.

template<int DIM>
virtual void SAMRAI::mesh::LoadBalanceStrategy< DIM >::loadBalanceBoxes ( hier::BoxArray< DIM > &  out_boxes,
hier::ProcessorMapping mapping,
const hier::BoxList< DIM > &  in_boxes,
const tbox::Pointer< hier::PatchHierarchy< DIM > >  hierarchy,
const int  level_number,
const hier::BoxArray< DIM > &  physical_domain,
const hier::IntVector< DIM > &  ratio_to_hierarchy_level_zero,
const hier::IntVector< DIM > &  min_size,
const hier::IntVector< DIM > &  max_size,
const hier::IntVector< DIM > &  cut_factor,
const hier::IntVector< DIM > &  bad_interval 
) const [pure virtual]

Given a list of boxes, the union of which represents the domain of a specified level in the AMR hierarchy, generate an array of boxes and an associated processor mapping from which the patches for the level may be generated. This process typically involves chopping each box in the original list that is "too large" (in a manner defined by the concrete implementation of this subclass) into a set of boxes each smaller than some size. Thus, the union of the boxes in the generated box array is the same as that of the original box list. A variety of constraints must be applied typically during the chopping process. These input arguments are described here.

Parameters:
out_boxes Output box array for generating patches on level.
mapping Output processor mapping for patches on level.
in_boxes Input box list representing union of patches on level.
hierarchy Input patch hierarchy in which level will reside.
level_number Input integer number of level in patch hierarchy.
physical_domain Input box array representing physical extent of the problem domain in the index space of the level to be load balanced.
ratio_to_hierarchy_level_zero Input hier::IntVector indicating ratio between index space of level and coarsest hierarchy level (i.e., level zero).
min_size Input hier::IntVector representing mimimum box size.
max_size Input hier::IntVector representing maximum box size.
cut_factor Input hier::IntVector indicating factor for chopping each side of a box; i.e., after chopping a box, the number of cells along each direction of each piece must be an integer multiple of the corresponding entry in the cut factor vector. For example, the cut factor may be related to the coarsen ratio between levels in the hierarchy in which case it may be used to produce boxes that can be coarsened by a certain factor if needed. See hier::BoxUtilities<DIM> header file for more information.
bad_interval Input hier::IntVector indicating the length of an interval of cells along each side of the box where chopping the box may produce boxes with certain "bad" properties. For example, this is primiarily used to avoid generating ghost regions for patches that intersect the domain boundary in ways that may it difficult for a use to provide boundary values. Thus, it is typically related to the maximum ghost cell width in the problem. See hier::BoxUtilities<DIM> header file for more information.

Implemented in SAMRAI::mesh::LoadBalancer< DIM >.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:41 2009 for SAMRAI by  doxygen 1.5.1