20#ifndef OPM_SIMULATORTIMER_HEADER_INCLUDED
21#define OPM_SIMULATORTIMER_HEADER_INCLUDED
23#include <opm/simulators/timestepping/SimulatorTimerInterface.hpp>
25#include <boost/date_time/gregorian/gregorian_types.hpp>
55 void init(
const Schedule& schedule,
size_t report_step = 0);
104 void report(std::ostream&
os)
const;
113 bool done()
const override;
120 std::unique_ptr<SimulatorTimerInterface>
clone()
const override;
122 template<
class Serializer>
135 std::vector<double> timesteps_;
137 double current_time_;
139 boost::gregorian::date start_date_;
Definition AquiferInterface.hpp:35
Interface class for SimulatorTimer objects, to be improved.
Definition SimulatorTimerInterface.hpp:34
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.cpp:37
virtual boost::posix_time::ptime currentDateTime() const
Return the current time as a posix time object.
Definition SimulatorTimerInterface.cpp:28
Definition SimulatorTimer.hpp:38
void setTotalTime(double time)
Set total time.
Definition SimulatorTimer.cpp:141
double totalTime() const
Total time.
Definition SimulatorTimer.cpp:132
bool lastStepFailed() const override
Always return false.
Definition SimulatorTimer.hpp:117
boost::posix_time::ptime startDateTime() const override
Return start date of simulation.
Definition SimulatorTimer.cpp:125
int numSteps() const
Total number of steps.
Definition SimulatorTimer.cpp:87
double currentStepLength() const override
Current step length.
Definition SimulatorTimer.cpp:107
bool initialStep() const override
Whether the current step is the first step.
Definition SimulatorTimer.cpp:81
void advance() override
advance time by currentStepLength
Definition SimulatorTimer.hpp:110
std::unique_ptr< SimulatorTimerInterface > clone() const override
return copy of object
Definition SimulatorTimer.cpp:173
void setCurrentStepNum(int step)
Set current step number.
Definition SimulatorTimer.cpp:99
void report(std::ostream &os) const
Print a report with current and total time etc.
Definition SimulatorTimer.cpp:147
double simulationTimeElapsed() const override
Time elapsed since the start of the simulation until the beginning of the current time step [s].
Definition SimulatorTimer.cpp:120
int currentStepNum() const override
Current step number.
Definition SimulatorTimer.cpp:93
double stepLengthTaken() const override
Previous step length.
Definition SimulatorTimer.cpp:113
SimulatorTimer()
Default constructor.
Definition SimulatorTimer.cpp:35
SimulatorTimer & operator++()
advance time by currentStepLength
Definition SimulatorTimer.cpp:157
bool done() const override
Return true if op++() has been called numSteps() times.
Definition SimulatorTimer.cpp:166
void init(const ParameterGroup ¶m)
Initialize from parameters.
Definition SimulatorTimer.cpp:57
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27