MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::sendrecv::FromMacro2MDSendOnly< Cell_T, dim > Class Template Reference

SendReceiveBuffer for transfer of quantities from a macroscopic solver to the coupling cells. Only sends data but expects not to receive any data. Derived from the class coupling::sendrecv::SendReceiveBuffer. More...

#include <FromMacro2MDSendOnly.h>

Inheritance diagram for coupling::sendrecv::FromMacro2MDSendOnly< Cell_T, dim >:
Collaboration diagram for coupling::sendrecv::FromMacro2MDSendOnly< Cell_T, dim >:

Public Member Functions

 FromMacro2MDSendOnly ()
 
virtual ~FromMacro2MDSendOnly ()
 
template<class Container_T>
void sendFromMacro2MD (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Container_T &cells)
 
template<class Container_T>
void sendFromMacro2MDNonBlocking (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Container_T &cells)
 
void wait4SendFromMacro2MD ()
 
- Public Member Functions inherited from coupling::sendrecv::SendReceiveBuffer< Cell_T, dim >
 SendReceiveBuffer ()
 
virtual ~SendReceiveBuffer ()
 

Protected Member Functions

template<class Container_T>
void writeToSendBuffer (coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Container_T &cells)
 
- Protected Member Functions inherited from coupling::sendrecv::SendReceiveBuffer< Cell_T, dim >
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)
 

Detailed Description

template<class Cell_T, unsigned int dim>
class coupling::sendrecv::FromMacro2MDSendOnly< Cell_T, dim >

SendReceiveBuffer for transfer of quantities from a macroscopic solver to the coupling cells. Only sends data but expects not to receive any data. Derived from the class coupling::sendrecv::SendReceiveBuffer.

extends the generic SendReceiveBuffer for transfer of quantities from a macroscopic solver to the coupling cells of the coupling tool (incl. ghost cells). This version only sends data but expects not to receive any data, e.g. due to MD running on different ranks. Derived from the class coupling::sendrecv::SendReceiveBuffer

Template Parameters
Cell_Tcell type
dimNumber of dimensions; it can be 1, 2 or 3
Author
Philipp Neumann

Constructor & Destructor Documentation

◆ FromMacro2MDSendOnly()

template<class Cell_T, unsigned int dim>
coupling::sendrecv::FromMacro2MDSendOnly< Cell_T, dim >::FromMacro2MDSendOnly ( )
inline

Constructor, just calling the constructor of the coupling::sendrecv::SendReceiveBuffer

◆ ~FromMacro2MDSendOnly()

template<class Cell_T, unsigned int dim>
virtual coupling::sendrecv::FromMacro2MDSendOnly< Cell_T, dim >::~FromMacro2MDSendOnly ( )
inlinevirtual

Destructor

Member Function Documentation

◆ sendFromMacro2MD()

template<class Cell_T, unsigned int dim>
template<class Container_T>
void coupling::sendrecv::FromMacro2MDSendOnly< Cell_T, dim >::sendFromMacro2MD ( coupling::sendrecv::DataExchange< Cell_T, dim > & dataExchange,
const Container_T & cells )

sends information from the local coupling cells of a macroscopic solver to the coupling cells of MaMico (ghost cells are also allowed). Since the macroscopic solver can have an arbitrary distribution of cells on the processes, the buffer for sending the cell data is provided to this function in terms of an array of coupling cells including the respective global cell indices. Basically calls sendFromMacro2MDNonBlocking(...) and wait4SendFromMacro2MD(...) in a row.

Parameters
dataExchange
cells

◆ sendFromMacro2MDNonBlocking()

template<class Cell_T, unsigned int dim>
template<class Container_T>
void coupling::sendrecv::FromMacro2MDSendOnly< Cell_T, dim >::sendFromMacro2MDNonBlocking ( coupling::sendrecv::DataExchange< Cell_T, dim > & dataExchange,
const Container_T & cells )

sends data from macro to MD. After returning, the data transfer may not be completely finished, similar to a IRecv/ISend-call by MPI. Please use wait4SendFromMacro2MD(...) to guarantee that the data transfer has been finished.

Parameters
dataExchange
cells
See also
descriptions of same function of class FromMacro2MD.

◆ wait4SendFromMacro2MD()

template<class Cell_T, unsigned int dim>
void coupling::sendrecv::FromMacro2MDSendOnly< Cell_T, dim >::wait4SendFromMacro2MD ( )

waits for the data transfer–instantiated by sendFromMacro2MDNonBlocking(..)–to be finished and fills the information into the coupling cells from Mamico.

See also
class FromMacro2MD.

◆ writeToSendBuffer()

template<class Cell_T, unsigned int dim>
template<class Container_T>
void coupling::sendrecv::FromMacro2MDSendOnly< Cell_T, dim >::writeToSendBuffer ( coupling::sendrecv::DataExchange< Cell_T, dim > & dataExchange,
const Container_T & cells )
protected

given a list of coupling cells (from the macroscopic solver), the data from these cells are written to the send buffer.

Parameters
dataExchange
cells

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