MaMiCo 1.2
Loading...
Searching...
No Matches
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
15namespace coupling {
16namespace services {
17template <unsigned int dim> class CouplingCellServiceDummy;
18}
19} // namespace coupling
20
29public:
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
79private:
82
88};
89
90#endif // _MOLECULARDYNAMICS_COUPLING_COUPLINGCELLSERVICEDUMMY_H_
configuration for output of coupling cell data to vtk files.
Definition CouplingCellConfiguration.h:24
reads parallel topology configuration. XYZ and ZYX are supported.
Definition ParallelTopologyConfiguration.h:25
provides access to coupling cells, which may belong to different indexing domains
Definition FlexibleCellContainer.h:30
interface for the macroscopic, i.e. continuum solver
Definition MacroscopicSolverInterface.h:23
data exchange from the MD solver to the macroscopic solver. Derived from the class coupling::sendrecv...
Definition DataExchangeFromMD2Macro.h:36
data exchange from the macroscopic solver to the MD solver. Derived from the class coupling::sendrecv...
Definition DataExchangeFromMacro2MD.h:36
sends coupling cell information from MaMiCo to the macroscopic solver. Expects to only receive data f...
Definition FromMD2MacroRecvOnly.h:30
SendReceiveBuffer for transfer of quantities from a macroscopic solver to the coupling cells....
Definition FromMacro2MDSendOnly.h:29
Definition CouplingCellServiceDummy.h:28
coupling::interface::MacroscopicSolverInterface< dim > * _macroscopicSolverInterface
Definition CouplingCellServiceDummy.h:81
coupling::sendrecv::FromMacro2MDSendOnly< coupling::datastructures::CouplingCell< dim >, dim > _fromMacro2MD
Definition CouplingCellServiceDummy.h:84
Definition CouplingCellService.h:49
Definition Vector.h:24
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15