mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Remove seconds and add timestep to ITERINFO report.
This commit is contained in:
parent
769028b591
commit
9dd2275af9
@ -151,11 +151,10 @@ namespace Opm {
|
|||||||
|
|
||||||
SimulatorReportSingle step(const SimulatorTimerInterface& timer)
|
SimulatorReportSingle step(const SimulatorTimerInterface& timer)
|
||||||
{
|
{
|
||||||
SimulatorReportSingle iterReport;
|
|
||||||
SimulatorReportSingle report;
|
SimulatorReportSingle report;
|
||||||
report.global_time = timer.simulationTimeElapsed();
|
report.global_time = timer.simulationTimeElapsed();
|
||||||
failureReport_ = SimulatorReportSingle();
|
report.timestep_length = timer.currentStepLength();
|
||||||
failureReport_.global_time = timer.simulationTimeElapsed();
|
|
||||||
// Do model-specific once-per-step calculations.
|
// Do model-specific once-per-step calculations.
|
||||||
model_->prepareStep(timer);
|
model_->prepareStep(timer);
|
||||||
|
|
||||||
@ -172,7 +171,7 @@ namespace Opm {
|
|||||||
// Do the nonlinear step. If we are in a converged state, the
|
// Do the nonlinear step. If we are in a converged state, the
|
||||||
// model will usually do an early return without an expensive
|
// model will usually do an early return without an expensive
|
||||||
// solve, unless the minIter() count has not been reached yet.
|
// 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();
|
iterReport.global_time = timer.simulationTimeElapsed();
|
||||||
report += iterReport;
|
report += iterReport;
|
||||||
report.converged = iterReport.converged;
|
report.converged = iterReport.converged;
|
||||||
@ -183,7 +182,7 @@ namespace Opm {
|
|||||||
catch (...) {
|
catch (...) {
|
||||||
// if an iteration fails during a time step, all previous iterations
|
// if an iteration fails during a time step, all previous iterations
|
||||||
// count as a failure as well
|
// count as a failure as well
|
||||||
failureReport_ += report;
|
failureReport_ = report;
|
||||||
failureReport_ += model_->failureReport();
|
failureReport_ += model_->failureReport();
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
@ -188,13 +188,13 @@ namespace Opm
|
|||||||
|
|
||||||
void SimulatorReport::fullReports(std::ostream& os) const
|
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) {
|
for (size_t i = 0; i < this->stepreports.size(); ++i) {
|
||||||
const SimulatorReportSingle& sr = this->stepreports[i];
|
const SimulatorReportSingle& sr = this->stepreports[i];
|
||||||
os.precision(10);
|
os.precision(10);
|
||||||
os << std::defaultfloat;
|
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.global_time, unit::day) << " ";
|
||||||
|
os << std::setw(11) << unit::convert::to(sr.timestep_length, unit::day) << " ";
|
||||||
os.precision(4);
|
os.precision(4);
|
||||||
os << std::fixed;
|
os << std::fixed;
|
||||||
os << std::setw(9) << sr.assemble_time << " ";
|
os << std::setw(9) << sr.assemble_time << " ";
|
||||||
|
Loading…
Reference in New Issue
Block a user