LifeV
MultiscaleCommunicatorsManager Class Reference

MultiscaleCommunicatorsManager - The Multiscale Communicators Manager. More...

#include <MultiscaleCommunicatorsManager.hpp>

+ Collaboration diagram for MultiscaleCommunicatorsManager:

Private Attributes

multiscaleCommPtr_Type M_comm
 
modelsCommunicatorContainer_Type M_commContainer
 
modelsID_Type M_serialModelsID
 
modelsProcessesList_Type M_serialProcesses
 
modelsID_Type M_parallelModelsID
 
modelsLoad_Type M_parallelModelsLoad
 
modelsProcessesList_Type M_parallelProcesses
 

Type definitions

typedef std::map< UInt, multiscaleCommPtr_TypemodelsCommunicatorContainer_Type
 
typedef modelsCommunicatorContainer_Type::const_iterator modelsCommunicatorContainerIterator_Type
 
typedef std::vector< UIntmodelsID_Type
 
typedef modelsID_Type::iterator modelsIDIterator_Type
 
typedef std::vector< RealmodelsLoad_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_TypemodelCommunicator (const UInt &modelID) const
 Get the communicator of a specific model. More...
 

Unimplemented Methods

 MultiscaleCommunicatorsManager (const MultiscaleCommunicatorsManager &solver)
 
MultiscaleCommunicatorsManageroperator= (const MultiscaleCommunicatorsManager &solver)
 

Private Methods

void parallelProcessesDistribution (std::vector< Real > &localNumberOfProcesses, const Int &numberOfProcesses)
 
void parallelProcessesAssignment (std::vector< std::vector< Int > > &parallelProcesses, const std::vector< Real > &localNumberOfProcesses, const Int &numberOfProcesses)
 
Int roundToInteger (const Real &value) const
 Round a real number to the closest integer. More...
 

Detailed Description

MultiscaleCommunicatorsManager - The Multiscale Communicators Manager.

Author
Cristiano Malossi
See also
Full description of the Geometrical Multiscale Framework: [15]
Methodology: [12] [13] [14] [2]
Applications: [11] [10] [3]

The MultiscaleCommunicatorsManager class partitions a communicator among different models.

Definition at line 57 of file MultiscaleCommunicatorsManager.hpp.

Member Typedef Documentation

◆ modelsCommunicatorContainer_Type

◆ modelsCommunicatorContainerIterator_Type

typedef modelsCommunicatorContainer_Type::const_iterator modelsCommunicatorContainerIterator_Type

Definition at line 65 of file MultiscaleCommunicatorsManager.hpp.

◆ modelsID_Type

typedef std::vector< UInt > modelsID_Type

Definition at line 66 of file MultiscaleCommunicatorsManager.hpp.

◆ modelsIDIterator_Type

typedef modelsID_Type::iterator modelsIDIterator_Type

Definition at line 67 of file MultiscaleCommunicatorsManager.hpp.

◆ modelsLoad_Type

typedef std::vector< Real > modelsLoad_Type

Definition at line 68 of file MultiscaleCommunicatorsManager.hpp.

◆ modelsLoadIterator_Type

typedef modelsLoad_Type::iterator modelsLoadIterator_Type

Definition at line 69 of file MultiscaleCommunicatorsManager.hpp.

◆ modelsProcessesList_Type

typedef std::vector< std::vector< Int > > modelsProcessesList_Type

Definition at line 70 of file MultiscaleCommunicatorsManager.hpp.

Constructor & Destructor Documentation

◆ MultiscaleCommunicatorsManager() [1/2]

Constructor.

Definition at line 47 of file MultiscaleCommunicatorsManager.cpp.

+ Here is the caller graph for this function:

◆ ~MultiscaleCommunicatorsManager()

virtual ~MultiscaleCommunicatorsManager ( )
inlinevirtual

Destructor.

Definition at line 82 of file MultiscaleCommunicatorsManager.hpp.

◆ MultiscaleCommunicatorsManager() [2/2]

Member Function Documentation

◆ splitCommunicator()

void splitCommunicator ( )

Split the communicator among the models.

Definition at line 67 of file MultiscaleCommunicatorsManager.cpp.

+ Here is the caller graph for this function:

◆ myModel()

bool myModel ( const UInt modelID) const

Determine if the model is owned by the process.

Parameters
modelIDID of the model.
Returns
true if the model is owned by the process, false otherwise

Definition at line 147 of file MultiscaleCommunicatorsManager.cpp.

+ Here is the caller graph for this function:

◆ myModelsNumber()

UInt myModelsNumber ( ) const
inline

Determine the number of model owned by the process.

Returns
number of model owned by the process

Definition at line 104 of file MultiscaleCommunicatorsManager.hpp.

◆ showMe()

void showMe ( )

Display some information about the communicators.

Definition at line 160 of file MultiscaleCommunicatorsManager.cpp.

+ Here is the caller graph for this function:

◆ setCommunicator()

void setCommunicator ( const multiscaleCommPtr_Type comm)
inline

Set the main epetra communicator.

Parameters
commEpetra communicator

Definition at line 122 of file MultiscaleCommunicatorsManager.hpp.

+ Here is the caller graph for this function:

◆ addGroup()

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.

Parameters
loadpercentage load of the model (-1 means each model on a different processor).
modelsIDListlist of models.

Definition at line 198 of file MultiscaleCommunicatorsManager.cpp.

+ Here is the caller graph for this function:

◆ modelCommunicator()

const multiscaleCommPtr_Type& modelCommunicator ( const UInt modelID) const
inline

Get the communicator of a specific model.

Parameters
modelIDID of the model.
Returns
communicator.

Definition at line 147 of file MultiscaleCommunicatorsManager.hpp.

◆ operator=()

MultiscaleCommunicatorsManager& operator= ( const MultiscaleCommunicatorsManager solver)
private

◆ parallelProcessesDistribution()

void parallelProcessesDistribution ( std::vector< Real > &  localNumberOfProcesses,
const Int numberOfProcesses 
)
private

Definition at line 226 of file MultiscaleCommunicatorsManager.cpp.

◆ parallelProcessesAssignment()

void parallelProcessesAssignment ( std::vector< std::vector< Int > > &  parallelProcesses,
const std::vector< Real > &  localNumberOfProcesses,
const Int numberOfProcesses 
)
private

Definition at line 403 of file MultiscaleCommunicatorsManager.cpp.

◆ roundToInteger()

Int roundToInteger ( const Real value) const
inlineprivate

Round a real number to the closest integer.

NOTE: x.5 is rounded to x+1;

Parameters
valueReal value
Returns
rounded integer value

Definition at line 179 of file MultiscaleCommunicatorsManager.hpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_comm

multiscaleCommPtr_Type M_comm
private

Definition at line 187 of file MultiscaleCommunicatorsManager.hpp.

◆ M_commContainer

modelsCommunicatorContainer_Type M_commContainer
private

Definition at line 190 of file MultiscaleCommunicatorsManager.hpp.

◆ M_serialModelsID

modelsID_Type M_serialModelsID
private

Definition at line 193 of file MultiscaleCommunicatorsManager.hpp.

◆ M_serialProcesses

modelsProcessesList_Type M_serialProcesses
private

Definition at line 194 of file MultiscaleCommunicatorsManager.hpp.

◆ M_parallelModelsID

modelsID_Type M_parallelModelsID
private

Definition at line 197 of file MultiscaleCommunicatorsManager.hpp.

◆ M_parallelModelsLoad

modelsLoad_Type M_parallelModelsLoad
private

Definition at line 198 of file MultiscaleCommunicatorsManager.hpp.

◆ M_parallelProcesses

modelsProcessesList_Type M_parallelProcesses
private

Definition at line 199 of file MultiscaleCommunicatorsManager.hpp.


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