mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
moving the output of the Report step information earlier
a lot of things have happened before the printing out the `Report step` information. When some error messages get thrown, it is easy to make people confused to look a the wrong report step.
This commit is contained in:
@@ -217,6 +217,18 @@ public:
|
|||||||
OpmLog::debug(ss.str());
|
OpmLog::debug(ss.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (terminalOutput_) {
|
||||||
|
std::ostringstream stepMsg;
|
||||||
|
boost::posix_time::time_facet* facet = new boost::posix_time::time_facet("%d-%b-%Y");
|
||||||
|
stepMsg.imbue(std::locale(std::locale::classic(), facet));
|
||||||
|
stepMsg << "\nReport step " << std::setw(2) <<timer.currentStepNum()
|
||||||
|
<< "/" << timer.numSteps()
|
||||||
|
<< " at day " << (double)unit::convert::to(timer.simulationTimeElapsed(), unit::day)
|
||||||
|
<< "/" << (double)unit::convert::to(timer.totalTime(), unit::day)
|
||||||
|
<< ", date = " << timer.currentDateTime();
|
||||||
|
OpmLog::info(stepMsg.str());
|
||||||
|
}
|
||||||
|
|
||||||
// write the inital state at the report stage
|
// write the inital state at the report stage
|
||||||
if (timer.initialStep()) {
|
if (timer.initialStep()) {
|
||||||
Dune::Timer perfTimer;
|
Dune::Timer perfTimer;
|
||||||
@@ -242,17 +254,6 @@ public:
|
|||||||
solver->model().beginReportStep(firstRestartStep);
|
solver->model().beginReportStep(firstRestartStep);
|
||||||
firstRestartStep = false;
|
firstRestartStep = false;
|
||||||
|
|
||||||
if (terminalOutput_) {
|
|
||||||
std::ostringstream stepMsg;
|
|
||||||
boost::posix_time::time_facet* facet = new boost::posix_time::time_facet("%d-%b-%Y");
|
|
||||||
stepMsg.imbue(std::locale(std::locale::classic(), facet));
|
|
||||||
stepMsg << "\nReport step " << std::setw(2) <<timer.currentStepNum()
|
|
||||||
<< "/" << timer.numSteps()
|
|
||||||
<< " at day " << (double)unit::convert::to(timer.simulationTimeElapsed(), unit::day)
|
|
||||||
<< "/" << (double)unit::convert::to(timer.totalTime(), unit::day)
|
|
||||||
<< ", date = " << timer.currentDateTime();
|
|
||||||
OpmLog::info(stepMsg.str());
|
|
||||||
}
|
|
||||||
|
|
||||||
// If sub stepping is enabled allow the solver to sub cycle
|
// If sub stepping is enabled allow the solver to sub cycle
|
||||||
// in case the report steps are too large for the solver to converge
|
// in case the report steps are too large for the solver to converge
|
||||||
|
|||||||
Reference in New Issue
Block a user