Commit Graph
3263 Commits
Author SHA1 Message Date
Kristian Bendiksen 918ceaff54 back to shared for parts of the data. 2025-12-22 21:07:01 +01:00
Kristian Bendiksen 0e56a1e589 use unique_ptr 2025-12-22 20:10:35 +01:00
Kristian Bendiksen e88e436108 Refactor: Modernize RigEclipseCaseData grids api. 2025-12-22 19:19:33 +01:00
Kristian Bendiksen c7e86ce0d7 Simulation Input: Convert RigVirtualPerforationTransmissibilities to std::shared_ptr
Convert m_virtualPerforationTransmissibilities in RigEclipseCaseData from
cvf::ref<RigVirtualPerforationTransmissibilities> to
std::shared_ptr<RigVirtualPerforationTransmissibilities>, following the same
pattern as previous modernizations.

Changes:
- RigEclipseCaseData: Updated memory management and accessor methods
- Added virtualPerforationTransmissibilitiesShared() methods
- RimEclipseCase: Updated to use std::make_shared for allocation
- Updated setVirtualPerforationTransmissibilities() signature to accept shared_ptr

All 569 unit tests pass successfully.
2025-12-22 19:19:33 +01:00
Kristian Bendiksen 870b1e640e Simulation Input: Convert RigCaseCellResultsData to std::shared_ptr
Convert m_matrixModelResults and m_fractureModelResults in RigEclipseCaseData from
cvf::ref<RigCaseCellResultsData> to std::shared_ptr<RigCaseCellResultsData>,
following the same pattern as previous modernizations.

Changes:
- RigEclipseCaseData: Updated memory management, accessors, and null checks
- Added resultsShared() accessor methods for direct shared_ptr access
- RigCaseCellResultsData.h: Added includes for RigEclipseResultInfo and
  RigAllanDiagramData to support std::make_shared allocation

All 569 unit tests pass successfully.
2025-12-22 19:19:33 +01:00
Kristian Bendiksen e08056360f Simulation Input: Convert RigActiveCellInfo to std::shared_ptr
Convert m_activeCellInfo and m_fractureActiveCellInfo in RigEclipseCaseData from
cvf::ref<RigActiveCellInfo> to std::shared_ptr<RigActiveCellInfo>, following the
same pattern as the previous m_mainGrid modernization.

Changes:
- RigEclipseCaseData: Updated memory management, accessors, and null checks
- RimIdenticalGridCaseGroup: Updated union cell storage and access patterns
- RimEclipseStatisticsCase: Updated to use shared_ptr for active cell info

All 569 unit tests pass successfully.
2025-12-22 19:19:33 +01:00
Kristian Bendiksen db0fce493b Modernize memory management: Convert m_mainGrid to std::shared_ptr
Replace cvf::ref<RigMainGrid> with std::shared_ptr<RigMainGrid> in
RigEclipseCaseData and related classes to use standard C++ smart pointers.

Changes:
- RigEclipseCaseData: Convert m_mainGrid member to shared_ptr, add
  mainGridShared() accessor methods
- RimIdenticalGridCaseGroup: Update grid sharing logic to use shared_ptr
- RigGridManager: Store and return shared_ptr for grid deduplication
- RimEclipseStatisticsCase: Update setMainGrid() signature
- RimEclipseResultCase: Use mainGridShared() for grid copying
- RimEclipseCaseCollection: Update grid deduplication to work with shared_ptr
- RifReaderOpmCommonActive: Wrap RigActiveCellGrid in shared_ptr
- Test updates: Convert tests to use std::shared_ptr and .use_count()

Grid sharing and deduplication functionality preserved. RigMainGrid retains
cvf::Object inheritance for framework compatibility, but std::shared_ptr
handles all reference counting.

All grid-related tests pass (26/26).
2025-12-22 19:19:33 +01:00
Magne Sjaastad 96eebdf8ef Enhances crash reporting for Application Insights
Refactors crash reporting to include structured stack trace data formatted as JSON for better integration with Application Insights.
2025-12-22 16:41:29 +01:00
Magne Sjaastad 4a842fb32c Adds telemetry for octave commands 2025-12-22 16:41:29 +01:00
Magne Sjaastad d3bc3c554e Adds telemetry for application startup 2025-12-22 16:41:29 +01:00
Magne Sjaastad 7f0ef8dbc4 Simplifies OpenTelemetry integration
Removes conditional compilation for OpenTelemetry, ensuring it is always included.

Reinitializes OpenTelemetry based on user preferences, ensuring that changes to telemetry settings are applied immediately.

Configures cloud services, including OpenTelemetry, after the logger is initialized, ensuring that telemetry data is properly captured and transmitted.

Retrieves system username for telemetry tracking.
2025-12-22 16:41:29 +01:00
Kristian Bendiksen 43755feb42 #13376 Well Target Table: Fix menu visibility.
Introduced in ae8446073b.

Fixes #13376.
2025-12-22 14:08:57 +01:00
Magne Sjaastad 405a32e2da Removes QIntValidator and uses setRange
Replaces the usage of `QIntValidator` with the `setRange` function available in the PDM framework for limiting integer input in UI fields.
This approach provides a more direct and maintainable way to specify value ranges for UI elements.

This change simplifies the code and reduces dependencies.
2025-12-22 10:17:00 +01:00
JJ 225d034327 Fault distance from point (#13367)
* Add python interface for distance to closest fault
* Split up some older code into multiple files.
* Add python test
2025-12-20 09:50:51 +01:00
Kristian Bendiksen b8575e6b5e #13355 Use validation framework for RimCustomSegmentInterval 2025-12-19 12:36:10 +01:00
Magne Sjaastad 60081466a7 Improves stack trace readability.
Modifies the stack trace reporting to only include the path relative to the ResInsight root folder, enhancing readability and reducing verbosity in crash reports.
2025-12-18 08:40:30 +01:00
Magne Sjaastad 4274c9079d Enables OpenTelemetry integration
Initializes OpenTelemetry after the application configuration
is loaded, allowing for telemetry data collection.

Reports application crashes to OpenTelemetry when enabled,
providing stack trace information for debugging.
2025-12-18 08:40:30 +01:00
Magne Sjaastad 5d14d194f4 Adds test telemetry action to main window
Adds a new action to the test menu that allows users to manually
trigger the sending of test telemetry data (logging and stack trace)
to the OpenTelemetry endpoint.

This is useful for verifying that the OpenTelemetry integration is
working correctly and for testing different telemetry scenarios.
2025-12-18 08:40:30 +01:00
Magne Sjaastad a754b44e64 Loads OpenTelemetry configuration from file
Adds support for loading OpenTelemetry configuration from a JSON file.

Generalizes configuration file loading to handle OSDU, SUMO and OpenTelemetry configurations using a common function.

Improves JSON value parsing to support strings, doubles, and booleans.
2025-12-18 08:40:30 +01:00
Magne Sjaastad 6c11e53f21 Adds OpenTelemetry integration
Adds support for OpenTelemetry to enable telemetry and crash reporting.

This change introduces:
- New RiaPreferencesOpenTelemetry class for managing OpenTelemetry configuration.
- RiaOpenTelemetryManager class for handling the OpenTelemetry lifecycle,
  event processing, and error handling.
- Configuration options in preferences to enable, disable, and configure
  OpenTelemetry.
- Asynchronous event reporting.
- Crash reporting capabilities.
- Health monitoring features.
2025-12-18 08:40:30 +01:00
Jon Jenssen b8141fbbe5 Refresh after deleting a fishbone 2025-12-18 07:42:00 +01:00
Kristian Bendiksen 4650ac0820 MSW Export: fix WELSEGS off-by-one for "join segment". 2025-12-17 16:34:04 +01:00
Kristian Bendiksen da48c78b02 #13316 Custom MSW well segment definitions 2025-12-17 16:34:04 +01:00
Magne Sjaastad 7768e8c9c9 Do not change time step when reading project file 2025-12-17 15:55:32 +01:00
JJ 64b5dcd1b9 Add validation to sector model export wizard (#13348)
* Add validation to sector model export wizard
2025-12-17 13:16:10 +01:00
Kristian Bendiksen 8f9b416563 #12876 Include RKB distance when importing RMSwell.
Fixes #12876.
2025-12-15 13:56:41 +01:00
Kristian Bendiksen 3d2449c361 #13296 Add file-based surface interface to enable polymorphic file path handling
Add virtual methods (isFileBased, filePath, setFilePath) to RimSurface base
class. Implement these in RimFileSurface and RimRegularFileSurface to provide
a common interface for all file-based surfaces.

Replace class-specific methods (setSurfaceFilePath/surfaceFilePath) with the
common interface methods (setFilePath/filePath) in both RimFileSurface and
RimRegularFileSurface. Update RimEnsembleSurface to use the common interface.

This enables polymorphic treatment of file-based surfaces without changing
the inheritance hierarchy or breaking backward compatibility.

Fixes #13296
2025-12-15 12:59:32 +01:00
Magne Sjaastad 7be96739c5 Enables loading preferences in regression tests
Allows loading of global and test-specific preferences during regression tests.
2025-12-14 07:45:18 +01:00
JJ 09b8602213 Well Target Mapping improvements (#13324)
* Add single case well target results into correct time step
* Speed up unique value calculations by providing unique values directly to statistics cache
* Switch to selected time step in view
2025-12-13 09:35:27 +01:00
Kristian Bendiksen fe609def88 Simulation Input: Add refinement support for border boundary conditions
Add refined grid border detection for BCCON_BCPROP boundary conditions.
The refined functions operate on the exported refined grid dimensions,
ensuring border cells are correctly identified when using grid refinement.
2025-12-12 13:38:22 +01:00
Kristian Bendiksen cfcdd67255 Simulation Input: Refactor border conditions to use in-memory results. 2025-12-12 13:38:22 +01:00
Magne Sjaastad 24fc279178 Object and field keywords 2025-12-12 07:36:02 +01:00
Magne Sjaastad bd332c264d Guards against null case data
Adds checks for null case data in several functions to prevent potential crashes when the case data is not properly initialized.
These checks ensure that operations are only performed if valid case data is available.
2025-12-12 07:36:02 +01:00
Magne Sjaastad 6d480f6012 Add some MSW documentation 2025-12-11 13:43:56 +01:00
Kristian Bendiksen 11352f525c Simulation Input: Handle multiple ACTNUM keywords 2025-12-11 12:07:21 +01:00
Kristian Bendiksen b1f9f8c4a5 Simulation Input: Fix bug in BOX transformation when using refinement. 2025-12-11 12:07:21 +01:00
Kristian Bendiksen 101b4f4926 Refactor: extract common code for converting sector box 2025-12-11 12:07:21 +01:00
Kristian Bendiksen ab708f5e0e Simulation Input: Handle AQUNUM keyword. 2025-12-11 12:07:21 +01:00
Kristian Bendiksen 5c273c0130 Simulation Input: Flip direction of BCCON boundaries.
"X" becomes "X-" and so on.
2025-12-11 12:07:21 +01:00
Kristian Bendiksen d3f43dfebb Simulation Input: Handle EQUALS keyword without ijk box. 2025-12-11 12:07:21 +01:00
Magne Sjaastad be7db8dfb0 Enhances well import wizard with search history
Adds search history for well filter and field selection to the well import wizard.

Improves user experience by persisting and reusing previously entered search terms and filter values.
Also, adds filtering by existence kind in the well summary page.
2025-12-10 14:49:30 +01:00
Magne Sjaastad 54e8b59ccf #13283 OSDU: Add ExistenceKind support and improve well import wizard
- Add ExistenceKind field to OsduWellboreTrajectory struct
- Extract ExistenceKind from OSDU trajectory JSON data
- Add ExistenceKind field to WellInfo structure
- Display ExistenceKind in RimOsduWellPath UI under OSDU group
- Add Enter key support for field search in import wizard
- Show trajectory count in well import summary page
2025-12-10 14:49:30 +01:00
Magne Sjaastad 52854c2e86 Enables search on return key press 2025-12-10 14:49:30 +01:00
jonjenssen 2eb9b0db51 Use better naming in UI 2025-12-10 11:44:26 +01:00
Magne Sjaastad 0732489d6a #12256 Update views when perforation interval is deleted 2025-12-10 10:35:03 +01:00
Magne Sjaastad dc89bf8de8 #13303 Adds PCGW curve support to relative permeability plot
Extends the relative permeability plot to support PCGW curves, which are relevant in gas/water systems.

This involves:
- Adding PCGW curve styling to the plot's QSS themes.
- Modifying the plot panel to handle PCGW curves, including
  dynamically updating checkbox labels based on the available phases
  to reflect the correct PC* name (PCOG or PCGW).
2025-12-09 12:41:35 +01:00
Magne Sjaastad 6e1ba530c4 Adds RiaPhaseTools for phase system analysis
Adds a new utility class, RiaPhaseTools, which provides functionalities to analyze phase systems in reservoir simulations.

This class includes methods for checking the presence of individual phases (oil, gas, water), identifying different phase systems (three-phase, two-phase, single-phase), and retrieving a system description for display in the UI. It also includes utility functions to retrieve the preferred name for PCOG curves based on the detected phase system.
2025-12-09 12:41:35 +01:00
Magne Sjaastad 102a9feb32 #13269 Read VFP data without unit conversion
- read VFP data using readers with no unit conversion
- remove existing unit conversion
- make sure correct units are displayed in UI for both Metric and Field
2025-12-08 15:58:05 +01:00
Magne Sjaastad 40078cf8a8 Add VFP table importers without unit conversion
The opm-common importers does unit conversion to SI. Create custom importers with no unit conversion.
2025-12-08 15:58:05 +01:00
Kristian Bendiksen 799c774cbe Simulation Input: refactor to remove duplicated code. 2025-12-08 15:27:51 +01:00