Initial well iterations as a special number, output it if it is valid.

This commit is contained in:
Liu Ming 2016-06-30 09:04:44 +08:00
parent 136839bd20
commit d3e6a657cd
5 changed files with 10 additions and 8 deletions

View File

@ -775,7 +775,7 @@ namespace detail {
asImpl().assembleMassBalanceEq(state);
// -------- Well equations ----------
IterationReport iter_report = {false, false, 0, 0};
IterationReport iter_report = {false, false, 0, std::numeric_limits<int>::min()};
if ( ! wellsActive() ) {
return iter_report;
}

View File

@ -182,7 +182,7 @@ namespace Opm {
asImpl().assembleMassBalanceEq(state);
// -------- Well equations ----------
IterationReport iter_report = {false, false, 0, 0};
IterationReport iter_report = {false, false, 0, std::numeric_limits<int>::min()};
if ( ! wellsActive() ) {
return iter_report;
}

View File

@ -124,7 +124,7 @@ namespace Opm {
asImpl().assembleMassBalanceEq(state);
// -------- Well equations ----------
IterationReport iter_report = {false, false, 0, 0};
IterationReport iter_report = {false, false, 0, std::numeric_limits<int>::min()};
if ( ! wellsActive() ) {
return iter_report;
}

View File

@ -179,7 +179,7 @@ namespace Opm
std::ostringstream step_msg;
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 << "Time step " << std::setw(4) <<timer.currentStepNum()
step_msg << "\nTime step " << std::setw(4) <<timer.currentStepNum()
<< " at day " << (double)unit::convert::to(timer.simulationTimeElapsed(), unit::day)
<< "/" << (double)unit::convert::to(timer.totalTime(), unit::day)
<< ", date = " << timer.currentDateTime()
@ -198,9 +198,11 @@ namespace Opm
// solve for complete report step
solver->step(timer.currentStepLength(), state, well_state);
std::ostringstream iter_msg;
iter_msg << "Stepsize " << (double)unit::convert::to(timer.currentStepLength(), unit::day)
<< " days well iterations = " << solver->wellIterations()
<< ", non-linear iterations = " << solver->nonlinearIterations()
iter_msg << "Stepsize " << (double)unit::convert::to(timer.currentStepLength(), unit::day);
if (solver->wellIterations() != std::numeric_limits<int>::min()) {
iter_msg << " days well iterations = " << solver->wellIterations() << ", ";
}
iter_msg << "non-linear iterations = " << solver->nonlinearIterations()
<< ", total linear iterations = " << solver->linearIterations()
<< "\n";
OpmLog::info(iter_msg.str());

View File

@ -526,7 +526,7 @@ namespace Opm {
// -------- Mass balance equations --------
assembleMassBalanceEq(state);
IterationReport iter_report = {false, false, 0, 0};
IterationReport iter_report = {false, false, 0, std::numeric_limits<int>::min()};
// -------- Well equations ----------
if ( ! wellsActive() ) {
return iter_report;