Use termininal_output_ to only print time step status once for parallel runs.

Previously each process printed this to the terminal
This commit is contained in:
Markus Blatt 2016-07-04 13:46:29 +02:00
parent 48c8d15ecd
commit 047ae8f444

View File

@ -180,6 +180,9 @@ namespace Opm
auto solver = asImpl().createSolver(well_model);
std::ostringstream step_msg;
if( terminal_output_ )
{
boost::posix_time::time_facet* facet = new boost::posix_time::time_facet("%d-%b-%Y");
step_msg.imbue(std::locale(std::locale::classic(), facet));
step_msg << "\nTime step " << std::setw(4) <<timer.currentStepNum()
@ -188,6 +191,7 @@ namespace Opm
<< ", date = " << timer.currentDateTime()
<< "\n";
OpmLog::info(step_msg.str());
}
// If sub stepping is enabled allow the solver to sub cycle
// in case the report steps are too large for the solver to converge
@ -200,6 +204,9 @@ namespace Opm
else {
// solve for complete report step
solver->step(timer.currentStepLength(), state, well_state);
if( terminal_output_ )
{
std::ostringstream iter_msg;
iter_msg << "Stepsize " << (double)unit::convert::to(timer.currentStepLength(), unit::day);
if (solver->wellIterations() != std::numeric_limits<int>::min()) {
@ -210,6 +217,7 @@ namespace Opm
<< "\n";
OpmLog::info(iter_msg.str());
}
}
// update the derived geology (transmissibilities, pore volumes, etc) if the
// has geology changed for the next report step