IBAMR  IBAMR version 0.19.
Public Member Functions | Private Member Functions | List of all members
SAMRAI::mesh::LoadBalanceStrategy< DIM > Class Template Referenceabstract

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 <LoadBalanceStrategy.h>

Inheritance diagram for SAMRAI::mesh::LoadBalanceStrategy< DIM >:
Inheritance graph
[legend]

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
 

Private Member Functions

 LoadBalanceStrategy (const LoadBalanceStrategy< DIM > &)
 
void operator= (const LoadBalanceStrategy< DIM > &)
 

Detailed Description

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

See also
hier::PatchLevel
hier::ProcessorMapping

Constructor & Destructor Documentation

◆ LoadBalanceStrategy() [1/2]

Construct load balance strategy object.

◆ ~LoadBalanceStrategy()

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

This virtual destructor does nothing interesting.

◆ LoadBalanceStrategy() [2/2]

template<int DIM>
SAMRAI::mesh::LoadBalanceStrategy< DIM >::LoadBalanceStrategy ( const LoadBalanceStrategy< DIM > &  )
private

Member Function Documentation

◆ getLoadBalanceDependsOnPatchData()

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_numberInteger level number.

Implemented in SAMRAI::mesh::LoadBalancer< DIM >, and SAMRAI::mesh::LoadBalancer< NDIM >.

◆ loadBalanceBoxes()

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_boxesOutput box array for generating patches on level.
mappingOutput processor mapping for patches on level.
in_boxesInput box list representing union of patches on level.
hierarchyInput patch hierarchy in which level will reside.
level_numberInput integer number of level in patch hierarchy.
physical_domainInput box array representing physical extent of the problem domain in the index space of the level to be load balanced.
ratio_to_hierarchy_level_zeroInput hier::IntVector indicating ratio between index space of level and coarsest hierarchy level (i.e., level zero).
min_sizeInput hier::IntVector representing mimimum box size.
max_sizeInput hier::IntVector representing maximum box size.
cut_factorInput 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_intervalInput 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 >, and SAMRAI::mesh::LoadBalancer< NDIM >.

◆ operator=()

template<int DIM>
void SAMRAI::mesh::LoadBalanceStrategy< DIM >::operator= ( const LoadBalanceStrategy< DIM > &  )
private

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