Merge pull request #758 from qilicun/fix-wellIterations-bugs

fix well iterations counting bugs.
This commit is contained in:
Bård Skaflestad 2016-07-20 11:20:28 +02:00 committed by GitHub
commit 01ec7befb4
6 changed files with 6 additions and 7 deletions

View File

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

View File

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

View File

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

View File

@ -117,7 +117,7 @@ namespace Opm {
/// Number of linear solver iterations used in the last call to step(). /// Number of linear solver iterations used in the last call to step().
int linearIterationsLastStep() const; int linearIterationsLastStep() const;
/// Number of well iterations used in the last call to step(). /// Number of well iterations used in all calls to step().
int wellIterationsLastStep() const; int wellIterationsLastStep() const;
/// Reference to physical model. /// Reference to physical model.

View File

@ -92,7 +92,6 @@ namespace Opm
return wellIterationsLast_; return wellIterationsLast_;
} }
template <class PhysicalModel> template <class PhysicalModel>
int int
NonlinearSolver<PhysicalModel>:: NonlinearSolver<PhysicalModel>::

View File

@ -213,7 +213,7 @@ namespace Opm
{ {
std::ostringstream iter_msg; std::ostringstream iter_msg;
iter_msg << "Stepsize " << (double)unit::convert::to(timer.currentStepLength(), unit::day); iter_msg << "Stepsize " << (double)unit::convert::to(timer.currentStepLength(), unit::day);
if (solver->wellIterations() != std::numeric_limits<int>::min()) { if (solver->wellIterations() != 0) {
iter_msg << " days well iterations = " << solver->wellIterations() << ", "; iter_msg << " days well iterations = " << solver->wellIterations() << ", ";
} }
iter_msg << "non-linear iterations = " << solver->nonlinearIterations() iter_msg << "non-linear iterations = " << solver->nonlinearIterations()