Public Member Functions | |
SimulatorTimer () | |
Default constructor. | |
void | init (const ParameterGroup ¶m) |
Initialize from parameters. | |
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. | |
void | setCurrentStepNum (int step) |
Set current step number. | |
double | currentStepLength () const |
Current step length. | |
double | stepLengthTaken () const |
Previous step length. | |
double | simulationTimeElapsed () const |
Time elapsed since the start of the simulation until the beginning of the current time step [s]. | |
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. | |
void | report (std::ostream &os) const |
Print a report with current and total time etc. | |
SimulatorTimer & | operator++ () |
advance time by currentStepLength | |
void | advance () |
advance time by currentStepLength | |
bool | done () const |
Return true if op++() has been called numSteps() times. | |
bool | lastStepFailed () const |
Always return false. | |
virtual std::unique_ptr < SimulatorTimerInterface > | clone () const |
return copy of object |
double Opm::SimulatorTimer::currentStepLength | ( | ) | const [virtual] |
Current step length.
This is the length of the step the simulator will take in the next iteration.
Implements Opm::SimulatorTimerInterface.
int Opm::SimulatorTimer::currentStepNum | ( | ) | const [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)
bool Opm::SimulatorTimer::lastStepFailed | ( | ) | const [inline, virtual] |
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.
double Opm::SimulatorTimer::simulationTimeElapsed | ( | ) | const [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.
double Opm::SimulatorTimer::stepLengthTaken | ( | ) | const [virtual] |
Previous step length.
This is the length of the step that was taken to arrive at this time.
Implements Opm::SimulatorTimerInterface.