preCICE v3.1.2
Loading...
Searching...
No Matches
ParallelCouplingScheme.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
7#include "logging/Logger.hpp"
9#include "utils/assertion.hpp"
10
11namespace precice {
12
13namespace testing {
14// Forward declaration to friend the boost test struct
15struct ParallelCouplingSchemeFixture;
16} // namespace testing
17
18namespace cplscheme {
19
27 friend struct testing::ParallelCouplingSchemeFixture; // Make the fixture friend of this class
28public:
44 double maxTime,
45 int maxTimeWindows,
46 double timeWindowSize,
47 const std::string & firstParticipant,
48 const std::string & secondParticipant,
50 m2n::PtrM2N m2n,
52 CouplingMode cplMode,
53 int minIterations,
54 int maxIterations);
55
57 double maxTime,
58 int maxTimeWindows,
59 double timeWindowSize,
60 const std::string & firstParticipant,
61 const std::string & secondParticipant,
63 m2n::PtrM2N m2n,
65 CouplingMode cplMode);
66
67private:
68 logging::Logger _log{"cplscheme::ParallelCouplingScheme"};
69
71 void exchangeInitialData() override final;
72
73 void exchangeFirstData() override final;
74
75 void exchangeSecondData() override final;
76
77 DataMap &getAccelerationData() override final;
78};
79
80} // namespace cplscheme
81} // namespace precice
std::string localParticipant() const override final
Returns the name of the local participant.
Abstract base class for coupling schemes with two participants.
Coupling scheme for parallel coupling, i.e. simultaneous execution of two coupled participants.
void exchangeFirstData() override final
Functions needed for advance()
DataMap & getAccelerationData() override final
interface to provide accelerated data, depending on coupling scheme being used
void exchangeInitialData() override final
implements functionality for initialize in base class.
ParallelCouplingScheme(double maxTime, int maxTimeWindows, double timeWindowSize, const std::string &firstParticipant, const std::string &secondParticipant, const std::string &localParticipant, m2n::PtrM2N m2n, constants::TimesteppingMethod dtMethod, CouplingMode cplMode, int minIterations, int maxIterations)
Constructor.
void exchangeSecondData() override final
Exchanges the second set of data.
This class provides a lightweight logger.
Definition Logger.hpp:16
Main namespace of the precice library.