Commit Graph
23191 Commits
Author SHA1 Message Date
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
Håkon Hægland 50b3d59b79 Correct include order
Fix include file order: local → OPM modules → external → system headers last
2025-09-19 10:50:47 +02:00
Håkon Hægland 80496bd4c6 Add emacs clang-format instruction 2025-09-19 10:46:35 +02:00
Håkon Hægland ebe46515a5 Changes order: clone offical then add fork
- Change fork/clone workflow to clone from official repo first
  - Update remotes: 'origin' for official repo, 'fork' for user fork
2025-09-19 10:41:47 +02:00
Håkon Hægland 8018ed28a9 Remove sentence about reviewing the manual 2025-09-19 10:29:31 +02:00
Håkon Hægland cb722600be Explain what pre-commit is used for 2025-09-19 10:11:59 +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
Håkon Hægland c1fd071ee3 Update CONTRIBUTING.md based on reviewer feedback
- Fix brace style: opening brace on next line for functions/classes
  - Add guidance to format only modified lines in existing files
  - Add Building section with link to OPM build docs
  - Include input data deck in issue reporting requirements
2025-09-18 15:47:25 +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
Håkon Hægland 46eac8c726 Add CONTRIBUTING.md file 2025-09-18 14:48:23 +02:00
Håkon Hægland 34e3c59d17 Separate out CONTRIBUTING section from README.md 2025-09-18 14:45:20 +02:00
Håkon Hægland 3973c3e2b1 Pre-commit framework
This is an alternative to #6432 that used manual pre-commit hooks.
2025-09-18 14:22:29 +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
jakobtorben 4aed1f7e02 Register MPI parallel GPU preconditioners 2025-09-16 14:47:02 +02:00
jakobtorben fe523aa21e Fix GPU-ISTL solver parallel setup 2025-09-16 14:47:02 +02:00
jakobtorben 06853bd69e Fix GPU communication object lifetime in FlexibleSolverWrapper 2025-09-16 14:46:58 +02:00