Chombo + EB  3.2
Macros | Functions
LoadBalance.H File Reference
#include "SPACE.H"
#include "REAL.H"
#include "Box.H"
#include "Vector.H"
#include "BoxLayout.H"
#include "SPMD.H"
#include "NamespaceHeader.H"
#include "NamespaceFooter.H"
Include dependency graph for LoadBalance.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _LOADBALANCE_H_
 

Functions

int LoadBalance (Vector< Vector< int > > &a_procAssignments, Real &a_effRatio, const Vector< Vector< Box > > &a_Grids, const Vector< Vector< long > > &a_ComputeLoads, const Vector< int > &a_RefRatios, int a_nProc=numProc())
 
int LoadBalance (Vector< BoxLayout > &Grids, Real &effRatio, const Vector< Vector< long > > &ComputeLoads, const Vector< int > &RefRatios, int nProc=numProc())
 
int LoadBalance (Vector< int > &a_procAssignments, const Vector< Box > &a_boxes, const int a_LBnumProc=numProc())
 
int LoadBalance (Vector< int > &a_procAssignments, const Vector< long long > &a_computeLoads, const Vector< Box > &a_boxes, const int a_LBnumProc=numProc())
 
int LoadBalance (Vector< int > &a_procAssignments, const Vector< long int > &a_computeLoads, const Vector< Box > &a_boxes, const int a_LBnumProc=numProc())
 
int UnLongLongLoadBalance (Vector< int > &a_procAssignments, const Vector< unsigned long long > &a_computeLoads, const Vector< Box > &a_boxes, const int a_numProc=numProc())
 
int basicLoadBalance (Vector< int > &a_procAssignments, int numBoxes, int a_numProc=numProc())
 
int LoadBalance (Vector< int > &procAssignments, Real &effRatio, const Vector< Box > &Grids, const Vector< long > &ComputeLoads)
 
int LoadBalance (Vector< int > &a_procAssignments, Vector< Box > &a_boxes, const Box &a_localGridBox, const int a_numProc=numProc())
 convenience function to gather a distributed set of Boxes with their corresponding processor assignment More...
 

Macro Definition Documentation

◆ _LOADBALANCE_H_

#define _LOADBALANCE_H_

Function Documentation

◆ LoadBalance() [1/7]

int LoadBalance ( Vector< Vector< int > > &  a_procAssignments,
Real a_effRatio,
const Vector< Vector< Box > > &  a_Grids,
const Vector< Vector< long > > &  a_ComputeLoads,
const Vector< int > &  a_RefRatios,
int  a_nProc = numProc() 
)

procAssignments output: processor number for each box effRatio output: ratio of min load to max load Grids input: meshes to balance ComputeLoads input: computational cost of each box RefRatios input: refinement ratio for each level

Referenced by blockReadLevel(), and readLevel().

◆ LoadBalance() [2/7]

int LoadBalance ( Vector< BoxLayout > &  Grids,
Real effRatio,
const Vector< Vector< long > > &  ComputeLoads,
const Vector< int > &  RefRatios,
int  nProc = numProc() 
)

Grids in-out: input grids to balance and output proc. numbers effRatio output: ratio of min load to max load ComputeLoads input: computational cost of each box RefRatios input: refinement ratio for each level

◆ LoadBalance() [3/7]

int LoadBalance ( Vector< int > &  a_procAssignments,
const Vector< Box > &  a_boxes,
const int  a_LBnumProc = numProc() 
)

convenience function to load balance a Vector of Boxes based on load=box.numPts()

◆ LoadBalance() [4/7]

int LoadBalance ( Vector< int > &  a_procAssignments,
const Vector< long long > &  a_computeLoads,
const Vector< Box > &  a_boxes,
const int  a_LBnumProc = numProc() 
)

convenience function to load balance a Vector of Loads based on load. boxes also passed in for possible use with box-swapping code

◆ LoadBalance() [5/7]

int LoadBalance ( Vector< int > &  a_procAssignments,
const Vector< long int > &  a_computeLoads,
const Vector< Box > &  a_boxes,
const int  a_LBnumProc = numProc() 
)

Accepts "long int" computeLoads and then just calls the "long long" version.

◆ UnLongLongLoadBalance()

int UnLongLongLoadBalance ( Vector< int > &  a_procAssignments,
const Vector< unsigned long long > &  a_computeLoads,
const Vector< Box > &  a_boxes,
const int  a_numProc = numProc() 
)

◆ basicLoadBalance()

int basicLoadBalance ( Vector< int > &  a_procAssignments,
int  numBoxes,
int  a_numProc = numProc() 
)

◆ LoadBalance() [6/7]

int LoadBalance ( Vector< int > &  procAssignments,
Real effRatio,
const Vector< Box > &  Grids,
const Vector< long > &  ComputeLoads 
)

◆ LoadBalance() [7/7]

int LoadBalance ( Vector< int > &  a_procAssignments,
Vector< Box > &  a_boxes,
const Box a_localGridBox,
const int  a_numProc = numProc() 
)

convenience function to gather a distributed set of Boxes with their corresponding processor assignment

Assumption is that each processor has at most one valid box. This is useful when interacting with other distributed codes which might not have the entire set of distributed boxes on all processors.