Commit Graph
23081 Commits
Author SHA1 Message Date
Arne Morten Kvarving fafa4d8a19 Merge pull request #6418 from hakonhagland/docstring-template-refactor
Add support for Python docstring.json template format
2025-09-23 08:36:05 +02:00
Arne Morten Kvarving 7679d64ed1 Merge pull request #6488 from svenn-t/fix_pygaswater_tests
Fix Python gas-water simulator test failures
2025-09-23 08:31:49 +02:00
Arne Morten Kvarving 8f170d3136 Merge pull request #6491 from hakonhagland/fix_test_errors
Fix race condition in Python tests by disabling async ECL output
2025-09-23 08:31:04 +02:00
Håkon Hægland c195df978d Refactor: Use factory fixtures for simulator creation in tests
Move simulator instantiation to factory functions that automatically
disable async ECL output. This prevents future contributors from
forgetting the --enable-async-ecl-output=false flag.

- Add create_black_oil_simulator/create_gas_water_simulator to pytest_common
- Define ENABLE_ASYNC_ECL_OUTPUT_FLAG constant
- Update all tests to use factory functions
- No functional changes, pure refactoring
2025-09-23 05:09:20 +02:00
Håkon Hægland 831354a0db Fix race condition in Python tests by disabling async ECL output
Add --enable-async-ecl-output=false to all Python simulator tests to prevent
race condition between async file writing tasklets and pushd context manager.

Problem:
- Tests use pushd() to change directory before running simulations
- Simulator dispatches async tasklets to write ECL output files
- pushd context exits before async writes complete
- Tasklets write files in wrong directory (build/python/ instead of test_data/)
- Causes confusing error messages and misplaced output files

Solution:
- Disable async ECL output during tests for deterministic behavior
- Files now created in correct locations within test_data/ directories
- Eliminates "Can not open EclFile" errors in logs
- Makes test execution predictable and synchronous
2025-09-22 20:46:10 +02:00
Tor Harald Sandve d8a609a538 Merge pull request #6456 from totto82/avoid_osc_status
Add parameter for restricting status oscillations between stop and open
2025-09-22 14:55:52 +02:00
Atgeirr Flø Rasmussen e796bfacd5 Merge pull request #6489 from atgeirr/improved-detailed-profiling
Add subsystem argument to detail profiling macros.
2025-09-22 13:05:36 +02:00
Atgeirr Flø Rasmussen 5b31ef1edd Add subsystem argument to detail profiling macros. 2025-09-22 11:02:50 +02:00
David Landa-Marbán 3f267e3983 Merge pull request #6487 from daavid00/conc
Biofilm and Calcite set to volume fraction instead of concentration
2025-09-22 09:44:43 +02:00
Svenn Tveit b79d16c3e8 Fix failures in docker tests 2025-09-19 14:18:22 +02:00
Atgeirr Flø Rasmussen 6e9d33abc4 Merge pull request #6308 from jakobtorben/cpr_amg_fully_on_gpu_istl_solver_gpu_istl
CPR-AMG fully on the GPU with GpuIstl
2025-09-19 13:21:12 +02:00
David Landa Marban 85f24cc4de Biofilm and Calcite set to volume fraction instead of concentration 2025-09-19 13:17:21 +02:00
Bård Skaflestad a660f0dbc6 Merge pull request #6486 from GitPaean/merging_units
adapting to upstream unit name change
2025-09-19 12:11:37 +02:00
Kai Bao 9ab4828433 adapting to upstream unit name change
salinity is merged into concentration.
2025-09-19 09:15:51 +02:00
jakobtorben a3ba311d97 Fix warnings 2025-09-18 16:54:05 +02:00
jakobtorben 8ff335c2f2 Refactor test_GpuPressureTransferPolicy to separate tests 2025-09-18 16:54:05 +02:00
jakobtorben 807a558cc5 Improve logic for selecting AMG solvers between CPU and GPU accelerators 2025-09-18 16:54:02 +02:00
Atgeirr Flø Rasmussen e7f42bab0b Merge pull request #6481 from atgeirr/silence-warnings
Silence two warnings
2025-09-18 16:29:27 +02:00
jakobtorben c36d3f1b99 Add CPR GPU preconditioner using shared implementation for CPU/GPU 2025-09-18 16:25:51 +02:00
jakobtorben 0762097411 Make GpuVector support default constructing vectors and resizing 2025-09-18 16:25:51 +02:00
jakobtorben 50998073ec Add well operator check in ISTLSolverGPUISTL 2025-09-18 16:25:51 +02:00
jakobtorben fc3e9209ef Implement CPR weight calculation for gpu-ISTL 2025-09-18 16:25:49 +02:00
Atgeirr Flø Rasmussen df45c8b5d9 Silence two warnings:
- Unhandled MULTI enum value.
 - Unused capture of this.
2025-09-18 15:41:38 +02:00
Tor Harald Sandve 26c7835f08 Merge pull request #6462 from daavid00/biostore2025
BIOFILM effects for gas-water systems
2025-09-18 14:19:43 +02:00
David Landa Marban d3101a9c80 BIOFILM effects for gas-water systems 2025-09-18 11:15:48 +02:00
jakobtorben cea8d4c87f Introduce GpuPressureTransferPolicy and gpu operations for CPR-AMG 2025-09-18 11:00:54 +02:00
Tobias Meyer Andersen df807606a7 Merge pull request #6472 from jakobtorben/fix_mpi_parallel_ISTLSolverGPUISTL
Fix MPI parallel ISTLSolverGPUISTL and register parallel GPU preconditioners
2025-09-18 09:40:28 +02:00
Atgeirr Flø Rasmussen 0f3db11be4 Merge pull request #6467 from totto82/check_network_conv
Check whether network is converged before accepting the iteration
2025-09-18 09:28:31 +02:00
Bård Skaflestad 3c5e25428a Merge pull request #6479 from akva2/janitoring_py_classes
Some janitoring in python classes
2025-09-17 17:17:46 +02:00
Håkon Hægland 2f6bf952e1 Use new docstring format for python modules 2025-09-17 15:35:17 +02:00
Arne Morten Kvarving 484e61b573 Merge pull request #6478 from akva2/update_py_packaging
python packaging: update to use python_simulator_modules target
2025-09-17 15:04:28 +02:00
Arne Morten Kvarving b68e6567f8 Some janitoring in python classes
- add some breathing space in headers
- remove Opm:: for symbols in Opm namespace
- use type-aligned &/*
- add "IDE helper structure"
- add some const
- add a type alias to reduce long statements
- reformat some clang-format atrocities
- return directly in a switch clause
2025-09-17 14:59:42 +02:00
Arne Morten Kvarving 26660b6640 python packaging: update to use python_simulator_modules target 2025-09-17 14:53:52 +02:00
Håkon Hægland 7552aec2c0 Update CMakeLists.txt to pass simulator type to docstring generator
- Add 'BlackOil' as 5th parameter to generate_docstring_hpp.py
- Prepares for template-based docstring generation
- Will work with updated opm-common generate_docstring_hpp.py script
2025-09-17 14:47:04 +02:00
Håkon Hægland 6fe5742145 Convert docstrings to template format with simulator configurations
- Create unified template structure with 'simulators', 'constructors', and 'common_methods' sections
- Add support for both BlackOil and GasWater simulators
- Use {{name}} and {{class}} placeholders for template expansion
- Eliminates need for duplicate JSON files
2025-09-17 14:47:02 +02:00
Bård Skaflestad 6e3b1916b4 Merge pull request #6477 from jakobtorben/fix_hypre_test_version_compatibility_issue
Fix version compatibility issue in Hypre test
2025-09-17 14:26:41 +02:00
Arne Morten Kvarving dc2300f524 Merge pull request #6075 from svenn-t/pygaswater
Python gas-water simulator
2025-09-17 13:52:30 +02:00
Tor Harald Sandve a72bf040fd Stop all non-operable wells 2025-09-17 13:31:07 +02:00
jakobtorben 5f862ee513 Fix version compatibility issue in Hypre test 2025-09-17 13:30:01 +02:00
Tor Harald Sandve 9d4015354e Merge pull request #6476 from totto82/fix_event
Use WELL_STATUS_CHANGE instead of REQUEST_SHUT/OPEN WELL
2025-09-17 13:29:26 +02:00
Tor Harald Sandve 877414445b Use WELL_STATUS_CHANGE instead of REQUEST_SHUT/OPEN WELL 2025-09-17 11:43:16 +02:00
Håkon Hægland 3c6313b619 Custom target to build all simulator modules
Create a convenience target to build all Python simulator modules.
2025-09-17 10:06:50 +02:00
Svenn Tveit 753fcc2ec4 Cleaned up formatting 2025-09-17 10:06:50 +02:00
Svenn Tveit a69e10485b Clarify ordering and clean up doc in rest of the tests 2025-09-17 10:06:50 +02:00
Håkon Hægland b5e7ccc0b1 Clarify why test case ordering is necessary
and delete comment in code about static variables that can no longer be
reproduced.
2025-09-17 10:06:49 +02:00
Svenn Tveit 67a701ef4f Tests for PyGasWaterSimulator 2025-09-17 10:06:49 +02:00
Svenn Tveit 32dd09c78f Add Python gas-water simulator and refactor to template base class
Extend the Python blackoil simulator to support two-phase gas-water
simulations by extracting common functionality into a template base
class and implementing proper module separation.

- Extract PyBaseSimulator<TypeTag> template base class containing all
  common simulator functionality (20+ methods including advance, run,
  step, property access, and MPI handling)
- Add PyGasWaterSimulator for two-phase gas-water simulations using
  FlowGasWaterProblem TypeTag with oil phase disabled
- Split Python modules to avoid ODR violations:
  - BlackOil.so for PyBlackOilSimulator (FlowProblemTPFA)
  - GasWater.so for PyGasWaterSimulator (FlowGasWaterProblem)
- Implement proper template instantiation control with explicit
  instantiations per module

- Eliminate ~400 lines of code duplication between simulators
- Clean inheritance hierarchy: derived classes contain only constructors
- Type-safe specialization through OPM's TypeTag property system
- Separate docstring generation for each simulator type
- Independent build targets with shared infrastructure

- Update CMakeLists.txt to support multiple pybind11 modules
- Add docstrings_gw_simulators.json for gas-water simulator documentation
- Remove centralized Pybind11Exporter.cpp in favor of distributed exports
- Implement proper build dependencies and custom targets

This establishes a scalable foundation for extending OPM's Python
bindings to support additional simulator types (thermal, polymer,
solvent) while maintaining type safety and avoiding symbol conflicts.

Files changed: 21 files, 915 insertions, 428 deletions
2025-09-17 10:06:44 +02:00
Tor Harald Sandve 6c82c449bb Check whether network is converged before accepting the iteration 2025-09-17 09:57:30 +02:00
Tor Harald Sandve 0bbb885093 Merge pull request #6463 from totto82/bug_fix_global_is_GRUP
Dont include temporary stopped wells among the wells considered for group control
2025-09-17 08:34:32 +02:00
Kai Bao 1d20cd56d3 Merge pull request #6050 from totto82/wecon10
Support opening of following-on well
2025-09-16 20:53:07 +02:00