Opm::SimulatorTimerInterface Class Referenceabstract

Interface class for SimulatorTimer objects, to be improved. More...

#include <SimulatorTimerInterface.hpp>

Inheritance diagram for Opm::SimulatorTimerInterface:
Inheritance graph

Public Member Functions

virtual ~SimulatorTimerInterface ()
 destructor More...
 
virtual int currentStepNum () const =0
 
virtual int reportStepNum () const
 Current report step number. This might differ from currentStepNum in case of sub stepping. More...
 
virtual double currentStepLength () const =0
 
virtual double stepLengthTaken () const =0
 
virtual double reportStepLengthTaken () const
 
virtual double simulationTimeElapsed () const =0
 
virtual void advance ()=0
 advance time by currentStepLength More...
 
virtual bool done () const =0
 Return true if timer indicates that simulation of timer interval is finished. More...
 
virtual bool initialStep () const =0
 Whether the current step is the first step. More...
 
virtual boost::posix_time::ptime startDateTime () const =0
 Return start date of simulation. More...
 
virtual boost::posix_time::ptime currentDateTime () const
 Return the current time as a posix time object. More...
 
virtual time_t currentPosixTime () const
 
virtual bool lastStepFailed () const =0
 Return true if last time step failed. More...
 
virtual std::unique_ptr< SimulatorTimerInterfaceclone () const =0
 return copy of current timer instance More...
 

Protected Member Functions

 SimulatorTimerInterface ()
 Default constructor, protected to not allow explicit instances of this class. More...
 

Detailed Description

Interface class for SimulatorTimer objects, to be improved.

Constructor & Destructor Documentation

◆ SimulatorTimerInterface()

Opm::SimulatorTimerInterface::SimulatorTimerInterface ( )
inlineprotected

Default constructor, protected to not allow explicit instances of this class.

◆ ~SimulatorTimerInterface()

virtual Opm::SimulatorTimerInterface::~SimulatorTimerInterface ( )
inlinevirtual

destructor

Member Function Documentation

◆ advance()

virtual void Opm::SimulatorTimerInterface::advance ( )
pure virtual

advance time by currentStepLength

Implemented in Opm::AdaptiveSimulatorTimer, and Opm::SimulatorTimer.

◆ clone()

virtual std::unique_ptr< SimulatorTimerInterface > Opm::SimulatorTimerInterface::clone ( ) const
pure virtual

return copy of current timer instance

Implemented in Opm::AdaptiveSimulatorTimer, and Opm::SimulatorTimer.

◆ currentDateTime()

virtual boost::posix_time::ptime Opm::SimulatorTimerInterface::currentDateTime ( ) const
virtual

Return the current time as a posix time object.

Reimplemented in Opm::SimulatorTimer.

◆ currentPosixTime()

virtual time_t Opm::SimulatorTimerInterface::currentPosixTime ( ) const
virtual

Time elapsed since the start of the POSIX epoch (Jan 1st, 1970) until the current time step begins [s].

Reimplemented in Opm::SimulatorTimer.

◆ currentStepLength()

virtual double Opm::SimulatorTimerInterface::currentStepLength ( ) const
pure virtual

Current step length. This is the length of the step the simulator will take in the next iteration.

Note
if done(), it is an error to call currentStepLength().

Implemented in Opm::AdaptiveSimulatorTimer, and Opm::SimulatorTimer.

Referenced by Opm::BlackoilModel< TypeTag >::getConvergence(), Opm::BlackoilModel< TypeTag >::prepareStep(), and Opm::NonlinearSolver< TypeTag, PhysicalModel >::step().

◆ currentStepNum()

virtual int Opm::SimulatorTimerInterface::currentStepNum ( ) const
pure 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.

Implemented in Opm::AdaptiveSimulatorTimer, and Opm::SimulatorTimer.

Referenced by Opm::BlackoilModel< TypeTag >::nonlinearIteration(), and reportStepNum().

◆ done()

virtual bool Opm::SimulatorTimerInterface::done ( ) const
pure virtual

Return true if timer indicates that simulation of timer interval is finished.

Implemented in Opm::AdaptiveSimulatorTimer, and Opm::SimulatorTimer.

◆ initialStep()

virtual bool Opm::SimulatorTimerInterface::initialStep ( ) const
pure virtual

Whether the current step is the first step.

Implemented in Opm::AdaptiveSimulatorTimer, and Opm::SimulatorTimer.

◆ lastStepFailed()

virtual bool Opm::SimulatorTimerInterface::lastStepFailed ( ) const
pure virtual

Return true if last time step failed.

Implemented in Opm::AdaptiveSimulatorTimer, and Opm::SimulatorTimer.

Referenced by Opm::BlackoilModel< TypeTag >::prepareStep().

◆ reportStepLengthTaken()

virtual double Opm::SimulatorTimerInterface::reportStepLengthTaken ( ) const
inlinevirtual

Previous report step length. This is the length of the step that was taken to arrive at this report step time.

Note
if no increments have been done (i.e. the timer is still in its constructed state and reportStepNum() == 0), it is an error to call stepLengthTaken().

References stepLengthTaken().

◆ reportStepNum()

virtual int Opm::SimulatorTimerInterface::reportStepNum ( ) const
inlinevirtual

Current report step number. This might differ from currentStepNum in case of sub stepping.

Reimplemented in Opm::AdaptiveSimulatorTimer.

References currentStepNum().

Referenced by Opm::BlackoilModel< TypeTag >::nonlinearIteration(), Opm::BlackoilModel< TypeTag >::prepareStep(), and Opm::EclWriter< TypeTag >::writeOutput().

◆ simulationTimeElapsed()

virtual double Opm::SimulatorTimerInterface::simulationTimeElapsed ( ) const
pure virtual

Time elapsed since the start of the simulation until the beginning of the current time step [s].

Implemented in Opm::AdaptiveSimulatorTimer, and Opm::SimulatorTimer.

Referenced by Opm::BlackoilModel< TypeTag >::getConvergence(), Opm::BlackoilModel< TypeTag >::prepareStep(), and Opm::NonlinearSolver< TypeTag, PhysicalModel >::step().

◆ startDateTime()

virtual boost::posix_time::ptime Opm::SimulatorTimerInterface::startDateTime ( ) const
pure virtual

Return start date of simulation.

Implemented in Opm::AdaptiveSimulatorTimer, and Opm::SimulatorTimer.

◆ stepLengthTaken()

virtual double Opm::SimulatorTimerInterface::stepLengthTaken ( ) const
pure virtual

Previous step length. This is the length of the step that was taken to arrive at this time.

Note
if no increments have been done (i.e. the timer is still in its constructed state and currentStepNum() == 0), it is an error to call stepLengthTaken().

Implemented in Opm::AdaptiveSimulatorTimer, and Opm::SimulatorTimer.

Referenced by reportStepLengthTaken().


The documentation for this class was generated from the following file: