preCICE v3.2.0
Loading...
Searching...
No Matches
SerialCouplingScheme.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
7#include "logging/Logger.hpp"
9
10namespace precice {
11
12namespace testing {
13// Forward declaration to friend the boost test struct
15} // namespace testing
16
17namespace cplscheme {
25 friend struct testing::SerialCouplingSchemeFixture; // Make the fixture friend of this class
26public:
42 double maxTime,
43 int maxTimeWindows,
44 double timeWindowSize,
45 const std::string &firstParticipant,
46 const std::string &secondParticipant,
50 CouplingMode cplMode,
51 int minIterations,
52 int maxIterations);
53
55 double maxTime,
56 int maxTimeWindows,
57 double timeWindowSize,
58 const std::string &firstParticipant,
59 const std::string &secondParticipant,
63 CouplingMode cplMode);
64
65 ImplicitData implicitDataToReceive() const final override;
66
67private:
68 logging::Logger _log{"cplschemes::SerialCouplingSchemes"};
69
72
75
77 void sendTimeWindowSize();
78
81
83 void exchangeInitialData() final override;
84
85 void exchangeFirstData() final override;
86
87 void exchangeSecondData() final override;
88
89 DataMap &getAccelerationData() final override;
90};
91
92} // namespace cplscheme
93} // namespace precice
std::string localParticipant() const final override
Returns the name of the local participant.
BiCouplingScheme(double maxTime, int maxTimeWindows, double timeWindowSize, std::string firstParticipant, std::string secondParticipant, const std::string &localParticipant, m2n::PtrM2N m2n, int minIterations, int maxIterations, CouplingMode cplMode, constants::TimesteppingMethod dtMethod)
DataMap & getAccelerationData() final override
interface to provide accelerated data, depending on coupling scheme being used
void receiveAndSetTimeWindowSize()
Receives and sets the time window size, if this participant is the one to receive.
void exchangeInitialData() final override
implements functionality for initialize in base class.
bool _participantSetsTimeWindowSize
Determines, if the time window size is set by the participant.
void exchangeSecondData() final override
Exchanges the second set of data.
void exchangeFirstData() final override
Functions needed for advance()
void sendTimeWindowSize()
Sends time window size, if this participant is the one to send.
SerialCouplingScheme(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.
ImplicitData implicitDataToReceive() const final override
Returns a vector of implicit data to receive in the next advance.
bool _participantReceivesTimeWindowSize
Determines, if the time window size is received by the participant.
contains implementations of coupling schemes for coupled simulations.
std::map< int, PtrCouplingData > DataMap
contains the logging framework.
contains the logic of the parallel communication between participants.
Definition BoundM2N.cpp:12
std::shared_ptr< M2N > PtrM2N
contains the testing framework.
Definition helper.hpp:9
Main namespace of the precice library.