mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add reportStep method in SimulatorReport and use it
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#include "config.h"
|
||||
#include <opm/core/simulator/SimulatorReport.hpp>
|
||||
#include <ostream>
|
||||
#include <iomanip>
|
||||
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@@ -70,6 +72,22 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
|
||||
void SimulatorReport::reportStep(std::ostringstream& ss)
|
||||
{
|
||||
if ( verbose_ )
|
||||
{
|
||||
ss << "Time step summary: ";
|
||||
if (total_well_iterations != 0) {
|
||||
ss << "well its = " << std::setw(2) << total_well_iterations << ", ";
|
||||
}
|
||||
ss << "newton its = " << std::setw(2) << total_newton_iterations << ", "
|
||||
<< "linearizations = " << std::setw(2) << total_linearizations
|
||||
<< " (" << std::fixed << std::setprecision(3) << std::setw(6) << assemble_time << " sec), "
|
||||
<< "linear its = " << std::setw(3) << total_linear_iterations
|
||||
<< " (" << std::fixed << std::setprecision(3) << std::setw(6) << linear_solve_time << " sec)";
|
||||
}
|
||||
}
|
||||
|
||||
void SimulatorReport::reportFullyImplicit(std::ostream& os, const SimulatorReport* failureReport)
|
||||
{
|
||||
if ( verbose_ )
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace Opm
|
||||
void operator+=(const SimulatorReport& sr);
|
||||
/// Print a report to the given stream.
|
||||
void report(std::ostream& os);
|
||||
void reportStep(std::ostringstream& os);
|
||||
/// Print a report, leaving out the transport time.
|
||||
void reportFullyImplicit(std::ostream& os, const SimulatorReport* failedReport = nullptr);
|
||||
void reportParam(std::ostream& os);
|
||||
|
||||
Reference in New Issue
Block a user