20 #ifndef OPM_SIMULATORTIMER_HEADER_INCLUDED
21 #define OPM_SIMULATORTIMER_HEADER_INCLUDED
23 #include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
24 #include <opm/simulators/timestepping/SimulatorTimerInterface.hpp>
47 void init(
const ParameterGroup& param);
50 void init(
const TimeMap& timeMap,
size_t report_step = 0);
102 void report(std::ostream& os)
const;
118 virtual std::unique_ptr< SimulatorTimerInterface >
clone()
const;
121 std::vector<double> timesteps_;
123 double current_time_;
125 boost::gregorian::date start_date_;
131 #endif // OPM_SIMULATORTIMER_HEADER_INCLUDED
int currentStepNum() const
Current step number.
Definition: SimulatorTimer.cpp:77
virtual boost::posix_time::ptime currentDateTime() const
Return the current time as a posix time object.
Definition: SimulatorTimerInterface.hpp:93
virtual std::unique_ptr< SimulatorTimerInterface > clone() const
return copy of object
Definition: SimulatorTimer.cpp:162
double totalTime() const
Total time.
Definition: SimulatorTimer.cpp:121
bool done() const
Return true if op++() has been called numSteps() times.
Definition: SimulatorTimer.cpp:155
SimulatorTimer & operator++()
advance time by currentStepLength
Definition: SimulatorTimer.cpp:146
double simulationTimeElapsed() const
Time elapsed since the start of the simulation until the beginning of the current time step [s]...
Definition: SimulatorTimer.cpp:104
void init(const ParameterGroup ¶m)
Initialize from parameters.
Definition: SimulatorTimer.cpp:41
bool lastStepFailed() const
Always return false.
Definition: SimulatorTimer.hpp:115
void setTotalTime(double time)
Set total time.
Definition: SimulatorTimer.cpp:130
void setCurrentStepNum(int step)
Set current step number.
Definition: SimulatorTimer.cpp:83
double currentStepLength() const
Current step length.
Definition: SimulatorTimer.cpp:91
void advance()
advance time by currentStepLength
Definition: SimulatorTimer.hpp:108
boost::posix_time::ptime startDateTime() const
Return start date of simulation.
Definition: SimulatorTimer.cpp:109
int numSteps() const
Total number of steps.
Definition: SimulatorTimer.cpp:71
boost::posix_time::ptime currentDateTime() const
Return current date.
Definition: SimulatorTimer.cpp:115
bool initialStep() const
Whether the current step is the first step.
Definition: SimulatorTimer.cpp:65
void report(std::ostream &os) const
Print a report with current and total time etc.
Definition: SimulatorTimer.cpp:136
Interface class for SimulatorTimer objects, to be improved.
Definition: SimulatorTimerInterface.hpp:35
double stepLengthTaken() const
Previous step length.
Definition: SimulatorTimer.cpp:97
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
Definition: SimulatorTimer.hpp:34
SimulatorTimer()
Default constructor.
Definition: SimulatorTimer.cpp:31