Merge pull request #737 from dr-robertk/PR/method-advance-for-timers

Method advance for SimulatorTimers.
This commit is contained in:
Atgeirr Flø Rasmussen 2015-01-28 16:01:51 +01:00
commit 0aebabf41e
3 changed files with 10 additions and 1 deletions

View File

@ -46,6 +46,9 @@ namespace Opm
/// \brief advance time by currentStepLength /// \brief advance time by currentStepLength
AdaptiveSimulatorTimer& operator++ (); AdaptiveSimulatorTimer& operator++ ();
/// \brief advance time by currentStepLength
void advance() { this->operator++ (); }
/// \brief provide and estimate for new time step size /// \brief provide and estimate for new time step size
void provideTimeStepEstimate( const double dt_estimate ); void provideTimeStepEstimate( const double dt_estimate );

View File

@ -95,9 +95,12 @@ namespace Opm
/// Note: if done(), it is an error to call report(). /// Note: if done(), it is an error to call report().
void report(std::ostream& os) const; void report(std::ostream& os) const;
/// Next step. /// advance time by currentStepLength
SimulatorTimer& operator++(); SimulatorTimer& operator++();
/// advance time by currentStepLength
void advance() { this->operator++(); }
/// Return true if op++() has been called numSteps() times. /// Return true if op++() has been called numSteps() times.
bool done() const; bool done() const;

View File

@ -75,6 +75,9 @@ namespace Opm
/// beginning of the current time step [s]. /// beginning of the current time step [s].
virtual double simulationTimeElapsed() const = 0; virtual double simulationTimeElapsed() const = 0;
/// advance time by currentStepLength
virtual void advance() = 0 ;
/// Return true if timer indicates that simulation of timer interval is finished /// Return true if timer indicates that simulation of timer interval is finished
virtual bool done() const = 0; virtual bool done() const = 0;