From 99e291d0ca675cfe44033d9a13688b35c42b2772 Mon Sep 17 00:00:00 2001 From: Robert K Date: Wed, 28 Jan 2015 15:25:11 +0100 Subject: [PATCH 1/2] 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; From ef80032743420c915570794cdab451e7bd4f9968 Mon Sep 17 00:00:00 2001 From: Robert K Date: Wed, 28 Jan 2015 15:46:11 +0100 Subject: [PATCH 2/2] make documentation equal for all three classes. --- opm/core/simulator/SimulatorTimer.hpp | 4 ++-- opm/core/simulator/SimulatorTimerInterface.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opm/core/simulator/SimulatorTimer.hpp b/opm/core/simulator/SimulatorTimer.hpp index 19208ffd..1f2e66b2 100644 --- a/opm/core/simulator/SimulatorTimer.hpp +++ b/opm/core/simulator/SimulatorTimer.hpp @@ -95,10 +95,10 @@ namespace Opm /// Note: if done(), it is an error to call report(). void report(std::ostream& os) const; - /// Next step. + /// advance time by currentStepLength SimulatorTimer& operator++(); - /// Next step. + /// advance time by currentStepLength void advance() { this->operator++(); } /// Return true if op++() has been called numSteps() times. diff --git a/opm/core/simulator/SimulatorTimerInterface.hpp b/opm/core/simulator/SimulatorTimerInterface.hpp index 6852fc57..c3cb9eee 100644 --- a/opm/core/simulator/SimulatorTimerInterface.hpp +++ b/opm/core/simulator/SimulatorTimerInterface.hpp @@ -75,7 +75,7 @@ namespace Opm /// beginning of the current time step [s]. virtual double simulationTimeElapsed() const = 0; - /// advance timer to the next time step + /// advance time by currentStepLength virtual void advance() = 0 ; /// Return true if timer indicates that simulation of timer interval is finished