MaMiCo 1.2
Loading...
Searching...
No Matches
FromMD2Macro.h
1// Copyright (C) 2015 Technische Universitaet Muenchen
2// This file is part of the Mamico project. For conditions of distribution
3// and use, please see the copyright notice in Mamico's main folder, or at
4// www5.in.tum.de/mamico
5#ifndef _MOLECULARDYNAMICS_COUPLING_SENDRECV_MD2MACRO_H_
6#define _MOLECULARDYNAMICS_COUPLING_SENDRECV_MD2MACRO_H_
7
8#include "coupling/CouplingMDDefinitions.h"
9#include "coupling/datastructures/CellContainer.h"
10#include "coupling/datastructures/FlexibleCellContainer.h"
11#include "coupling/sendrecv/DataExchangeFromMD2Macro.h"
12#include "coupling/sendrecv/SendReceiveBuffer.h"
13#include <vector>
14
15namespace coupling {
16namespace sendrecv {
17template <class Cell_T, unsigned int dim> class FromMD2Macro;
18}
19} // namespace coupling
20
29template <class Cell_T, unsigned int dim> class coupling::sendrecv::FromMD2Macro : public coupling::sendrecv::SendReceiveBuffer<Cell_T, dim> {
30
31public:
34 FromMD2Macro() : coupling::sendrecv::SendReceiveBuffer<Cell_T, dim>() {}
36 virtual ~FromMD2Macro() {}
37
40
52 void sendFromMD2Macro(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Local_Container_T& src, const Macro_Container_T& dst);
53
60 template <class Container_T1, class Container_T2>
61 void reduceFromMD2Macro(std::vector<coupling::sendrecv::DataExchangeFromMD2Macro<dim>*>& dataExchange, const Container_T1& src, const Container_T2& dst);
62
70 void sendFromMD2MacroNonBlocking(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Local_Container_T& src, const Macro_Container_T& dst);
71
78 void wait4SendFromMD2Macro(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Macro_Container_T& cells);
79
80private:
87 void writeToSendBuffer(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Local_Container_T& cells);
88
94 void writeToReduceBuffer(coupling::sendrecv::DataExchangeFromMD2Macro<dim>& dataExchange, const Local_Container_T& cells);
95
104 void allocateReceiveBuffers(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Macro_Container_T& cells);
105
114 template <class Container_T> void allocateReduceBufferForReceiving(coupling::sendrecv::DataExchangeFromMD2Macro<dim>& dataExchange, const Container_T& cells);
115
124 void readFromReceiveBuffer(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Macro_Container_T& cells);
125
134 template <class Container_T> void readFromReduceBuffer(coupling::sendrecv::DataExchangeFromMD2Macro<dim>& dataExchange, const Container_T& cells);
135};
136
137#include "FromMD2Macro.cpph"
138
139#endif // _MOLECULARDYNAMICS_COUPLING_SENDRECV_MD2MACRO_H_
provides access to the coupling cells. Base class for the class coupling::datastructures::LinkedCellC...
Definition CellContainer.h:26
provides access to coupling cells, which may belong to different indexing domains
Definition FlexibleCellContainer.h:30
data exchange from the MD solver to the macroscopic solver. Derived from the class coupling::sendrecv...
Definition DataExchangeFromMD2Macro.h:36
generic class for the the data exchange purposes.
Definition DataExchange.h:27
sends coupling cell information from MaMiCo to the macroscopic solver. Derived from the class couplin...
Definition FromMD2Macro.h:29
void readFromReceiveBuffer(coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Macro_Container_T &cells)
void writeToSendBuffer(coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Local_Container_T &cells)
FromMD2Macro()
Definition FromMD2Macro.h:34
void reduceFromMD2Macro(std::vector< coupling::sendrecv::DataExchangeFromMD2Macro< dim > * > &dataExchange, const Container_T1 &src, const Container_T2 &dst)
virtual ~FromMD2Macro()
Definition FromMD2Macro.h:36
void wait4SendFromMD2Macro(coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Macro_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)
void readFromReduceBuffer(coupling::sendrecv::DataExchangeFromMD2Macro< dim > &dataExchange, const Container_T &cells)
void allocateReduceBufferForReceiving(coupling::sendrecv::DataExchangeFromMD2Macro< dim > &dataExchange, const Container_T &cells)
void sendFromMD2Macro(coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Local_Container_T &src, const Macro_Container_T &dst)
void sendFromMD2MacroNonBlocking(coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Local_Container_T &src, const Macro_Container_T &dst)
generic class for send-/ receive methodology.
Definition SendReceiveBuffer.h:35
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15