preCICE v3.2.0
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
16} // namespace testing
17
18namespace cplscheme {
19
27 friend struct testing::ParallelCouplingSchemeFixture; // Make the fixture friend of this class
28public:
43 double maxTime,
44 int maxTimeWindows,
45 double timeWindowSize,
46 const std::string &firstParticipant,
47 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,
62 CouplingMode cplMode);
63
64private:
65 logging::Logger _log{"cplscheme::ParallelCouplingScheme"};
66
68 void exchangeInitialData() final override;
69
70 void exchangeFirstData() final override;
71
72 void exchangeSecondData() final override;
73
74 DataMap &getAccelerationData() final override;
75};
76
77} // namespace cplscheme
78} // 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)
void exchangeSecondData() final override
Exchanges the second set of data.
void exchangeInitialData() final override
implements functionality for initialize in base class.
void exchangeFirstData() final override
Functions needed for advance()
DataMap & getAccelerationData() final override
interface to provide accelerated data, depending on coupling scheme being used
ParallelCouplingScheme(double maxTime, int maxTimeWindows, double timeWindowSize, const std::string &firstParticipant, const std::string &secondParticipant, const std::string &localParticipant, m2n::PtrM2N m2n, CouplingMode cplMode, int minIterations, int maxIterations)
Constructor.
This class provides a lightweight logger.
Definition Logger.hpp:17
contains implementations of coupling schemes for coupled simulations.
std::map< int, PtrCouplingData > DataMap
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.