Commit Graph
23648 Commits
Author SHA1 Message Date
Håkon Hægland 044e6a700b Add python_tests target and test fixtures for Python tests
Add CMake infrastructure to simplify building and running Python tests:

- Add `python_tests` target: builds only Python modules and test files
  Usage: `ninja python_tests`

- Add test fixtures: running `ctest -R python_basic` now automatically
  builds the required Python modules first via FIXTURES_REQUIRED

This allows one to quickly iterate on Python tests without building
unrelated C++ test binaries.
2026-01-05 08:54:17 +01:00
Bård Skaflestad 732eba5571 Merge pull request #6708 from akva2/janitoring_clang
Janitoring: fix recently introduce clang warnings
2026-01-02 17:28:02 +01:00
Bård Skaflestad cb87dc5837 Merge pull request #6707 from akva2/override_repo_root
allow overriding base of opm repositories in jenkins build scripts
2026-01-02 17:08:46 +01:00
Arne Morten Kvarving 28210963e8 remove unused variable 2026-01-02 15:10:53 +01:00
Arne Morten Kvarving 5a91f93c46 fixed: instance structs as structs 2026-01-02 15:10:53 +01:00
Arne Morten Kvarving 83fba0ed38 allow overriding base of opm repositories
set environment variable OPM_REPO_ROOT
2026-01-02 14:37:30 +01:00
Markus Blatt 1f8d0a0e8c Merge pull request #6347 from hakonhagland/rc_target
Reservoir coupling: Send master group targets to slaves
2025-12-30 10:11:47 +01:00
Markus Blatt cfeaba8bf3 Merge pull request #6702 from aritorto/upgradeFlag
Upgrade flag in CARFIN test run
2025-12-30 10:09:14 +01:00
Markus Blatt 36266401a4 Merge pull request #6706 from aritorto/onlyLevelZeroNNC
Skip refined cells when computing trans and nncs for output
2025-12-30 09:39:56 +01:00
Antonella Ritorto a5649e8e01 Skip refined cells when computing trans and nncs for output 2025-12-29 11:35:29 +01:00
Håkon Hægland 43d5a147fb Expand PVT region comment with issue #2921 summary 2025-12-23 10:33:28 +01:00
Håkon Hægland c1a2772bee Fix serial build 2025-12-22 17:23:24 +01:00
Antonella Ritorto b7c3132a14 Upgrade flag in CARFIN test run 2025-12-22 12:26:15 +01:00
Håkon Hægland 6e28a2eb32 Fixed master group target calculation 2025-12-21 14:20:51 +01:00
Håkon Hægland e87ae22727 Rebased on #6567 2025-12-20 05:30:36 +01:00
Håkon Hægland d29ead4813 Add comment about future refactorization potential 2025-12-20 05:30:36 +01:00
Håkon Hægland 23c9a9e37b Reorganized reservoir coupling files
Moved files specific to reservoir coupling to sub folder rescoup
2025-12-20 05:30:36 +01:00
Håkon Hægland 818da54499 Added some documentation for GroupTargetCalculator 2025-12-20 05:30:36 +01:00
Håkon Hægland f942da0b99 Rebased on master 2025-12-20 05:30:36 +01:00
Håkon Hægland 92d71abd91 Only send targets to activated slaves 2025-12-20 05:30:36 +01:00
Håkon Hægland b702697a4a Remove duplicate comment 2025-12-20 05:30:36 +01:00
Håkon Hægland deb201c765 Added missing trailing newline at eof 2025-12-20 05:30:36 +01:00
Håkon Hægland 819cc79000 Fix unintended copy in ReservoirCouplingSlave::maybeActivate()
Change auto to const auto& when accessing rescoup() to avoid unnecessary
copy of ReservoirCoupling::CouplingInfo object. The ptr_member::operator()()
returns a const reference, but auto deduces the value type, triggering
copy constructor overhead.

Performance improvements:
* Eliminates copy constructor/destructor calls
* Reduces memory allocation during method execution
* Improves cache efficiency
* Consistent with usage patterns elsewhere in codebase

Addresses performance concern from code review about unintended
copy operations.
2025-12-20 05:30:36 +01:00
Håkon Hægland 60fcd9c3f1 Send master group targets to slaves
Calculate master group targets based on slave group potentials, then
send the targets to the slave groups
2025-12-20 05:30:36 +01:00
Håkon Hægland 2d614b47fa Add ReservoirCoupling::Proxy to reduce #ifdef clutter in well model
Introduce a thin proxy class that encapsulates reservoir coupling
master/slave pointers and provides mode queries (isMaster/isSlave)
that work regardless of MPI availability.

Benefits:
- Mode queries can be called without #ifdef guards
- Member variables no longer need #ifdef protection
- Centralizes MPI-conditional includes in one header
- Consumer code becomes cleaner and more readable

Files changed:
- New: opm/simulators/wells/rescoup/RescoupProxy.hpp
- Modified: BlackoilWellModel.hpp, GuideRateHandler.hpp,
  GroupStateHelper.hpp to use the proxy pattern

The proxy is non-owning (just holds pointers) and copyable.
Setter methods remain guarded since they use MPI-only types.
2025-12-20 05:30:36 +01:00
Markus Blatt 3eee2885a2 Merge pull request #6681 from hakonhagland/fix_eff_factor
Bugfix: Use correct efficiency factor when adding back local reduction contribution in group constraint checking
2025-12-19 17:31:16 +01:00
Markus Blatt 17e35dc14e Merge pull request #6626 from hakonhagland/fix_group_target
Refactor TargetCalculator
2025-12-19 17:29:19 +01:00
Arne Morten Kvarving bfcd737256 Merge pull request #6699 from akva2/par_update_data
jenkins: parallelize reference data update
2025-12-19 14:27:51 +01:00
Arne Morten Kvarving ce80032ade parallelize reference data update 2025-12-19 13:46:33 +01:00
Arne Morten Kvarving 14cc5c2a05 fixed: also do opm-simulators rev parsing in loop
we do not want to rely on cwd
2025-12-19 13:04:18 +01:00
Arne Morten Kvarving fb9cb0be81 Merge pull request #6677 from atgeirr/fix-sprintf
Move linear system export and make it safer.
2025-12-19 12:55:30 +01:00
Atgeirr Flø Rasmussen e436efa295 Move linear system export and make it safer.
- Remove the print...() functions that only wrote partial information.
   If this is needed it may be done by extracting from the export...()
   output instead.
 - Move the export...() functions to a separate file. Keeping the
   top-level function though, and the logic it contained relating to
   avoiding re-writing the sparsity pattern.
 - Make the implementation safer by removing all use of sprintf().
2025-12-19 10:57:20 +01:00
Arne Morten Kvarving 01df15d657 Merge pull request #6698 from akva2/jenkins_add_sca
add static analysis
2025-12-18 14:25:51 +01:00
Arne Morten Kvarving 371b523d1a add static analysis 2025-12-18 14:11:35 +01:00
Bård Skaflestad 6c0a0bb8d4 Merge pull request #6683 from bska/operate-work-init-tests
Add INIT File Tests for WORK Arrays in OPERATE/OPERATER
2025-12-18 13:00:25 +01:00
Bård Skaflestad 020eae42c4 Add INIT File Tests for WORK Arrays in OPERATE/OPERATER
Uses the example models provided in PR OPM/opm-tests#1441.

These are INIT file only tests because the simulation models in
the two example cases aren't particularly interesting.
2025-12-18 12:03:38 +01:00
Bård Skaflestad bf03334b65 Merge pull request #6696 from bska/support-updating-init-files-only
Support Updating INIT File Only Test Cases
2025-12-18 11:59:27 +01:00
Bård Skaflestad 5c24cd2dab Support Updating INIT File Only Test Cases
Certain example models don't have meaningful dynamic results, but
we'd still like to be able to automatically update the static result
files like EGRID and INIT. This commit adds such support under the
assumption that those test cases have names that match the pattern

    *compareECLInitFiles*

While here, also adapt the existing Norne-based INIT file test to
use this file update mechanism instead of its original special case
treatment.
2025-12-18 11:35:47 +01:00
Bård Skaflestad c5caa0861b Merge pull request #6695 from bska/guard-against-missing-result-files
Guard Against Non-Existent Files in Comparison
2025-12-18 11:19:28 +01:00
Bård Skaflestad a3e0453324 Guard Against Non-Existent Files in Comparison
If the reference file does not exist, then this is typically a new
file type or a new case. If the updated file does not exist, then
this is typically because the case no longer generates that
particular file type. If neither the reference nor the update
exists, then that is typically an error that should have been caught
earlier. We nevertheless emit a line into 'data_diff' in this case.
2025-12-18 10:51:29 +01:00
Bård Skaflestad ecd09ccbb3 Merge pull request #6688 from bska/refactor-refdata-update-script
Refactor Reference Solution Update Script
2025-12-17 17:57:17 +01:00
Bård Skaflestad e7100402f0 Refactor Reference Solution Update Script
In particular, separate the individual "update" cases out to
per-case helper functions:

  - updateFullSimulationResults -- Common case.  Updates all file
    types (EGRID, INIT, RFT, SMSPEC, UNSMRY, UNRST) for both base
    runs and restarted runs.
  - updateRestartResults -- Updates all file types for restarted
    runs only.
  - updateDamarisResults -- Updates Damaris-related file types.
  - updateNorneInitFiles -- Updates INIT and EGRID files for the
    Norne case as needed.

While here, also switch to a 'while read' loop for processing
'LastTestsFailed.log' to avoid a needless use of 'cat' and add
rudimentary script and function documentation.  Finally, switch to
using 'printf' instead of an 'echo' loop to generate the commit
message's list of changed test cases.
2025-12-17 17:33:25 +01:00
Arne Morten Kvarving ab3bc80738 Merge pull request #6692 from akva2/jenkins_sep_clone
separate cloning from building in jenkins pipeline
2025-12-17 14:57:13 +01:00
Arne Morten Kvarving e270de559d separate cloning from building in jenkins pipeline 2025-12-17 12:58:32 +01:00
Kai Bao 46ced47847 Merge pull request #6690 from GitPaean/glift_case
correcting the GRUPTREE in GLIFT1.DATA
2025-12-17 12:26:25 +01:00
Kai Bao 4a95285987 correcting the GRUPTREE in GLIFT1.DATA
PROD should be PLAT-A.
2025-12-17 11:53:22 +01:00
Bård Skaflestad c2981c4c3b Merge pull request #6685 from bska/move-add-multi-tests
Move ADD_MULTIPLE_TESTS to Main Test Setup File
2025-12-15 15:37:59 +01:00
Bård Skaflestad 7d92052fd1 Move ADD_MULTIPLE_TESTS to Main Test Setup File
This makes the macros available to all test categories.
2025-12-15 14:04:00 +01:00
Håkon Hægland da720e1900 Fix efficiency factor addback in group constraint checking
The addback calculation at local_reduction_level was using the
accumulated efficiency factor (from entity to control group) instead
of the partial efficiency factor (from entity to local_reduction_level).

This caused incorrect constraint violations when checking higher-level
group constraints. The fix computes the partial efficiency by multiplying
efficiency factors from local_reduction_level down to the entity.
2025-12-15 08:28:39 +01:00
Håkon Hægland 172d62e93a Add test for checkGroupConstraintsProd efficiency factor bug
This test exposes a bug in GroupStateHelper::checkGroupConstraintsProd()
where the addback calculation uses the accumulated efficiency factor
instead of the partial efficiency factor at local_reduction_level.

Test setup:
- Group hierarchy: FIELD -> PLAT (E=0.9) -> MANI (E=0.8) / MANI2 (E=0.7)
- MANI has individual ORAT control, PLAT has guide rate
- WELL-A produces 10000 SM3/day under MANI

The bug causes:
- Addback uses 0.72 (E_MANI * E_PLAT) instead of 0.8 (E_MANI)
- This results in scale = 0.9465 (false constraint violation)
- Correct calculation would give scale = 1.0288 (no violation)

The test currently passes with the buggy expected values. A subsequent
commit will fix the bug and update the test expectations.
2025-12-13 08:00:12 +01:00