Otherwise the definitions determined by CMake are not available to
opm/simulators/linalg/bda/opencl.hpp and choosing the correct header
might fail.
On my system this at least fixes a warning.
Fallout from #3749
This is needed to get consistent estimates for the summary vectors
* {F,G,W}OP{R,T}{F,S} -- Free/Vaporized Oil Production
* {F,G,W}GP{R,T}{F,S} -- Free/Dissolved Gas Production
in the case of distributed wells.
Thanks to [at]blattms for the suggested fix.
Kernel files are located in opm/simulators/linalg/bda/opencl/kernels.
CMake will combine them for usage in
${PROJECT_BINARY_DIR}/clSources.cpp that becomes part of the library.
Refactors getOilRateWithLimit_(), getGasRateWithLimit_(), and
getWaterRateWithLimit_() in GasLiftSingleWellGeneric.cpp. The
common part of the methods is split out into a new method called
getRateWithLimit_(). The purpose of the refactorization is to reduce
reptetive code and make the code easier to maintain.
This is in agreement with C++ Core Guidelines. A member function should
be marked const unless it changes the object’s observable state. This
gives a more precise statement of design intent, better readability, more
errors caught by the compiler, and sometimes more optimization opportunities.
Refactor getOilRateWithGroupLimit_(), getGasRateWithGroupLimit_(),
getWaterRateWithGroupLimit_(), and getLiquidRateWithGroupLimit_() into
a single generic method called getRateWithGroupLimit_().
Consider all groups when reducing oil rate to group limits.
The current code just checks the first group limit in the set.
But there might be groups later in the set with more restrictive
limits, causing the oil rate to be reduced more than the first
limit.
This allows for testing the simulator with the artifically split communicator,
in order to verify that there is no inappropriate usage of the world communicator.
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_];