Class to handle interaction between MultiMDCellService and InstanceHandling This is currently mainly used for activating/deactivating and addtion/removal of md simulations. Works and interacts with the class coupling::InstanceHandling closely.
More...
#include <MultiMDMediator.h>
template<class LinkedCell, unsigned int dim>
class coupling::MultiMDMediator< LinkedCell, dim >
Class to handle interaction between MultiMDCellService and InstanceHandling This is currently mainly used for activating/deactivating and addtion/removal of md simulations. Works and interacts with the class coupling::InstanceHandling closely.
- Template Parameters
-
LinkedCell | type of the cell |
dim | Number of dimensions; it can be 1, 2 or 3 |
- See also
- see also coupling::InstanceHandling
- Author
- Niklas Wittmer
◆ addMDSimulation() [1/2]
template<class LinkedCell, unsigned int dim>
Autmatically add one MDSimulation trying to keep the number of MD simulation across communicators balanced by computing the average number of active simulations on communicators.
◆ addMDSimulation() [2/2]
template<class LinkedCell, unsigned int dim>
Add one MD simulation on specified communicator.
- Parameters
-
◆ addMDSimulationBlock()
template<class LinkedCell, unsigned int dim>
Add one block of free simulations which is evenly sliced over communicator groups.
◆ addNMDSimulations() [1/2]
template<class LinkedCell, unsigned int dim>
void coupling::MultiMDMediator< LinkedCell, dim >::addNMDSimulations |
( |
const unsigned int & | communicator, |
|
|
const unsigned int & | N ) |
ADD n MD Simulations to specified communicator
- Parameters
-
communicator | |
N | number of new MD |
◆ addNMDSimulations() [2/2]
template<class LinkedCell, unsigned int dim>
Add n MD simulations
- Parameters
-
◆ findActiveLocalIndex()
template<class LinkedCell, unsigned int dim>
On a given communicator find a local index of an inactive md simulation
- Parameters
-
- Returns
- local index of an inactive md simulation
◆ findFirstCommWithHighLoad()
template<class LinkedCell, unsigned int dim>
Try to find a communicator that has a relatively high number of active MD simulations. The average ov this communicator should should have an average or higher-than-average number of active simulations. This method begins lookup at the first communicator.
- Returns
- communicator with a relatively high number of active MD simulations
◆ findFirstCommWithLowLoad()
template<class LinkedCell, unsigned int dim>
Try to find a communicator that has a relatively low number of active MD simulations. This will be a communicator having an average or below-average number of active simulations. This method starts searching at the last communicator.
- Returns
- communicator with a relatively low number of active MD simulations
◆ findInactiveLocalIndex()
template<class LinkedCell, unsigned int dim>
On given communicator find an inactive index
- Parameters
-
- Returns
- inactive index
◆ getAvgNumberOfActiveMDSimulations()
template<class LinkedCell, unsigned int dim>
Get the average number of active simulations running on the communicator groups. The result will be correctly rounded to the nearest integer.
- Returns
- average number of active simulations
◆ getNumberOfActiveMDSimulations() [1/2]
template<class LinkedCell, unsigned int dim>
Find global number of active simulations
- Returns
- total number of active simulation
◆ getNumberOfActiveMDSimulations() [2/2]
template<class LinkedCell, unsigned int dim>
Find number of active simulations local to communicator
- Parameters
-
- Returns
- number of active simulations local to communicator
◆ rmMDSimulation() [1/3]
template<class LinkedCell, unsigned int dim>
Automatically remove one MD simulation trying to keep the number of MD simulations across communicator balanced.
◆ rmMDSimulation() [2/3]
template<class LinkedCell, unsigned int dim>
Remove MD Simulation on specific communicator
- Parameters
-
◆ rmMDSimulation() [3/3]
template<class LinkedCell, unsigned int dim>
void coupling::MultiMDMediator< LinkedCell, dim >::rmMDSimulation |
( |
const unsigned int & | communicator, |
|
|
const unsigned int & | index ) |
Remove MD simulation with specified global identifier.
- Parameters
-
communicator | |
index | global identifier |
- Todo
- How to handle removal of empty places?
◆ rmMDSimulationBlock()
template<class LinkedCell, unsigned int dim>
Remove one sliced block of simulations if all of them are freed.
◆ rmNMDSimulations()
template<class LinkedCell, unsigned int dim>
Remove N MD Simulations
- Parameters
-
◆ shutdownCommunicator()
template<class LinkedCell, unsigned int dim>
Remove ALL simulations on a communicator.
- Parameters
-
The documentation for this class was generated from the following file: