diff --git a/opm/core/simulator/SimulatorReport.cpp b/opm/core/simulator/SimulatorReport.cpp index 951390dc..5748d833 100644 --- a/opm/core/simulator/SimulatorReport.cpp +++ b/opm/core/simulator/SimulatorReport.cpp @@ -26,7 +26,9 @@ namespace Opm SimulatorReport::SimulatorReport() : pressure_time(0.0), transport_time(0.0), - total_time(0.0) + total_time(0.0), + total_newton_iterations( 0 ), + total_linear_iterations( 0 ) { } @@ -35,19 +37,27 @@ namespace Opm pressure_time += sr.pressure_time; transport_time += sr.transport_time; total_time += sr.total_time; + total_newton_iterations += sr.total_newton_iterations; + total_linear_iterations += sr.total_linear_iterations; } void SimulatorReport::report(std::ostream& os) { os << "Total time taken: " << total_time << "\n Pressure time: " << pressure_time - << "\n Transport time: " << transport_time << std::endl; + << "\n Transport time: " << transport_time + << "\n Overall Newton Iterations: " << total_newton_iterations + << "\n Overall Linear Iterations: " << total_linear_iterations + << std::endl; } void SimulatorReport::reportParam(std::ostream& os) { os << "/timing/total_time=" << total_time << "\n/timing/pressure/total_time=" << pressure_time - << "\n/timing/transport/total_time=" << transport_time << std::endl; + << "\n/timing/transport/total_time=" << transport_time + << "\n/timing/newton/iterations=" << total_newton_iterations + << "\n/timing/linear/iterations=" << total_linear_iterations + << std::endl; } diff --git a/opm/core/simulator/SimulatorReport.hpp b/opm/core/simulator/SimulatorReport.hpp index 8e7cb2e8..99869dc7 100644 --- a/opm/core/simulator/SimulatorReport.hpp +++ b/opm/core/simulator/SimulatorReport.hpp @@ -32,6 +32,9 @@ namespace Opm double transport_time; double total_time; + unsigned int total_newton_iterations; + unsigned int total_linear_iterations; + /// Default constructor initializing all times to 0.0. SimulatorReport(); /// Increment this report's times by those in sr.