MaMiCo
1.2
Toggle main menu visibility
Loading...
Searching...
No Matches
coupling
sendrecv
DataExchange.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_DATAEXCHANGE_H_
6
#define _MOLECULARDYNAMICS_COUPLING_SENDRECV_DATAEXCHANGE_H_
7
8
#include "coupling/datastructures/CouplingCell.h"
9
#include "tarch/la/Vector.h"
10
11
namespace
coupling
{
12
namespace
sendrecv {
13
template
<
class
Cell_T,
unsigned
int
dim>
class
DataExchange
;
14
}
15
}
// namespace coupling
16
27
template
<
class
Cell_T,
unsigned
int
dim>
class
coupling::sendrecv::DataExchange
{
28
public
:
32
DataExchange
(
unsigned
int
tag) :
_tag
(tag) {}
34
virtual
~DataExchange
() {}
35
38
unsigned
int
getTag
()
const
{
return
_tag
; }
39
45
virtual
std::vector<unsigned int>
getTargetRanks
(I01 idx) = 0;
46
52
virtual
std::vector<unsigned int>
getSourceRanks
(I01 idx) = 0;
53
59
virtual
void
readFromCell
(
double
*
const
buffer,
const
Cell_T& cell) = 0;
60
65
virtual
void
writeToCell
(
const
double
*
const
buffer, Cell_T& cell) = 0;
66
68
virtual
unsigned
int
getDoublesPerCell
()
const
= 0;
69
70
private
:
73
const
unsigned
int
_tag
;
74
};
75
76
#endif
// _MOLECULARDYNAMICS_COUPLING_SENDRECV_DATAEXCHANGE_H_
coupling::sendrecv::DataExchange
generic class for the the data exchange purposes.
Definition
DataExchange.h:27
coupling::sendrecv::DataExchange::_tag
const unsigned int _tag
Definition
DataExchange.h:73
coupling::sendrecv::DataExchange::getSourceRanks
virtual std::vector< unsigned int > getSourceRanks(I01 idx)=0
coupling::sendrecv::DataExchange::getTargetRanks
virtual std::vector< unsigned int > getTargetRanks(I01 idx)=0
coupling::sendrecv::DataExchange::getTag
unsigned int getTag() const
Definition
DataExchange.h:38
coupling::sendrecv::DataExchange::DataExchange
DataExchange(unsigned int tag)
Definition
DataExchange.h:32
coupling::sendrecv::DataExchange::readFromCell
virtual void readFromCell(double *const buffer, const Cell_T &cell)=0
coupling::sendrecv::DataExchange::~DataExchange
virtual ~DataExchange()
Definition
DataExchange.h:34
coupling::sendrecv::DataExchange::getDoublesPerCell
virtual unsigned int getDoublesPerCell() const =0
coupling::sendrecv::DataExchange::writeToCell
virtual void writeToCell(const double *const buffer, Cell_T &cell)=0
coupling
everything necessary for coupling operations, is defined in here
Definition
AdditiveMomentumInsertion.h:15
Generated by
1.17.0