diff --git a/opm/simulators/flow/NonlinearSolverEbos.hpp b/opm/simulators/flow/NonlinearSolverEbos.hpp index 1fc7ca206..393795987 100644 --- a/opm/simulators/flow/NonlinearSolverEbos.hpp +++ b/opm/simulators/flow/NonlinearSolverEbos.hpp @@ -151,11 +151,10 @@ namespace Opm { SimulatorReportSingle step(const SimulatorTimerInterface& timer) { - SimulatorReportSingle iterReport; SimulatorReportSingle report; report.global_time = timer.simulationTimeElapsed(); - failureReport_ = SimulatorReportSingle(); - failureReport_.global_time = timer.simulationTimeElapsed(); + report.timestep_length = timer.currentStepLength(); + // Do model-specific once-per-step calculations. model_->prepareStep(timer); @@ -172,7 +171,7 @@ namespace Opm { // Do the nonlinear step. If we are in a converged state, the // model will usually do an early return without an expensive // solve, unless the minIter() count has not been reached yet. - iterReport = model_->nonlinearIteration(iteration, timer, *this); + auto iterReport = model_->nonlinearIteration(iteration, timer, *this); iterReport.global_time = timer.simulationTimeElapsed(); report += iterReport; report.converged = iterReport.converged; @@ -183,7 +182,7 @@ namespace Opm { catch (...) { // if an iteration fails during a time step, all previous iterations // count as a failure as well - failureReport_ += report; + failureReport_ = report; failureReport_ += model_->failureReport(); throw; } diff --git a/opm/simulators/timestepping/SimulatorReport.cpp b/opm/simulators/timestepping/SimulatorReport.cpp index 25c8a443f..4a059b6d9 100644 --- a/opm/simulators/timestepping/SimulatorReport.cpp +++ b/opm/simulators/timestepping/SimulatorReport.cpp @@ -188,13 +188,13 @@ namespace Opm void SimulatorReport::fullReports(std::ostream& os) const { - os << " Time(sec) Time(day) Assembly LSolve LSetup Update Output WellIt Lins NewtIt LinIt Conv\n"; + os << " Time(day) TStep(day) Assembly LSolve LSetup Update Output WellIt Lins NewtIt LinIt Conv\n"; for (size_t i = 0; i < this->stepreports.size(); ++i) { const SimulatorReportSingle& sr = this->stepreports[i]; os.precision(10); os << std::defaultfloat; - os << std::setw(11) << sr.global_time << " "; os << std::setw(11) << unit::convert::to(sr.global_time, unit::day) << " "; + os << std::setw(11) << unit::convert::to(sr.timestep_length, unit::day) << " "; os.precision(4); os << std::fixed; os << std::setw(9) << sr.assemble_time << " ";