Public Member Functions | |
SimulatorTimer () | |
Default constructor. | |
void | init (const ParameterGroup ¶m) |
Initialize from parameters. More... | |
void | init (const TimeMap &timeMap, size_t report_step=0) |
Use the SimulatorTimer as a shim around opm-parser's Opm::TimeMap. | |
bool | initialStep () const |
Whether the current step is the first step. | |
int | numSteps () const |
Total number of steps. | |
int | currentStepNum () const |
Current step number. More... | |
void | setCurrentStepNum (int step) |
Set current step number. | |
double | currentStepLength () const |
Current step length. More... | |
double | stepLengthTaken () const |
Previous step length. More... | |
double | simulationTimeElapsed () const |
Time elapsed since the start of the simulation until the beginning of the current time step [s]. More... | |
double | totalTime () const |
Total time. | |
boost::posix_time::ptime | startDateTime () const |
Return start date of simulation. | |
boost::posix_time::ptime | currentDateTime () const |
Return current date. | |
void | setTotalTime (double time) |
Set total time. More... | |
void | report (std::ostream &os) const |
Print a report with current and total time etc. More... | |
SimulatorTimer & | operator++ () |
advance time by currentStepLength More... | |
void | advance () |
advance time by currentStepLength | |
bool | done () const |
Return true if op++() has been called numSteps() times. | |
bool | lastStepFailed () const |
Always return false. More... | |
virtual std::unique_ptr < SimulatorTimerInterface > | clone () const |
return copy of object | |
![]() | |
virtual | ~SimulatorTimerInterface () |
destructor | |
virtual int | reportStepNum () const |
Current report step number. This might differ from currentStepNum in case of sub stepping. | |
virtual double | reportStepLengthTaken () const |
Previous report step length. More... | |
virtual time_t | currentPosixTime () const |
Time elapsed since the start of the POSIX epoch (Jan 1st, 1970) until the current time step begins [s]. More... | |
Additional Inherited Members | |
![]() | |
SimulatorTimerInterface () | |
Default constructor, protected to not allow explicit instances of this class. | |
|
virtual |
Current step length.
This is the length of the step the simulator will take in the next iteration.
Implements Opm::SimulatorTimerInterface.
|
virtual |
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.
Implements Opm::SimulatorTimerInterface.
void Opm::SimulatorTimer::init | ( | const ParameterGroup & | param | ) |
Initialize from parameters.
Accepts the following: num_psteps (default 1) stepsize_days (default 1)
|
inlinevirtual |
Always return false.
Timestep failures is handled in the substepTimer
Implements Opm::SimulatorTimerInterface.
SimulatorTimer & Opm::SimulatorTimer::operator++ | ( | ) |
advance time by currentStepLength
Next step.
void Opm::SimulatorTimer::report | ( | std::ostream & | os | ) | const |
void Opm::SimulatorTimer::setTotalTime | ( | double | time | ) |
Set total time.
This is primarily intended for multi-epoch schedules, where a timer for a given epoch does not have access to later timesteps.
|
virtual |
Time elapsed since the start of the simulation until the beginning of the current time step [s].
time elapsed since the start of the simulation [s].
Implements Opm::SimulatorTimerInterface.
|
virtual |
Previous step length.
This is the length of the step that was taken to arrive at this time.
Implements Opm::SimulatorTimerInterface.