MaMiCo 1.2
Loading...
Searching...
No Matches
FromMacro2MD.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_FROMMACRO2MD_H_
6#define _MOLECULARDYNAMICS_COUPLING_SENDRECV_FROMMACRO2MD_H_
7
8#include "coupling/sendrecv/DataExchangeFromMacro2MD.h"
9#include "coupling/sendrecv/SendReceiveBuffer.h"
10#include <vector>
11
12namespace coupling {
13namespace sendrecv {
14template <class Cell_T, unsigned int dim> class FromMacro2MD;
15}
16} // namespace coupling
17
28template <class Cell_T, unsigned int dim> class coupling::sendrecv::FromMacro2MD : public coupling::sendrecv::SendReceiveBuffer<Cell_T, dim> {
29
30public:
33 FromMacro2MD() : coupling::sendrecv::SendReceiveBuffer<Cell_T, dim>() {}
35 virtual ~FromMacro2MD() {}
36
38
51 template <class Container_T>
52 void sendFromMacro2MD(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Local_Container_T& dst, const Container_T& src);
53
54 template <class Container_T>
55 void bcastFromMacro2MD(std::vector<coupling::sendrecv::DataExchangeFromMacro2MD<dim>*>& dataExchangeFromCouplingCellServices, const Container_T& src,
56 std::vector<Local_Container_T> dst);
57
65 template <class Container_T> void sendFromMacro2MDNonBlocking(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Container_T& cells);
66
73 void wait4SendFromMacro2MD(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Local_Container_T& cells);
74
75private:
82 template <class Container_T> void writeToSendBuffer(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Container_T& cells);
83
84 template <class Container_T> void writeToSendBufferCollective(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Container_T& cells);
85
93
94 void allocateReceiveBuffersCollective(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange);
95
104 void readFromReceiveBuffer(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Local_Container_T& cells);
105
106 void readFromCollectiveBuffer(coupling::sendrecv::DataExchange<Cell_T, dim>& dataExchange, const Local_Container_T& cells);
107};
108
109#include "FromMacro2MD.cpph"
110
111#endif // _MOLECULARDYNAMICS_COUPLING_SENDRECV_FROMMACRO2MD_H_
provides access to the coupling cells. Base class for the class coupling::datastructures::LinkedCellC...
Definition CellContainer.h:26
data exchange from the macroscopic solver to the MD solver. Derived from the class coupling::sendrecv...
Definition DataExchangeFromMacro2MD.h:36
generic class for the the data exchange purposes.
Definition DataExchange.h:27
SendReceiveBuffer for transfer of quantities from a macroscopic solver to the coupling cells....
Definition FromMacro2MD.h:28
virtual ~FromMacro2MD()
Definition FromMacro2MD.h:35
void sendFromMacro2MDNonBlocking(coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Container_T &cells)
void readFromReceiveBuffer(coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Local_Container_T &cells)
FromMacro2MD()
Definition FromMacro2MD.h:33
void sendFromMacro2MD(coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Local_Container_T &dst, const Container_T &src)
void wait4SendFromMacro2MD(coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Local_Container_T &cells)
void writeToSendBuffer(coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange, const Container_T &cells)
void allocateReceiveBuffers(coupling::sendrecv::DataExchange< Cell_T, dim > &dataExchange)
generic class for send-/ receive methodology.
Definition SendReceiveBuffer.h:35
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15