MaMiCo 1.2
|
sends coupling cell information from MaMiCo to the macroscopic solver. Derived from the class coupling::sendrecv::SendReceiveBuffer More...
#include <FromMD2Macro.h>
Public Types | |
using | Macro_Container_T = coupling::datastructures::FlexibleCellContainer<dim> |
using | Local_Container_T = coupling::datastructures::CellContainer<I02, dim> |
Public Member Functions | |
FromMD2Macro () | |
virtual | ~FromMD2Macro () |
void | sendFromMD2Macro (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Local_Container_T &src, const Macro_Container_T &dst) |
template<class Container_T1, class Container_T2> | |
void | reduceFromMD2Macro (std::vector< coupling::sendrecv::DataExchangeFromMD2Macro< dim > * > &dataExchange, const Container_T1 &src, const Container_T2 &dst) |
void | sendFromMD2MacroNonBlocking (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Local_Container_T &src, const Macro_Container_T &dst) |
void | wait4SendFromMD2Macro (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Macro_Container_T &cells) |
![]() | |
SendReceiveBuffer () | |
virtual | ~SendReceiveBuffer () |
Private Member Functions | |
void | writeToSendBuffer (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Local_Container_T &cells) |
void | writeToReduceBuffer (coupling::sendrecv::DataExchangeFromMD2Macro< dim > &dataExchange, const Local_Container_T &cells) |
void | allocateReceiveBuffers (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Macro_Container_T &cells) |
template<class Container_T> | |
void | allocateReduceBufferForReceiving (coupling::sendrecv::DataExchangeFromMD2Macro< dim > &dataExchange, const Container_T &cells) |
void | readFromReceiveBuffer (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Macro_Container_T &cells) |
template<class Container_T> | |
void | readFromReduceBuffer (coupling::sendrecv::DataExchangeFromMD2Macro< 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. Derived from the class coupling::sendrecv::SendReceiveBuffer
extends the generic SendReceiveBuffer for send coupling cell information from MaMiCo to the macroscopic solver.
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 |
allocates the reduce 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, allocateReduceBufferForReceiving(...) 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 coupling cell buffers. For each cell in this list, readFromReceiveBuffer(...) of SendReceiveBuffer is called.
dataExchange | |
cells |
|
private |
reads information from the reduce 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 coupling cell buffers. For each cell in this list, readFromReduceBuffer(...) of SendReceiveBuffer is called.
dataExchange | |
cells |
void coupling::sendrecv::FromMD2Macro< Cell_T, dim >::reduceFromMD2Macro | ( | std::vector< coupling::sendrecv::DataExchangeFromMD2Macro< dim > * > & | dataExchange, |
const Container_T1 & | src, | ||
const Container_T2 & | dst ) |
reduces information from the local coupling cells of MaMiCo (only inner non-ghost cells of this process) and sends it to the macroscopic solver.
dataExchange | |
src | |
dst |
void coupling::sendrecv::FromMD2Macro< Cell_T, dim >::sendFromMD2Macro | ( | coupling::sendrecv::DataExchange< Cell_T, dim > & | dataExchange, |
const Local_Container_T & | src, | ||
const Macro_Container_T & | dst ) |
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. This function basically calls for these purposes sendFromMD2MacroNonBlocking(...) and wait4SendFromMD2Macro(...) in a row.
dataExchange | |
src | |
dst |
void coupling::sendrecv::FromMD2Macro< Cell_T, dim >::sendFromMD2MacroNonBlocking | ( | coupling::sendrecv::DataExchange< Cell_T, dim > & | dataExchange, |
const Local_Container_T & | src, | ||
const Macro_Container_T & | dst ) |
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 | |
src | |
dst |
void coupling::sendrecv::FromMD2Macro< Cell_T, dim >::wait4SendFromMD2Macro | ( | coupling::sendrecv::DataExchange< Cell_T, dim > & | dataExchange, |
const Macro_Container_T & | cells ) |
waits for the send operation–instantiated by sendFromMD2MacroNonBlocking(...)–to be finished and writes the data to couplingCellsFromMacroscopicSolver.
dataExchange | |
cells |
|
private |
loops over the whole local Cartesian grid (only non-ghost cells!) and writes respective cells to reduce buffer.
dataExchange | |
cells |
|
private |
loops over the whole local Cartesian grid (only non-ghost cells!) and writes respective cells to send buffer. For each cell, writeToSendBuffer(...) of SendReceiveBuffer is used.
dataExchange | |
cells |