mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #758 from qilicun/fix-wellIterations-bugs
fix well iterations counting bugs.
This commit is contained in:
commit
01ec7befb4
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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.
|
||||||
|
@ -92,7 +92,6 @@ namespace Opm
|
|||||||
return wellIterationsLast_;
|
return wellIterationsLast_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class PhysicalModel>
|
template <class PhysicalModel>
|
||||||
int
|
int
|
||||||
NonlinearSolver<PhysicalModel>::
|
NonlinearSolver<PhysicalModel>::
|
||||||
@ -150,7 +149,7 @@ namespace Opm
|
|||||||
|
|
||||||
linearIterations_ += linIters;
|
linearIterations_ += linIters;
|
||||||
nonlinearIterations_ += iteration - 1; // Since the last one will always be trivial.
|
nonlinearIterations_ += iteration - 1; // Since the last one will always be trivial.
|
||||||
wellIterations_ += wellIters;
|
wellIterations_ += wellIters;
|
||||||
linearIterationsLast_ = linIters;
|
linearIterationsLast_ = linIters;
|
||||||
nonlinearIterationsLast_ = iteration;
|
nonlinearIterationsLast_ = iteration;
|
||||||
wellIterationsLast_ = wellIters;
|
wellIterationsLast_ = wellIters;
|
||||||
|
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user