From 99e291d0ca675cfe44033d9a13688b35c42b2772 Mon Sep 17 00:00:00 2001 From: Robert K Date: Wed, 28 Jan 2015 15:25:11 +0100 Subject: [PATCH] SimulatorTimer...: added method advance which is the new interface for previously used operator++. --- opm/core/simulator/AdaptiveSimulatorTimer.hpp | 3 +++ opm/core/simulator/SimulatorTimer.hpp | 3 +++ opm/core/simulator/SimulatorTimerInterface.hpp | 3 +++ 3 files changed, 9 insertions(+) diff --git a/opm/core/simulator/AdaptiveSimulatorTimer.hpp b/opm/core/simulator/AdaptiveSimulatorTimer.hpp index cd6c56b6..870fffd8 100644 --- a/opm/core/simulator/AdaptiveSimulatorTimer.hpp +++ b/opm/core/simulator/AdaptiveSimulatorTimer.hpp @@ -46,6 +46,9 @@ namespace Opm /// \brief advance time by currentStepLength AdaptiveSimulatorTimer& operator++ (); + /// \brief advance time by currentStepLength + void advance() { this->operator++ (); } + /// \brief provide and estimate for new time step size void provideTimeStepEstimate( const double dt_estimate ); diff --git a/opm/core/simulator/SimulatorTimer.hpp b/opm/core/simulator/SimulatorTimer.hpp index 8f9e7b0b..19208ffd 100644 --- a/opm/core/simulator/SimulatorTimer.hpp +++ b/opm/core/simulator/SimulatorTimer.hpp @@ -98,6 +98,9 @@ namespace Opm /// Next step. SimulatorTimer& operator++(); + /// Next step. + void advance() { this->operator++(); } + /// Return true if op++() has been called numSteps() times. bool done() const; diff --git a/opm/core/simulator/SimulatorTimerInterface.hpp b/opm/core/simulator/SimulatorTimerInterface.hpp index 25118fd2..6852fc57 100644 --- a/opm/core/simulator/SimulatorTimerInterface.hpp +++ b/opm/core/simulator/SimulatorTimerInterface.hpp @@ -75,6 +75,9 @@ namespace Opm /// beginning of the current time step [s]. virtual double simulationTimeElapsed() const = 0; + /// advance timer to the next time step + virtual void advance() = 0 ; + /// Return true if timer indicates that simulation of timer interval is finished virtual bool done() const = 0;