20 #ifndef OPM_SIMULATORTIMERINTERFACE_HEADER_INCLUDED
21 #define OPM_SIMULATORTIMERINTERFACE_HEADER_INCLUDED
25 #include <boost/date_time/gregorian/gregorian.hpp>
26 #include <boost/date_time/posix_time/posix_time_types.hpp>
27 #include <boost/date_time/posix_time/conversion.hpp>
84 virtual bool done()
const = 0;
104 return std::mktime(&t);
111 virtual std::unique_ptr< SimulatorTimerInterface >
clone ()
const = 0;
117 #endif // OPM_SIMULATORTIMER_HEADER_INCLUDED
virtual boost::posix_time::ptime currentDateTime() const
Return the current time as a posix time object.
Definition: SimulatorTimerInterface.hpp:93
virtual bool done() const =0
Return true if timer indicates that simulation of timer interval is finished.
virtual std::unique_ptr< SimulatorTimerInterface > clone() const =0
return copy of current timer instance
virtual bool lastStepFailed() const =0
Return true if last time step failed.
virtual ~SimulatorTimerInterface()
destructor
Definition: SimulatorTimerInterface.hpp:43
virtual double stepLengthTaken() const =0
Previous step length.
SimulatorTimerInterface()
Default constructor, protected to not allow explicit instances of this class.
Definition: SimulatorTimerInterface.hpp:39
virtual double currentStepLength() const =0
Current step length.
virtual boost::posix_time::ptime startDateTime() const =0
Return start date of simulation.
virtual void advance()=0
advance time by currentStepLength
Interface class for SimulatorTimer objects, to be improved.
Definition: SimulatorTimerInterface.hpp:35
virtual int currentStepNum() const =0
Current step number.
virtual bool initialStep() const =0
Whether the current step is the first step.
virtual time_t currentPosixTime() const
Time elapsed since the start of the POSIX epoch (Jan 1st, 1970) until the current time step begins [s...
Definition: SimulatorTimerInterface.hpp:101
virtual double reportStepLengthTaken() const
Previous report step length.
Definition: SimulatorTimerInterface.hpp:74
virtual int reportStepNum() const
Current report step number. This might differ from currentStepNum in case of sub stepping.
Definition: SimulatorTimerInterface.hpp:52
virtual double simulationTimeElapsed() const =0
Time elapsed since the start of the simulation until the beginning of the current time step [s]...