Simulation timer for adaptive time stepping.
More...
#include <AdaptiveSimulatorTimer.hpp>
|
| 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
|
|
AdaptiveSimulatorTimer & | operator++ () |
| advance time by currentStepLength
|
|
void | advance () |
| advance time by currentStepLength
|
|
void | provideTimeStepEstimate (const double dt_estimate) |
| provide and estimate for new time step size
|
|
bool | initialStep () const |
| Whether this is the first step.
|
|
int | currentStepNum () const |
|
int | reportStepNum () const |
| return current report step
|
|
double | currentStepLength () const |
|
void | setCurrentStepLength (double dt) |
|
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.
|
|
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
|
|
bool | lastStepFailed () const |
| Return true if last time step failed.
|
|
void | setLastStepFailed (bool lastStepFailed) |
| tell the timestepper whether timestep failed or not
|
|
virtual std::unique_ptr< SimulatorTimerInterface > | clone () const |
| return copy of object
|
|
virtual | ~SimulatorTimerInterface () |
| destructor
|
|
virtual double | reportStepLengthTaken () const |
| Previous report step length.
|
|
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].
|
|
|
std::shared_ptr< boost::posix_time::ptime > | start_date_time_ |
|
const double | start_time_ |
|
const double | total_time_ |
|
const int | report_step_ |
|
const double | max_time_step_ |
|
double | current_time_ |
|
double | dt_ |
|
int | current_step_ |
|
std::vector< double > | steps_ |
|
bool | lastStepFailed_ |
|
|
| SimulatorTimerInterface () |
| Default constructor, protected to not allow explicit instances of this class.
|
|
Simulation timer for adaptive time stepping.
◆ AdaptiveSimulatorTimer()
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
- Parameters
-
timer | in case of sub stepping this is the outer timer |
lastStepTaken | last suggested time step |
maxTimeStep | maximum time step allowed |
◆ advance()
void Opm::AdaptiveSimulatorTimer::advance |
( |
| ) |
|
|
inlinevirtual |
◆ clone()
◆ currentStepLength()
double Opm::AdaptiveSimulatorTimer::currentStepLength |
( |
| ) |
const |
|
virtual |
◆ currentStepNum()
int Opm::AdaptiveSimulatorTimer::currentStepNum |
( |
| ) |
const |
|
virtual |
◆ done()
bool Opm::AdaptiveSimulatorTimer::done |
( |
| ) |
const |
|
virtual |
◆ initialStep()
bool Opm::AdaptiveSimulatorTimer::initialStep |
( |
| ) |
const |
|
virtual |
◆ lastStepFailed()
bool Opm::AdaptiveSimulatorTimer::lastStepFailed |
( |
| ) |
const |
|
inlinevirtual |
◆ reportStepNum()
int Opm::AdaptiveSimulatorTimer::reportStepNum |
( |
| ) |
const |
|
virtual |
◆ simulationTimeElapsed()
double Opm::AdaptiveSimulatorTimer::simulationTimeElapsed |
( |
| ) |
const |
|
virtual |
◆ startDateTime()
boost::posix_time::ptime Opm::AdaptiveSimulatorTimer::startDateTime |
( |
| ) |
const |
|
virtual |
◆ stepLengthTaken()
double Opm::AdaptiveSimulatorTimer::stepLengthTaken |
( |
| ) |
const |
|
virtual |
◆ totalTime()
double Opm::AdaptiveSimulatorTimer::totalTime |
( |
| ) |
const |
The documentation for this class was generated from the following files: