My Project
|
Public Member Functions | |
SimulatorTimer () | |
Default constructor. | |
void | init (const ParameterGroup ¶m) |
Initialize from parameters. | |
void | init (const Schedule &schedule, std::size_t report_step=0) |
Use the SimulatorTimer as a shim around opm-commons Schedule class. | |
bool | initialStep () const override |
Whether the current step is the first step. | |
int | numSteps () const |
Total number of steps. | |
int | currentStepNum () const override |
Current step number. | |
void | setCurrentStepNum (int step) |
Set current step number. | |
double | currentStepLength () const override |
Current step length. | |
double | stepLengthTaken () const override |
Previous step length. | |
double | simulationTimeElapsed () const override |
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 override |
Return start date of simulation. | |
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 () override |
advance time by currentStepLength | |
bool | done () const override |
Return true if op++() has been called numSteps() times. | |
bool | lastStepFailed () const override |
Always return false. | |
std::unique_ptr< SimulatorTimerInterface > | clone () const override |
return copy of object | |
template<class Serializer > | |
void | serializeOp (Serializer &serializer) |
bool | operator== (const SimulatorTimer &rhs) const |
virtual boost::posix_time::ptime | currentDateTime () const |
Return the current time as a posix time object. | |
virtual time_t | currentPosixTime () const |
Time elapsed since the start of the POSIX epoch (Jan 1st, 1970) until the current time step begins [s]. | |
![]() | |
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. | |
Static Public Member Functions | |
static SimulatorTimer | serializationTestObject () |
Additional Inherited Members | |
![]() | |
SimulatorTimerInterface () | |
Default constructor, protected to not allow explicit instances of this class. | |
|
inlineoverridevirtual |
advance time by currentStepLength
Implements Opm::SimulatorTimerInterface.
|
overridevirtual |
return copy of object
Implements Opm::SimulatorTimerInterface.
|
virtual |
Return the current time as a posix time object.
Reimplemented from Opm::SimulatorTimerInterface.
|
virtual |
Time elapsed since the start of the POSIX epoch (Jan 1st, 1970) until the current time step begins [s].
Reimplemented from Opm::SimulatorTimerInterface.
|
overridevirtual |
Current step length.
This is the length of the step the simulator will take in the next iteration.
Implements Opm::SimulatorTimerInterface.
|
overridevirtual |
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.
|
overridevirtual |
Return true if op++() has been called numSteps() times.
Implements Opm::SimulatorTimerInterface.
void Opm::SimulatorTimer::init | ( | const ParameterGroup & | param | ) |
Initialize from parameters.
Accepts the following: num_psteps (default 1) stepsize_days (default 1)
void Opm::SimulatorTimer::init | ( | const Schedule & | schedule, |
std::size_t | report_step = 0 ) |
Use the SimulatorTimer as a shim around opm-commons Schedule class.
Use the SimulatorTimer as a shim around opm-parser's Opm::TimeMap.
|
overridevirtual |
Whether the current step is the first step.
Implements Opm::SimulatorTimerInterface.
|
inlineoverridevirtual |
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.
|
overridevirtual |
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.
|
overridevirtual |
Return start date of simulation.
Implements Opm::SimulatorTimerInterface.
|
overridevirtual |
Previous step length.
This is the length of the step that was taken to arrive at this time.
Implements Opm::SimulatorTimerInterface.