84 int startTimeWindow) = 0;
Interface for all coupling schemes.
virtual bool willDataBeExchanged(double lastSolverTimeStepSize) const =0
Returns true, if data will be exchanged when calling advance().
static const int INFINITE_MAX_ITERATIONS
To be used, when the number of max iterations is infinite (for implicit coupling).
CouplingScheme & operator=(CouplingScheme &&)=delete
Action
Actions that are required by CouplingSchemes.
@ WriteCheckpoint
Is the participant required to write a checkpoint?
@ ReadCheckpoint
Is the participant required to read a previously written checkpoint?
@ InitializeData
Is the initialization of coupling data required?
static const double UNDEFINED_MAX_TIME
Does not define a time limit for the coupled simulation.
static const int UNDEFINED_MIN_ITERATIONS
To be used, when the number of min iterations is not defined (for explicit coupling).
static const int UNDEFINED_MAX_ITERATIONS
To be used, when the number of max iterations is not defined (for explicit coupling).
virtual ChangedMeshes firstSynchronization(const ChangedMeshes &changes)=0
virtual void requireAction(Action action)=0
Sets an action required to be performed by the accessor.
virtual bool addComputedTime(double timeToAdd)=0
Adds newly computed time. Has to be called before every advance.
virtual double getTime() const =0
Returns the currently computed time of the coupling scheme.
static std::string toString(Action action)
virtual std::vector< std::string > getCouplingPartners() const =0
Returns list of all coupling partners.
virtual double getTimeWindowStart() const =0
virtual void initialize(double startTime, int startTimeWindow)=0
Initializes the coupling scheme and establishes a communication connection to the coupling partner....
virtual ChangedMeshes secondSynchronization()=0
virtual bool requiresSubsteps() const =0
Returns true if any send data of the scheme requires substeps.
virtual void markActionFulfilled(Action action)=0
Tells the coupling scheme that the accessor has performed the given action.
virtual void secondExchange()=0
virtual bool isImplicitCouplingScheme() const =0
Returns true if the scheme or one subscheme is implicit.
virtual std::string printCouplingState() const =0
Returns a string representation of the current coupling state.
virtual bool isActionFulfilled(Action action) const =0
Returns true, if the given action has already been performed by the accessor.
virtual ~CouplingScheme()
virtual bool isInitialized() const =0
Returns true, if initialize has been called.
virtual double getNextTimeStepMaxSize() const =0
Returns the maximal size of the next time step to be computed.
virtual ImplicitData implicitDataToReceive() const =0
Returns a vector of implicit data to receive in the next advance.
virtual bool isTimeWindowComplete() const =0
Returns true, when the accessor can advance to the next time window.
static const double UNDEFINED_TIME_WINDOW_SIZE
To be used, when the time window size is determined dynamically during the coupling.
virtual double getTimeWindowSize() const =0
Returns the time window size, if one is given by the coupling scheme.
virtual bool sendsInitializedData() const =0
Returns whether this participant of the coupling scheme sends initialized data.
virtual void finalize()=0
Finalizes the coupling and disconnects communication.
virtual bool isCouplingOngoing() const =0
Returns true, when the coupled simulation is still ongoing.
virtual int getTimeWindows() const =0
Returns the currently computed time windows of the coupling scheme.
virtual bool hasConverged() const =0
Returns false if the scheme is implicit and hasn't converged.
virtual bool isActionRequired(Action action) const =0
Returns true, if the given action has to be performed by the accessor.
virtual bool hasTimeWindowSize() const =0
Returns true, if time window size is prescribed by the cpl scheme.
virtual bool hasDataBeenReceived() const =0
Returns true, if data has been exchanged in last call of advance().
static const int UNDEFINED_TIME_WINDOWS
Does not define limit on time windows for the coupled simulation.
virtual void firstExchange()=0
virtual std::string localParticipant() const =0
Returns the name of the local participant.
Main namespace of the precice library.