From d8b4bbb0be5ebcdd0e51e46e93ea5bc9130357a6 Mon Sep 17 00:00:00 2001 From: Alf Birger Rustad Date: Tue, 18 Jun 2019 14:01:08 +0200 Subject: [PATCH] Adding time and date to time step report --- opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp b/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp index 31c9bb192..ba54caf26 100644 --- a/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp +++ b/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp @@ -219,8 +219,13 @@ namespace Opm { const double dt = substepTimer.currentStepLength() ; if (timestepVerbose_) { std::ostringstream ss; + boost::posix_time::time_facet* facet = new boost::posix_time::time_facet("%d-%b-%Y"); + ss.imbue(std::locale(std::locale::classic(), facet)); ss <<"\nTime step " << substepTimer.currentStepNum() << ", stepsize " - << unit::convert::to(substepTimer.currentStepLength(), unit::day) << " days."; + << unit::convert::to(substepTimer.currentStepLength(), unit::day) << " days," + << " at day " << (double)unit::convert::to(substepTimer.simulationTimeElapsed(), unit::day) + << "/" << (double)unit::convert::to(substepTimer.totalTime(), unit::day) + << ", date = " << substepTimer.currentDateTime(); OpmLog::info(ss.str()); }