MaMiCo 1.2
|
sends coupling cell information from MaMiCo to the macroscopic solver. Expects to only receive data from, but will not send any data. Derived from the class coupling::sendrecv::SendReceiveBuffer More...
#include <FromMD2MacroRecvOnly.h>
Public Member Functions | |
FromMD2MacroRecvOnly () | |
virtual | ~FromMD2MacroRecvOnly () |
template<class Container_T> | |
void | sendFromMD2Macro (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Container_T &cells) |
template<class Container_T> | |
void | sendFromMD2MacroNonBlocking (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Container_T &cells) |
template<class Container_T> | |
void | wait4SendFromMD2Macro (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Container_T &cells) |
![]() | |
SendReceiveBuffer () | |
virtual | ~SendReceiveBuffer () |
Private Member Functions | |
template<class Container_T> | |
void | allocateReceiveBuffers (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Container_T &cells) |
template<class Container_T> | |
void | readFromReceiveBuffer (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Container_T &cells) |
Additional Inherited Members | |
![]() | |
void | deleteBuffers () |
deletes the buffers | |
template<class Container_T> | |
void | writeToSendBuffer (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Container_T &cells) |
fills all information that needs to be sent from a coupling cell into the send-buffer. | |
void | writeToBcastBuffer (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Cell_T &cell, I01 idx) |
fills all information that needs to be broadcast from a coupling cell into the broadcast-buffer. | |
void | writeToReduceBuffer (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Cell_T &cell, I01 idx) |
fills all information that needs to be reduced to a coupling cell into the reduce-buffer. | |
template<class Container_T> | |
void | readFromReceiveBuffer (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Container_T &cells) |
void | readFromCollectiveBuffer (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, Cell_T &couplingCell, I01 idx) |
void | readFromReduceBuffer (coupling::sendrecv::DataExchangeFromMD2Macro< dim > &dataExchange, Cell_T &couplingCell, I01 idx) |
void | allocateReceiveBuffers (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, I01 idx) |
void | allocateBcastBufferForReceiving (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, I01 idx) |
void | allocateReduceBufferForReceiving (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, I01 idx) |
void | triggerSending (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange) |
void | triggerBcasts (unsigned int rank) |
void | triggerReceiving (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange) |
void | triggerReduce (unsigned int rank) |
void | waitAllOperations () |
void | waitAllCollectiveOperations () |
void | allocateRequests () |
void | allocateBcastRequests (unsigned int thisRank) |
void | allocateReduceRequests (unsigned int thisRank) |
sends coupling cell information from MaMiCo to the macroscopic solver. Expects to only receive data from, but will not send any data. Derived from the class coupling::sendrecv::SendReceiveBuffer
sends coupling cell information from MaMiCo to the macroscopic solver. This version expects to only receive data from, but will not send any data to a macroscopic solver process. This is used for multi-MD simulations where the macroscopic solver process may run on a completely different process than a single MD simulation.
Cell_T | cell type |
dim | Number of dimensions; it can be 1, 2 or 3 |
|
inline |
Constructor, just calling the constructor of the coupling::sendrecv::SendReceiveBuffer
|
inlinevirtual |
Destructor
|
private |
allocates the receive buffers for the macroscopic solver. Since we do not know anything about the macroscopic solver, we only have a list of global vector cell indices available for possible cells to be received on this rank. For each global cell which is in the list, allocateReceiveBuffers(...) of SendReceiveBuffer is called.
dataExchange | |
cells |
|
private |
reads information from the receive buffer and stores the result in the list of coupling cells. Since this is a receive for the coupling cells on the side of the macroscopic solver, we just have a list of global cell indices and corresponding macrocsopic cell buffers. For each cell in this list, readFromReceiveBuffer(...) of SendReceiveBuffer is called.
dataExchange | |
cells |
void coupling::sendrecv::FromMD2MacroRecvOnly< Cell_T, dim >::sendFromMD2Macro | ( | coupling::sendrecv::DataExchange< Cell_T, dim > & | dataExchange, |
const Container_T & | cells ) |
sends information from the local coupling cells of MaMiCo (only inner non-ghost cells of this process) to the macroscopic solver. Since the macroscopic solver can have an arbitrary distribution of cells on the processes, the buffer for receiving the cell data is provided to this function in terms of an array of coupling cells including the respective global cell indices. Basically calls sendFromMD2MacroNonBlocking(...) and wait4SendFromMD2Macro(...) in a row.
dataExchange | |
cells |
void coupling::sendrecv::FromMD2MacroRecvOnly< Cell_T, dim >::sendFromMD2MacroNonBlocking | ( | coupling::sendrecv::DataExchange< Cell_T, dim > & | dataExchange, |
const Container_T & | cells ) |
triggers the send/recv operations for data transfer. After returning, these data transfers do not necessarily need to be finished, according to ISend/IRecv in MPI.
dataExchange | |
cells |
void coupling::sendrecv::FromMD2MacroRecvOnly< Cell_T, dim >::wait4SendFromMD2Macro | ( | coupling::sendrecv::DataExchange< Cell_T, dim > & | dataExchange, |
const Container_T & | cells ) |
waits for the send operation–instantiated by sendFromMD2MacroNonBlocking(...)–to be finished and writes the data to couplingCellsFromMacroscopicSolver.
dataExchange | |
cells |