13 double timeWindowSize,
21 :
BiCouplingScheme(maxTime, maxTimeWindows, timeWindowSize, firstParticipant,
27 double timeWindowSize,
98 PRECICE_DEBUG(
"Perform acceleration (only second participant)...");
#define PRECICE_DEBUG(...)
#define PRECICE_ASSERT(...)
void initializeWithZeroInitialData(const DataMap &receiveData)
Initializes storage in receiveData as zero.
void notifyDataHasBeenReceived()
Used to set flag after data has been received using receiveData().
bool isExplicitCouplingScheme() const
Function to determine whether coupling scheme is an explicit coupling scheme.
void sendData(const m2n::PtrM2N &m2n, const DataMap &sendData)
Sends data sendDataIDs given in mapCouplingData with communication.
void storeIteration()
used for storing all Data at end of doImplicitStep for later reference.
bool isImplicitCouplingScheme() const override
Function to determine whether coupling scheme is an implicit coupling scheme.
void sendConvergence(const m2n::PtrM2N &m2n)
sends convergence to other participant via m2n
bool hasConverged() const override
Checks if the implicit cplscheme has converged.
void moveToNextWindow()
finalizes this window's data and initializes data for next window.
void doImplicitStep()
perform a coupling iteration
double getTime() const final override
getter for _time
bool receivesInitializedData() const
Getter for _receivesInitializedData.
bool sendsInitializedData() const final override
Getter for _sendsInitializedData.
double getWindowStartTime() const
double getWindowEndTime() const
DataMap _allData
All send and receive data as a map "data ID -> data".
std::string localParticipant() const final override
Returns the name of the local participant.
void receiveConvergence(const m2n::PtrM2N &m2n)
receives convergence from other participant via m2n
void receiveData(const m2n::PtrM2N &m2n, const DataMap &receiveData)
Receives data receiveDataIDs given in mapCouplingData with communication.
bool doesFirstStep() const
Getter for _doesFirstStep.
DataMap & getSendData()
Returns all data to be sent.
DataMap & getReceiveData()
Returns all data to be received.
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)
m2n::PtrM2N getM2N() const
static const int UNDEFINED_MAX_ITERATIONS
To be used, when the number of max iterations is not defined (for explicit coupling).
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.
contains implementations of coupling schemes for coupled simulations.
std::map< int, PtrCouplingData > DataMap
contains the logic of the parallel communication between participants.
std::shared_ptr< M2N > PtrM2N
constexpr bool equals(const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=NUMERICAL_ZERO_DIFFERENCE)
Compares two Eigen::MatrixBase for equality up to tolerance.