My Project
|
Simulation timer for adaptive time stepping. More...
#include <AdaptiveSimulatorTimer.hpp>
Public Member Functions | |
AdaptiveSimulatorTimer (const SimulatorTimerInterface &timer, const double lastStepTaken, const double maxTimeStep=std::numeric_limits< double >::max()) | |
constructor taking a simulator timer to determine start and end time More... | |
AdaptiveSimulatorTimer & | operator++ () |
advance time by currentStepLength | |
void | advance () |
advance time by currentStepLength More... | |
void | provideTimeStepEstimate (const double dt_estimate) |
provide and estimate for new time step size | |
bool | initialStep () const |
Whether this is the first step. More... | |
int | currentStepNum () const |
int | reportStepNum () const |
return current report step More... | |
double | currentStepLength () const |
double | totalTime () const |
double | simulationTimeElapsed () const |
bool | done () const |
double | averageStepLength () const |
return average step length used so far | |
double | maxStepLength () const |
return max step length used so far | |
double | minStepLength () const |
return min step length used so far | |
double | stepLengthTaken () const |
Previous step length. More... | |
void | report (std::ostream &os) const |
report start and end time as well as used steps so far | |
boost::posix_time::ptime | startDateTime () const |
start date time of simulation More... | |
bool | lastStepFailed () const |
Return true if last time step failed. More... | |
void | setLastStepFailed (bool lastStepFailed) |
tell the timestepper whether timestep failed or not | |
virtual std::unique_ptr< SimulatorTimerInterface > | clone () const |
return copy of object More... | |
![]() | |
virtual | ~SimulatorTimerInterface () |
destructor | |
virtual int | currentStepNum () const =0 |
Current step number. More... | |
virtual int | reportStepNum () const |
Current report step number. This might differ from currentStepNum in case of sub stepping. More... | |
virtual double | currentStepLength () const =0 |
Current step length. More... | |
virtual double | stepLengthTaken () const =0 |
Previous step length. More... | |
virtual double | reportStepLengthTaken () const |
Previous report step length. More... | |
virtual double | simulationTimeElapsed () const =0 |
Time elapsed since the start of the simulation until the beginning of the current time step [s]. More... | |
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 |
Time elapsed since the start of the POSIX epoch (Jan 1st, 1970) until the current time step begins [s]. More... | |
virtual bool | lastStepFailed () const =0 |
Return true if last time step failed. More... | |
virtual std::unique_ptr< SimulatorTimerInterface > | clone () const =0 |
return copy of current timer instance More... | |
Additional Inherited Members | |
![]() | |
SimulatorTimerInterface () | |
Default constructor, protected to not allow explicit instances of this class. | |
Simulation timer for adaptive time stepping.
Opm::AdaptiveSimulatorTimer::AdaptiveSimulatorTimer | ( | const SimulatorTimerInterface & | timer, |
const double | lastStepTaken, | ||
const double | maxTimeStep = std::numeric_limits<double>::max() |
||
) |
constructor taking a simulator timer to determine start and end time
timer | in case of sub stepping this is the outer timer |
lastStepTaken | last suggested time step |
maxTimeStep | maximum time step allowed |
|
inlinevirtual |
advance time by currentStepLength
Implements Opm::SimulatorTimerInterface.
|
virtual |
return copy of object
Implements Opm::SimulatorTimerInterface.
|
virtual |
Implements Opm::SimulatorTimerInterface.
|
virtual |
Implements Opm::SimulatorTimerInterface.
|
virtual |
Implements Opm::SimulatorTimerInterface.
|
virtual |
Whether this is the first step.
Implements Opm::SimulatorTimerInterface.
|
inlinevirtual |
Return true if last time step failed.
Implements Opm::SimulatorTimerInterface.
|
virtual |
return current report step
Reimplemented from Opm::SimulatorTimerInterface.
|
virtual |
Implements Opm::SimulatorTimerInterface.
|
virtual |
start date time of simulation
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.
double Opm::AdaptiveSimulatorTimer::totalTime | ( | ) | const |