From ee78a7931602721329cdaf84eb9f6e0b70d7e66a Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Wed, 27 Nov 2013 00:23:00 +0100 Subject: [PATCH] Replace unclear constant with better documentation The step number is zero before the first timestep has been taken, and one after. The step number is one before the second timestep has been taken, and two after. This was not clear from the text. --- opm/core/simulator/SimulatorTimer.cpp | 2 +- opm/core/simulator/SimulatorTimer.hpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/opm/core/simulator/SimulatorTimer.cpp b/opm/core/simulator/SimulatorTimer.cpp index b0a205b8..c7bc64af 100644 --- a/opm/core/simulator/SimulatorTimer.cpp +++ b/opm/core/simulator/SimulatorTimer.cpp @@ -30,7 +30,7 @@ namespace Opm /// Default constructor. SimulatorTimer::SimulatorTimer() - : current_step_(FIRST_STEP), + : current_step_(0), current_time_(0.0), start_date_(2012,1,1) // A really arbitrary default starting value?! { diff --git a/opm/core/simulator/SimulatorTimer.hpp b/opm/core/simulator/SimulatorTimer.hpp index 5a02d93d..c9d3d61b 100644 --- a/opm/core/simulator/SimulatorTimer.hpp +++ b/opm/core/simulator/SimulatorTimer.hpp @@ -50,10 +50,10 @@ namespace Opm /// Total number of steps. int numSteps() const; - /// First timestep returned from currentStepNum - static const int FIRST_STEP = 0; - - /// Current step number. + /// Current step number. This is the number of timesteps that + /// has been completed from the start of the run. The time + /// after initialization but before the simulation has started + /// is timestep number zero. int currentStepNum() const; /// Set current step number.