/// Print a report with current and total time etc. void SimulatorTimer::report(std::ostream& os) const { os << "\n\n--------------- Simulation step number " << currentStepNum() << " ---------------" << "\n Current time (days) " << Opm::unit::convert::to(simulationTimeElapsed(), Opm::unit::day) << "\n Current stepsize (days) " << Opm::unit::convert::to(currentStepLength(), Opm::unit::day) << "\n Total time (days) " << Opm::unit::convert::to(totalTime(), Opm::unit::day) << "\n" << std::endl; }
/// \brief report start and end time as well as used steps so far void AdaptiveSimulatorTimer:: report(std::ostream& os) const { os << "Sub steps started at time = " << unit::convert::to( start_time_, unit::day ) << " (days)" << std::endl; for( size_t i=0; i<steps_.size(); ++i ) { os << " step[ " << i << " ] = " << unit::convert::to( steps_[ i ], unit::day ) << " (days)" << std::endl; } std::cout << "sub steps end time = " << unit::convert::to( simulationTimeElapsed(), unit::day ) << " (days)" << std::endl; }
boost::posix_time::ptime SimulatorTimer::currentDateTime() const { return startDateTime() + boost::posix_time::seconds( (int) simulationTimeElapsed()); }
/// Return the current time as a posix time object. virtual boost::posix_time::ptime currentDateTime() const { return startDateTime() + boost::posix_time::seconds( (int) simulationTimeElapsed()); //boost::posix_time::ptime(startDate()) + boost::posix_time::seconds( (int) simulationTimeElapsed()); }