mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 02:00:59 -06:00
drop useages of std::numeric_limits for counting well iterations.
This commit is contained in:
parent
6af9aee20f
commit
b43cbe0531
@ -775,7 +775,7 @@ namespace detail {
|
||||
asImpl().assembleMassBalanceEq(state);
|
||||
|
||||
// -------- Well equations ----------
|
||||
IterationReport iter_report = {false, false, 0, std::numeric_limits<int>::min()};
|
||||
IterationReport iter_report = {false, false, 0, 0};
|
||||
if ( ! wellsActive() ) {
|
||||
return iter_report;
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ namespace Opm {
|
||||
asImpl().assembleMassBalanceEq(state);
|
||||
|
||||
// -------- Well equations ----------
|
||||
IterationReport iter_report = {false, false, 0, std::numeric_limits<int>::min()};
|
||||
IterationReport iter_report = {false, false, 0, 0};
|
||||
if ( ! wellsActive() ) {
|
||||
return iter_report;
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ namespace Opm {
|
||||
asImpl().assembleMassBalanceEq(state);
|
||||
|
||||
// -------- Well equations ----------
|
||||
IterationReport iter_report = {false, false, 0, std::numeric_limits<int>::min()};
|
||||
IterationReport iter_report = {false, false, 0, 0};
|
||||
if ( ! wellsActive() ) {
|
||||
return iter_report;
|
||||
}
|
||||
|
@ -137,9 +137,7 @@ namespace Opm
|
||||
}
|
||||
converged = report.converged;
|
||||
linIters += report.linear_iterations;
|
||||
if (report.well_iterations != std::numeric_limits<int>::min()) {
|
||||
wellIters += report.well_iterations;
|
||||
}
|
||||
wellIters += report.well_iterations;
|
||||
++iteration;
|
||||
} while ( (!converged && (iteration <= maxIter())) || (iteration <= minIter()));
|
||||
|
||||
@ -152,14 +150,8 @@ namespace Opm
|
||||
|
||||
linearIterations_ += linIters;
|
||||
nonlinearIterations_ += iteration - 1; // Since the last one will always be trivial.
|
||||
if (wellIters != 0) {
|
||||
wellIterations_ += wellIters;
|
||||
wellIterationsLast_ = wellIters;
|
||||
}
|
||||
if (wellIters == 0) {
|
||||
wellIterations_ = std::numeric_limits<int>::min();
|
||||
wellIterationsLast_ = std::numeric_limits<int>::min();
|
||||
}
|
||||
wellIterations_ = wellIters;
|
||||
wellIterationsLast_ = wellIters;
|
||||
linearIterationsLast_ = linIters;
|
||||
nonlinearIterationsLast_ = iteration;
|
||||
|
||||
|
@ -213,7 +213,7 @@ namespace Opm
|
||||
{
|
||||
std::ostringstream iter_msg;
|
||||
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 << "non-linear iterations = " << solver->nonlinearIterations()
|
||||
|
Loading…
Reference in New Issue
Block a user