19 #ifndef OPM_ADAPTIVESIMULATORTIMER_HEADER_INCLUDED
20 #define OPM_ADAPTIVESIMULATORTIMER_HEADER_INCLUDED
30 #include <opm/simulators/timestepping/SimulatorTimerInterface.hpp>
48 const double lastStepTaken,
49 const double maxTimeStep = std::numeric_limits<double>::max() );
95 void report(std::ostream& os)
const;
107 virtual std::unique_ptr< SimulatorTimerInterface >
clone()
const;
110 std::shared_ptr<boost::posix_time::ptime> start_date_time_;
111 const double start_time_;
112 const double total_time_;
113 const int report_step_;
114 const double max_time_step_;
116 double current_time_;
120 std::vector< double > steps_;
121 bool lastStepFailed_;
Simulation timer for adaptive time stepping.
Definition: AdaptiveSimulatorTimer.hpp:41
boost::posix_time::ptime startDateTime() const
start date time of simulation
Definition: AdaptiveSimulatorTimer.cpp:163
bool done() const
Definition: AdaptiveSimulatorTimer.cpp:126
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
Definition: AdaptiveSimulatorTimer.cpp:35
virtual std::unique_ptr< SimulatorTimerInterface > clone() const
return copy of object
Definition: AdaptiveSimulatorTimer.cpp:170
double currentStepLength() const
Definition: AdaptiveSimulatorTimer.cpp:108
int reportStepNum() const
return current report step
Definition: AdaptiveSimulatorTimer.cpp:106
double minStepLength() const
return min step length used so far
Definition: AdaptiveSimulatorTimer.cpp:145
int currentStepNum() const
Definition: AdaptiveSimulatorTimer.cpp:103
void provideTimeStepEstimate(const double dt_estimate)
provide and estimate for new time step size
Definition: AdaptiveSimulatorTimer.cpp:72
void report(std::ostream &os) const
report start and end time as well as used steps so far
Definition: AdaptiveSimulatorTimer.cpp:153
double totalTime() const
Definition: AdaptiveSimulatorTimer.cpp:122
double stepLengthTaken() const
Previous step length.
Definition: AdaptiveSimulatorTimer.cpp:114
void advance()
advance time by currentStepLength
Definition: AdaptiveSimulatorTimer.hpp:55
double simulationTimeElapsed() const
Definition: AdaptiveSimulatorTimer.cpp:124
bool lastStepFailed() const
Return true if last time step failed.
Definition: AdaptiveSimulatorTimer.hpp:101
double averageStepLength() const
return average step length used so far
Definition: AdaptiveSimulatorTimer.cpp:128
double maxStepLength() const
return max step length used so far
Definition: AdaptiveSimulatorTimer.cpp:138
bool initialStep() const
Whether this is the first step.
Definition: AdaptiveSimulatorTimer.cpp:56
AdaptiveSimulatorTimer & operator++()
advance time by currentStepLength
Definition: AdaptiveSimulatorTimer.cpp:61
void setLastStepFailed(bool lastStepFailed)
tell the timestepper whether timestep failed or not
Definition: AdaptiveSimulatorTimer.hpp:104
Interface class for SimulatorTimer objects, to be improved.
Definition: SimulatorTimerInterface.hpp:34
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:26