In multi-rank MPI runs, some log messages were written by all ranks instead
of only rank 0, causing "logging fallout" files (e.g., CASE.1.DBG, CASE.2.DBG).
Changes:
- Add rank check before calling logPressures() in FlowThresholdPressure
- Make TimeStepControl verbose flag rank-aware in createController()
This ensures only rank 0 produces log output for these code paths.
In history mode reservoir coupling, no GRUPSLAV keyword is defined because
rate allocation is not needed (wells use WCONHIST with imposed rates).
This caused assertion failures when the well model attempted to exchange
slave group data with numSlaveGroups == 0.
Changes:
- Skip receiving slave group production/injection data when numSlaveGroups == 0
- Skip sending slave group data when numSlaveGroups == 0
Eliminate complicated variant handling in initForInjector_() and
initForProducer_(). The code previously required knowledge of std::variant
internals to understand.
Changes:
- Add getInjectionGuideTargetMode() and getProductionGuideTargetMode()
to GroupStateHelper, delegating the Phase/CMode to GuideRateModel::Target
conversion
- Refactor initForInjector_() and initForProducer_() to construct
calculators directly instead of going through variant intermediaries
- Merge getTargetFromCalculator() and getTargetNoGuideRate() into
getGroupTargetNoGuideRate(), eliminating redundant method and
unused variant parameter
- Call GroupStateHelper directly for groupTarget() instead of extracting
from variant
The variant type is still used for calcModeRateFromRates() which requires
the polymorphic behavior.
History mode reservoir coupling only synchronizes time steps between
master and slaves. No rate allocation occurs, so GRUPSLAV (which maps
slave groups to master groups for rate constraints) is not needed.
Changes:
- Reorder master-slave initial communication so slaves receive master
group names before determining activation date
- Handle zero master groups case in getMasterGroupNamesForSlave_(),
sendMasterGroupNamesToSlaves_(), and receiveMasterGroupNamesFromMasterProcess_()
- Add numMasterGroups_() method to ReservoirCouplingSlave to detect
history mode (no GRUPMAST on master means no master groups)
- When no GRUPSLAV found and numMasterGroups is zero, assume slave
activation at simulation start (history mode)
History mode reservoir coupling only requires time synchronization, not
rate allocation. GRUPMAST is only needed for prediction mode where the
master allocates rates to slaves.
for reason unknown, cmake sometimes choose to pad/escape test names with a
=[ ... ]= in the CTestTestFile. Due to changes lately, this has somehow
triggered. Since we rely on extrating information
from this file, update_data and failure_report triggers broke.
this makes the re's more resilient by allowing the existence of the separators
Master groups in reservoir coupling have no wells in the master
reservoir (they represent slave groups), so their GCW (Group Controlled
Wells) count was 0. This caused them to be incorrectly excluded from:
- Guide rate distribution (FractionCalculator)
- Local reduction level calculations
- Target constraint checking
Fix: Set GCW = 1 for RC master groups by convention. This is consistent
with how GCW is used throughout the code - only the condition GCW > 0
matters, not the actual count.
Update GCONSUMP.DATA and GCONSUMP_COMPLEX.DATA to be valid input for
full simulation runs while preserving their unit test functionality:
- Fix EQUIL datum depth to match gas-oil contact (7020 → 7000)
- Fix PVTO bubble point relationship (Rs/Pbub must be monotonic)
- Extend PVDG pressure range to cover reservoir pressure (→ 300 bar)
- Adjust SGOF Sg_max to avoid floating-point SOGCR precision issue