MaMiCo
1.2
Toggle main menu visibility
Loading...
Searching...
No Matches
coupling
services
CouplingCellServiceDummy.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_SERVICES_COUPLINGCELLSERVICEDUMMY_H_
6
#define _MOLECULARDYNAMICS_COUPLING_SERVICES_COUPLINGCELLSERVICEDUMMY_H_
7
8
#include "coupling/services/CouplingCellService.h"
9
10
#include "coupling/sendrecv/DataExchangeFromMD2Macro.h"
11
#include "coupling/sendrecv/DataExchangeFromMacro2MD.h"
12
#include "coupling/sendrecv/FromMD2MacroRecvOnly.h"
13
#include "coupling/sendrecv/FromMacro2MDSendOnly.h"
14
15
namespace
coupling
{
16
namespace
services {
17
template
<
unsigned
int
dim>
class
CouplingCellServiceDummy
;
18
}
19
}
// namespace coupling
20
28
template
<
unsigned
int
dim>
class
coupling::services::CouplingCellServiceDummy
:
public
coupling::services::CouplingCellService
<dim> {
29
public
:
30
CouplingCellServiceDummy(
unsigned
int
ID,
31
coupling::interface::MacroscopicSolverInterface<dim>
* macroscopicSolverInterface,
// interface to macroscopic solver
32
tarch::la::Vector<dim, unsigned int>
numberProcesses,
// number of processes in all directions
33
unsigned
int
rank,
// current rank
34
tarch::la::Vector<dim, double>
globalMDDomainSize,
// domain size of MD simulation -> required for
35
36
tarch::la::Vector<dim, double>
globalMDDomainOffset,
// domain offset of MD simulation
37
38
const
coupling::configurations::ParallelTopologyConfiguration
& parallelTopologyConfiguration,
// configuration for parallel topology
39
const
coupling::configurations::CouplingCellConfiguration<dim>
& couplingCellConfiguration,
// configuration for coupling cells
40
// and respective plotting
41
unsigned
int
topologyOffset)
42
:
coupling::services::CouplingCellService<dim>
(ID, topologyOffset),
_macroscopicSolverInterface
(macroscopicSolverInterface),
43
_deFromMacro2MD(
_macroscopicSolverInterface
, topologyOffset, ID), _deFromMD2Macro(
_macroscopicSolverInterface
, topologyOffset, ID) {
44
45
if
(
_macroscopicSolverInterface
== NULL) {
46
std::cout <<
"ERROR "
47
"coupling::services::CouplingCellServiceDummy::"
48
"CouplingCellServiceDummy(): "
49
"_macroscopicSolverInterface==NULL!"
50
<< std::endl;
51
exit(EXIT_FAILURE);
52
}
53
}
54
55
virtual
~CouplingCellServiceDummy() {}
56
57
void
sendFromMacro2MD(
const
coupling::datastructures::FlexibleCellContainer<dim>
& macro2MDBuffer)
override
{
58
_fromMacro2MD
.sendFromMacro2MD(_deFromMacro2MD, macro2MDBuffer);
59
}
60
double
sendFromMD2Macro(
const
coupling::datastructures::FlexibleCellContainer<dim>
& couplingCellContainerFromMacroscopicSolver)
override
{
61
_fromMD2Macro.sendFromMD2Macro(_deFromMD2Macro, couplingCellContainerFromMacroscopicSolver);
62
return
0;
63
}
64
double
applyFilterPipeline()
override
{
return
0; }
65
void
sendFromMacro2MDPreProcess()
override
{}
66
void
sendFromMacro2MDPostProcess()
override
{}
67
void
sendFromMD2MacroPreProcess()
override
{}
68
void
sendFromMD2MacroPostProcess()
override
{}
69
void
processInnerCouplingCellAfterMDTimestep()
override
{}
70
void
computeAndStoreTemperature(
double
temperature)
override
{}
71
void
applyTemperatureToMolecules(
unsigned
int
t)
override
{}
72
void
distributeMass(
unsigned
int
t)
override
{}
73
void
distributeMomentum(
unsigned
int
t)
override
{}
74
void
perturbateVelocity()
override
{}
75
void
applyBoundaryForce(
unsigned
int
t)
override
{}
76
void
plotEveryMicroscopicTimestep(
unsigned
int
t)
override
{}
77
void
plotEveryMacroscopicTimestep(
unsigned
int
t)
override
{}
78
void
setInnerMomentumImposition(
bool
enable)
override
{}
79
80
private
:
82
coupling::interface::MacroscopicSolverInterface<dim>
*
_macroscopicSolverInterface
;
83
85
coupling::sendrecv::FromMacro2MDSendOnly<coupling::datastructures::CouplingCell<dim>
, dim>
_fromMacro2MD
;
86
coupling::sendrecv::DataExchangeFromMacro2MD<dim>
_deFromMacro2MD;
87
coupling::sendrecv::FromMD2MacroRecvOnly<coupling::datastructures::CouplingCell<dim>
, dim> _fromMD2Macro;
88
coupling::sendrecv::DataExchangeFromMD2Macro<dim>
_deFromMD2Macro;
89
};
90
91
#endif
// _MOLECULARDYNAMICS_COUPLING_COUPLINGCELLSERVICEDUMMY_H_
coupling::configurations::CouplingCellConfiguration
configuration for output of coupling cell data to vtk files.
Definition
CouplingCellConfiguration.h:24
coupling::configurations::ParallelTopologyConfiguration
reads parallel topology configuration. XYZ and ZYX are supported.
Definition
ParallelTopologyConfiguration.h:25
coupling::datastructures::FlexibleCellContainer
provides access to coupling cells, which may belong to different indexing domains
Definition
FlexibleCellContainer.h:30
coupling::interface::MacroscopicSolverInterface
interface for the macroscopic, i.e. continuum solver
Definition
MacroscopicSolverInterface.h:23
coupling::sendrecv::DataExchangeFromMD2Macro
data exchange from the MD solver to the macroscopic solver. Derived from the class coupling::sendrecv...
Definition
DataExchangeFromMD2Macro.h:36
coupling::sendrecv::DataExchangeFromMacro2MD
data exchange from the macroscopic solver to the MD solver. Derived from the class coupling::sendrecv...
Definition
DataExchangeFromMacro2MD.h:36
coupling::sendrecv::FromMD2MacroRecvOnly
sends coupling cell information from MaMiCo to the macroscopic solver. Expects to only receive data f...
Definition
FromMD2MacroRecvOnly.h:30
coupling::sendrecv::FromMacro2MDSendOnly
SendReceiveBuffer for transfer of quantities from a macroscopic solver to the coupling cells....
Definition
FromMacro2MDSendOnly.h:29
coupling::services::CouplingCellServiceDummy
Definition
CouplingCellServiceDummy.h:28
coupling::services::CouplingCellServiceDummy::_macroscopicSolverInterface
coupling::interface::MacroscopicSolverInterface< dim > * _macroscopicSolverInterface
Definition
CouplingCellServiceDummy.h:82
coupling::services::CouplingCellServiceDummy::_fromMacro2MD
coupling::sendrecv::FromMacro2MDSendOnly< coupling::datastructures::CouplingCell< dim >, dim > _fromMacro2MD
Definition
CouplingCellServiceDummy.h:85
coupling::services::CouplingCellService
Definition
CouplingCellService.h:50
tarch::la::Vector
Definition
Vector.h:25
coupling
everything necessary for coupling operations, is defined in here
Definition
AdditiveMomentumInsertion.h:15
Generated by
1.17.0