Added initialStep to SimulatorTimerInterface

This commit is contained in:
Markus Blatt 2017-07-20 12:11:11 +02:00
parent 1939453adb
commit b89aa1fa4a
3 changed files with 12 additions and 1 deletions

View File

@ -51,7 +51,12 @@ namespace Opm
provideTimeStepEstimate( lastStepTaken );
}
AdaptiveSimulatorTimer& AdaptiveSimulatorTimer::operator++ ()
bool AdaptiveSimulatorTimer::initialStep () const
{
return ( report_step_ == 0 ) && ( current_step_ == 0 );
}
AdaptiveSimulatorTimer& AdaptiveSimulatorTimer::operator++ ()
{
++current_step_;
current_time_ += dt_;

View File

@ -56,6 +56,9 @@ namespace Opm
/// \brief provide and estimate for new time step size
void provideTimeStepEstimate( const double dt_estimate );
/// \brief Whether this is the first step
bool initialStep () const;
/// \brief \copydoc SimulationTimer::currentStepNum
int currentStepNum () const;

View File

@ -83,6 +83,9 @@ namespace Opm
/// Return true if timer indicates that simulation of timer interval is finished
virtual bool done() const = 0;
/// Whether the current step is the first step.
virtual bool initialStep() const = 0;
/// Return start date of simulation
virtual boost::posix_time::ptime startDateTime() const = 0;