mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove some unused bools
these loops are inf-loops-with-break and the bools are never used
This commit is contained in:
parent
4ff851af9c
commit
de986943f0
@ -1048,11 +1048,10 @@ GasLiftSingleWellGeneric<Scalar>::
|
|||||||
increaseALQtoPositiveOilRate_(Scalar alq,
|
increaseALQtoPositiveOilRate_(Scalar alq,
|
||||||
const LimitedRates& orig_rates) const
|
const LimitedRates& orig_rates) const
|
||||||
{
|
{
|
||||||
bool stop_iteration = false;
|
|
||||||
Scalar temp_alq = alq;
|
Scalar temp_alq = alq;
|
||||||
// use the copy constructor to only copy the rates
|
// use the copy constructor to only copy the rates
|
||||||
BasicRates rates = orig_rates;
|
BasicRates rates = orig_rates;
|
||||||
while (!stop_iteration) {
|
while (true) {
|
||||||
temp_alq += this->increment_;
|
temp_alq += this->increment_;
|
||||||
if (temp_alq > this->max_alq_)
|
if (temp_alq > this->max_alq_)
|
||||||
break;
|
break;
|
||||||
@ -1078,10 +1077,9 @@ increaseALQtoMinALQ_(const Scalar orig_alq,
|
|||||||
assert(min_alq >= 0);
|
assert(min_alq >= 0);
|
||||||
assert(orig_alq < min_alq);
|
assert(orig_alq < min_alq);
|
||||||
assert(min_alq < this->max_alq_);
|
assert(min_alq < this->max_alq_);
|
||||||
bool stop_iteration = false;
|
|
||||||
Scalar alq = orig_alq;
|
Scalar alq = orig_alq;
|
||||||
LimitedRates rates = orig_rates;
|
LimitedRates rates = orig_rates;
|
||||||
while (!stop_iteration) {
|
while (true) {
|
||||||
Scalar temp_alq = alq + this->increment_;
|
Scalar temp_alq = alq + this->increment_;
|
||||||
|
|
||||||
alq = temp_alq;
|
alq = temp_alq;
|
||||||
@ -1175,11 +1173,10 @@ GasLiftSingleWellGeneric<Scalar>::
|
|||||||
reduceALQtoGroupAlqLimits_(const Scalar orig_alq,
|
reduceALQtoGroupAlqLimits_(const Scalar orig_alq,
|
||||||
const LimitedRates& orig_rates) const
|
const LimitedRates& orig_rates) const
|
||||||
{
|
{
|
||||||
bool stop_this_iteration = false;
|
|
||||||
Scalar alq = orig_alq;
|
Scalar alq = orig_alq;
|
||||||
BasicRates rates {orig_rates};
|
BasicRates rates {orig_rates};
|
||||||
Scalar temp_alq = orig_alq;
|
Scalar temp_alq = orig_alq;
|
||||||
while (!stop_this_iteration) {
|
while (true) {
|
||||||
if (temp_alq == 0)
|
if (temp_alq == 0)
|
||||||
break;
|
break;
|
||||||
temp_alq -= this->increment_;
|
temp_alq -= this->increment_;
|
||||||
@ -1268,8 +1265,7 @@ reduceALQtoWellTarget_(const Scalar orig_alq,
|
|||||||
Scalar alq = orig_alq;
|
Scalar alq = orig_alq;
|
||||||
Scalar temp_alq = alq;
|
Scalar temp_alq = alq;
|
||||||
std::optional<LimitedRates> new_rates;
|
std::optional<LimitedRates> new_rates;
|
||||||
bool stop_iteration = false;
|
while (true) {
|
||||||
while (!stop_iteration) {
|
|
||||||
if (temp_alq == 0)
|
if (temp_alq == 0)
|
||||||
break;
|
break;
|
||||||
temp_alq -= this->increment_;
|
temp_alq -= this->increment_;
|
||||||
|
@ -171,10 +171,9 @@ findThpFromBhpIteratively(const std::function<Scalar(const Scalar, const Scalar)
|
|||||||
auto pressure_loss = getVfpBhpAdjustment(bhp + dp, thp_limit);
|
auto pressure_loss = getVfpBhpAdjustment(bhp + dp, thp_limit);
|
||||||
auto thp = thp_func(bhp, pressure_loss);
|
auto thp = thp_func(bhp, pressure_loss);
|
||||||
const Scalar tolerance = 1e-5 * unit::barsa;
|
const Scalar tolerance = 1e-5 * unit::barsa;
|
||||||
bool do_iterate = true;
|
|
||||||
int it = 1;
|
int it = 1;
|
||||||
int max_iterations = 50;
|
int max_iterations = 50;
|
||||||
while (do_iterate) {
|
while (true) {
|
||||||
if (it > max_iterations) {
|
if (it > max_iterations) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user