Merge pull request #1126 from atgeirr/refined-output

Refined output to terminal and log
This commit is contained in:
Atgeirr Flø Rasmussen
2017-04-06 22:17:34 +02:00
committed by GitHub
6 changed files with 21 additions and 22 deletions

View File

@@ -309,7 +309,7 @@ namespace Opm {
current_relaxation_ -= nonlinear_solver.relaxIncrement();
current_relaxation_ = std::max(current_relaxation_, nonlinear_solver.relaxMax());
if (terminalOutputEnabled()) {
std::string msg = " Oscillating behavior detected: Relaxation set to "
std::string msg = " Oscillating behavior detected: Relaxation set to "
+ std::to_string(current_relaxation_);
OpmLog::info(msg);
}

View File

@@ -150,13 +150,11 @@ namespace Opm
} while ( (!converged && (iteration <= maxIter())) || (iteration <= minIter()));
if (!converged) {
std::string msg = "Failed to complete a time step within " + std::to_string(maxIter()) + " iterations.";
if (model_->terminalOutputEnabled()) {
OPM_THROW(Opm::NumericalProblem, "Failed to complete a time step within "+std::to_string(maxIter())+" iterations.");
}
else
{
OPM_THROW_NOLOG(Opm::NumericalProblem, "Failed to complete a time step within "+std::to_string(maxIter())+" iterations.");
OpmLog::problem(msg);
}
OPM_THROW_NOLOG(Opm::NumericalProblem, msg);
}
// Do model-specific post-step actions.

View File

@@ -324,8 +324,9 @@ public:
events.hasEvent(ScheduleEvents::PRODUCTION_UPDATE, timer.currentStepNum()) ||
events.hasEvent(ScheduleEvents::INJECTION_UPDATE, timer.currentStepNum()) ||
events.hasEvent(ScheduleEvents::WELL_STATUS_CHANGE, timer.currentStepNum());
report += adaptiveTimeStepping->step( timer, *solver, state, well_state, event, output_writer_,
output_writer_.requireFIPNUM() ? &fipnum : nullptr );
stepReport = adaptiveTimeStepping->step( timer, *solver, state, well_state, event, output_writer_,
output_writer_.requireFIPNUM() ? &fipnum : nullptr );
report += stepReport;
}
else {
// solve for complete report step
@@ -384,7 +385,7 @@ public:
std::string msg;
msg =
"Time step took " + std::to_string(stepReport.solver_time) + " seconds; "
"Time step took " + std::to_string(solver_timer.secsSinceStart()) + " seconds; "
"total solver time " + std::to_string(report.solver_time) + " seconds.";
OpmLog::note(msg);
}