LifeV
|
MultiscaleCommunicatorsManager - The Multiscale Communicators Manager. More...
#include <MultiscaleCommunicatorsManager.hpp>
Type definitions | |
typedef std::map< UInt, multiscaleCommPtr_Type > | modelsCommunicatorContainer_Type |
typedef modelsCommunicatorContainer_Type::const_iterator | modelsCommunicatorContainerIterator_Type |
typedef std::vector< UInt > | modelsID_Type |
typedef modelsID_Type::iterator | modelsIDIterator_Type |
typedef std::vector< Real > | modelsLoad_Type |
typedef modelsLoad_Type::iterator | modelsLoadIterator_Type |
typedef std::vector< std::vector< Int > > | modelsProcessesList_Type |
Constructors & Destructor | |
MultiscaleCommunicatorsManager () | |
Constructor. More... | |
virtual | ~MultiscaleCommunicatorsManager () |
Destructor. More... | |
Methods | |
void | splitCommunicator () |
Split the communicator among the models. More... | |
bool | myModel (const UInt &modelID) const |
Determine if the model is owned by the process. More... | |
UInt | myModelsNumber () const |
Determine the number of model owned by the process. More... | |
void | showMe () |
Display some information about the communicators. More... | |
Set Methods | |
void | setCommunicator (const multiscaleCommPtr_Type &comm) |
Set the main epetra communicator. More... | |
void | addGroup (const Real &load, const modelsID_Type &modelsID) |
Add a group of models. More... | |
Get Methods | |
const multiscaleCommPtr_Type & | modelCommunicator (const UInt &modelID) const |
Get the communicator of a specific model. More... | |
Unimplemented Methods | |
MultiscaleCommunicatorsManager (const MultiscaleCommunicatorsManager &solver) | |
MultiscaleCommunicatorsManager & | operator= (const MultiscaleCommunicatorsManager &solver) |
Private Methods | |
void | parallelProcessesDistribution (std::vector< Real > &localNumberOfProcesses, const Int &numberOfProcesses) |
void | parallelProcessesAssignment (std::vector< std::vector< Int > > ¶llelProcesses, const std::vector< Real > &localNumberOfProcesses, const Int &numberOfProcesses) |
Int | roundToInteger (const Real &value) const |
Round a real number to the closest integer. More... | |
MultiscaleCommunicatorsManager - The Multiscale Communicators Manager.
The MultiscaleCommunicatorsManager class partitions a communicator among different models.
Definition at line 57 of file MultiscaleCommunicatorsManager.hpp.
typedef std::map< UInt, multiscaleCommPtr_Type > modelsCommunicatorContainer_Type |
Definition at line 64 of file MultiscaleCommunicatorsManager.hpp.
typedef modelsCommunicatorContainer_Type::const_iterator modelsCommunicatorContainerIterator_Type |
Definition at line 65 of file MultiscaleCommunicatorsManager.hpp.
typedef std::vector< UInt > modelsID_Type |
Definition at line 66 of file MultiscaleCommunicatorsManager.hpp.
typedef modelsID_Type::iterator modelsIDIterator_Type |
Definition at line 67 of file MultiscaleCommunicatorsManager.hpp.
typedef std::vector< Real > modelsLoad_Type |
Definition at line 68 of file MultiscaleCommunicatorsManager.hpp.
typedef modelsLoad_Type::iterator modelsLoadIterator_Type |
Definition at line 69 of file MultiscaleCommunicatorsManager.hpp.
typedef std::vector< std::vector< Int > > modelsProcessesList_Type |
Definition at line 70 of file MultiscaleCommunicatorsManager.hpp.
|
explicit |
Constructor.
Definition at line 47 of file MultiscaleCommunicatorsManager.cpp.
|
inlinevirtual |
Destructor.
Definition at line 82 of file MultiscaleCommunicatorsManager.hpp.
|
private |
void splitCommunicator | ( | ) |
Split the communicator among the models.
Definition at line 67 of file MultiscaleCommunicatorsManager.cpp.
bool myModel | ( | const UInt & | modelID | ) | const |
Determine if the model is owned by the process.
modelID | ID of the model. |
Definition at line 147 of file MultiscaleCommunicatorsManager.cpp.
|
inline |
Determine the number of model owned by the process.
Definition at line 104 of file MultiscaleCommunicatorsManager.hpp.
void showMe | ( | ) |
Display some information about the communicators.
Definition at line 160 of file MultiscaleCommunicatorsManager.cpp.
|
inline |
Set the main epetra communicator.
comm | Epetra communicator |
Definition at line 122 of file MultiscaleCommunicatorsManager.hpp.
void addGroup | ( | const Real & | load, |
const modelsID_Type & | modelsID | ||
) |
Add a group of models.
This method add a group of models for the forthcoming partitioning of the communicator.
load | percentage load of the model (-1 means each model on a different processor). |
modelsIDList | list of models. |
Definition at line 198 of file MultiscaleCommunicatorsManager.cpp.
|
inline |
Get the communicator of a specific model.
modelID | ID of the model. |
Definition at line 147 of file MultiscaleCommunicatorsManager.hpp.
|
private |
|
private |
Definition at line 226 of file MultiscaleCommunicatorsManager.cpp.
|
private |
Definition at line 403 of file MultiscaleCommunicatorsManager.cpp.
Round a real number to the closest integer.
NOTE: x.5 is rounded to x+1;
value | Real value |
Definition at line 179 of file MultiscaleCommunicatorsManager.hpp.
|
private |
Definition at line 187 of file MultiscaleCommunicatorsManager.hpp.
|
private |
Definition at line 190 of file MultiscaleCommunicatorsManager.hpp.
|
private |
Definition at line 193 of file MultiscaleCommunicatorsManager.hpp.
|
private |
Definition at line 194 of file MultiscaleCommunicatorsManager.hpp.
|
private |
Definition at line 197 of file MultiscaleCommunicatorsManager.hpp.
|
private |
Definition at line 198 of file MultiscaleCommunicatorsManager.hpp.
|
private |
Definition at line 199 of file MultiscaleCommunicatorsManager.hpp.