the stl functions are marked constexpr, and this causes
warnings when used in device code. turn on option to
relax this restriction.
move code doing this for other files into source hook
- Rename sumProductionRate_() to sumProductionRateForControlMode_()
to better describe that it sums rates for a specific control mode.
- Add defensive cmode mismatch check in getProductionGroupTarget()
for reservoir coupling slave groups. The slave's cmode should
already match the master's after updateSlaveGroupCmodesFromMaster().
- Replace bare std::logic_error throw with OPM_DEFLOG_THROW in
activePhaseIdxToRescoupPhase_(). The old TODO noted that
deferredLogger() was unavailable, but the method now lives in
GroupStateHelper which provides it.
Group the 24 private methods into six logical sections based
on which public methods call them, making the caller
relationships immediately visible:
A) Constraint checking helpers
B) Injection & production target helpers
C) Guide rate & hierarchy navigation
D) Reservoir coupling helpers
E) Satellite group rate helpers
F) Recursive update helpers
This is a pure code-move with no logic changes.
Store the five per-rate-type production limits (ORAT, WRAT, GRAT,
LRAT, RESV) that the master sends alongside the active target in
ReservoirCouplingSlaveReportStep, with delegation through
ReservoirCouplingSlave.
Add getEffectiveProductionLimit() to GroupStateHelper which combines
the master limit, the slave's local GCONPROD target, and the
GRUPSLAV filter flag (MAST/SLAV/BOTH) to produce the effective
constraint for each rate type.
function is unused for bz == 1 (since we do not use cpr in that case),
but compiler doesn't know that so it will warn about oob deref in
getQuasiImpesWeights
The five per-rate-type blocks (ORAT, WRAT, GRAT, LRAT, RESV) in
BlackoilWellModelConstraints::checkGroupProductionConstraints()
followed an identical pattern. Extract three helpers into
GroupStateHelper (sumProductionRate_, getProductionConstraintTarget_,
checkProductionRateConstraint_) and replace the repetitive blocks
with a single loop over control modes.
BlackoilWellModelConstraints now delegates to GroupStateHelper,
which already holds the required state (comm, phaseUsage,
groupState, deferredLogger). The DeferredLogger& parameter is
removed from the signature since it is redundant.
Pure refactoring, no behavioral change.