MaMiCo 1.2
|
generic class for the the data exchange purposes. More...
#include <DataExchange.h>
Public Member Functions | |
DataExchange (unsigned int tag) | |
virtual | ~DataExchange () |
unsigned int | getTag () const |
virtual std::vector< unsigned int > | getTargetRanks (I01 idx)=0 |
virtual std::vector< unsigned int > | getSourceRanks (I01 idx)=0 |
virtual void | readFromCell (double *const buffer, const Cell_T &cell)=0 |
virtual void | writeToCell (const double *const buffer, Cell_T &cell)=0 |
virtual unsigned int | getDoublesPerCell () const =0 |
Private Attributes | |
const unsigned int | _tag |
generic class for the the data exchange purposes.
This class holds information on the data exchange between processes. In contrast to the SendReceiveBuffer which solely handles the technical part of sending and receiving, this class needs to guarantee the validity in communication, e.g. make sure that each source rank matches to a target rank etc.
CouplingCell | cell type |
dim | Number of dimensions; it can be 1, 2 or 3 |
|
inline |
Constructor: assign an tag (_tag) to the DataExchange.
tag |
|
inlinevirtual |
Destructor
|
pure virtual |
returns the number of doubles that are sent per coupling cell.
Implemented in coupling::sendrecv::DataExchangeFromMacro2MD< dim >, and coupling::sendrecv::DataExchangeFromMD2Macro< dim >.
|
pure virtual |
returns all ranks from which a particular cell (at index idx) is sent. This method should globally define the source ranks for each global cell index of a coupling cell.
idx | unique global cell index |
Implemented in coupling::sendrecv::DataExchangeFromMacro2MD< dim >, and coupling::sendrecv::DataExchangeFromMD2Macro< dim >.
|
inline |
returns the tag associated to messages for this DataExchange.
|
pure virtual |
returns the ranks to which a particular cell (at index idx) should be sent. This method should globally define the target ranks for each global cell index of a coupling cell.
idx | unique global cell index |
Implemented in coupling::sendrecv::DataExchangeFromMacro2MD< dim >, and coupling::sendrecv::DataExchangeFromMD2Macro< dim >.
|
pure virtual |
local rule to read from a coupling cell and write data to (e.g. send) buffer
buffer | |
cell |
Implemented in coupling::sendrecv::DataExchangeFromMacro2MD< dim >, and coupling::sendrecv::DataExchangeFromMD2Macro< dim >.
|
pure virtual |
local rule to read from receive buffer and write data to coupling cell
buffer | |
cell |
Implemented in coupling::sendrecv::DataExchangeFromMacro2MD< dim >, and coupling::sendrecv::DataExchangeFromMD2Macro< dim >.
|
private |
tag to uniquely determine these kinds of messages that are sent between processes.