mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
As discussed in PR #3728, it is better to move the two methods reduceALQtoGroupTarget() and checkGroupTargetsViolated() from OptimizeState to the parent class, then we do not have to abuse OptimizeState in maybeAdjustALQbeforeOptimizeLoop_() just to call reduceALQtoGroupTarget(). Also fixes a typo (as discussed in PR #3729) in reduceALQtoGrouptTarget() where the water rate is updated with the gas flow rate instead of the water flow rate. Should be like this: water_rate = -potentials[this->parent.water_pos_]; instead of water_rate = -potentials[this->parent.gas_pos_];