#include <source/mesh/load_balance/LoadBalanceStrategy.h>
Inheritance diagram for SAMRAI::mesh::LoadBalanceStrategy< DIM >:
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 |
SAMRAI::mesh::LoadBalanceStrategy< DIM >::LoadBalanceStrategy | ( | ) |
Construct load balance strategy object.
SAMRAI::mesh::LoadBalanceStrategy< DIM >::~LoadBalanceStrategy | ( | ) | [virtual] |
This virtual destructor does nothing interesting.
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.
level_number | Integer level number. |
Implemented in SAMRAI::mesh::LoadBalancer< 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.
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 >.