Commit Graph
523 Commits
Author SHA1 Message Date
Magne Sjaastad cfd634e206 Updates PDM UI label positioning
Updates the way UI label positions are set for PDM fields.
2026-01-08 21:44:58 +01:00
jonjenssen 1181799ec2 Fix crash when selecting a cell in 2d intersection view by adding null pointer guards. 2026-01-06 19:21:36 +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 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
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
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
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
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 a2535e5eeb #13288 Fix segmentation fault in multi-plot overlay frame clearing
Fix iterator invalidation issue in RiuPlotWidget::clearOverlayFrames() that caused segmentation faults when accessing QPointer objects during collection modification. The method now safely collects matching frames first, then removes them in a separate loop with proper null pointer checks.
2025-12-08 08:33:54 +01:00
JJ 6689000d85 New Sector Model Export user interface (#13247)
* Add sector model export wizard
* GUI cleanup
* Use job name as deck name for simulation runs
* Remove new things from old export GUI
* Use radio-buttons for enum dropdowns
2025-11-28 16:43:51 +01:00
Magne Sjaastad 526cae24d9 #13218 Fix display of relative permeability plots for LGR 2025-11-21 21:38:04 +01:00
jonjenssen 7b6934a1ff Make sure property editor(s) and tree view selections are in sync after loading a project 2025-11-21 12:21:56 +01:00
Magne Sjaastad 544e9eedd9 Improve spell checker using codespell
* Configures automated spell checking with codespell
Adds GitHub workflows and configuration files for automated spell checking using `codespell`.

This includes:
- A workflow for checking pull requests and preventing new typos
- A workflow for automatically fixing typos in the main codebase
- Configuration files for `codespell` to ignore specific terms and file types
- Documentation on how to use and configure the spell checking workflows.

* Corrects minor spelling and grammar errors.
2025-11-19 10:25:32 +01:00
Kristian Bendiksen 38c691d9a4 Refactor: Update usage of caf::VecIjk. 2025-11-14 14:44:21 +01:00
Magne Sjaastad b6f0164de7 #13176 Use guarded pointers for highlighted curves 2025-11-14 13:06:32 +01:00
JJ 7c8aadcd60 Update OPM Flow Job Preferences (#13172)
* Add job settings, with default settings in preferences.
* Move opm flow settings to separate preferences tab
* Add warning/error detection add display count next to progress
* Adjust size of preference window
2025-11-14 12:56:23 +01:00
jonjenssen 5450ab292d Make sure we switch to the correct treeview when selecting an item. 2025-11-10 07:44:55 +01:00
Magne Sjaastad 7e7e7e0528 #13124 Show SWAT/SGAS instead of Saturation 2025-11-05 09:06:53 +01:00
JJ 453562082d Summary case refresh update. (#13123)
Use improved opm-common reader with less throws.
Add reload selected cases button
Add timer for auto-reload of cases
Add include in auto update option for cases and ensembles
Do not enable auto reload option for cases in an ensemble
2025-11-03 18:41:55 +01:00
Magne Sjaastad 98fe652f5d Simplifies relative permeability plot axis title.
Updates the relative permeability plot's X-axis title to use shorter, more standard labels ("SWAT" and "SGAS") instead of the longer "Water" and "Gas" versions. This improves readability and consistency with common saturation representations.
2025-11-03 16:07:40 +01:00
Magne Sjaastad 186992ebb6 Improves relative permeability plot display
Enhances the relative permeability plot by:

- Adding support for SATNUM and IMBNUM result display in cell reference information.
- Disabling the imbibition curve selection by default and enabling it dynamically based on the IMBNUM value.
- Removing the `satnum` argument from `calculateRelPermCurves` as it's no longer needed.
2025-11-03 16:07:40 +01:00
Magne Sjaastad f884b65bb6 Adds imbibition curves to relative permeability plot
Adds styling for imbibition relative permeability curves to the plot, differentiating them visually from drainage curves.

Adds UI elements (checkboxes) to control the visibility of drainage and imbibition curve sets. Also introduces a tracker that displays curve values near the cursor position.
2025-10-28 19:02:36 +01:00
Magne Sjaastad b0b2c56267 Refactors tracker text implementation
Simplifies the implementation of the tracker text provider by using a `std::function` instead of a dedicated interface.

This change improves code maintainability and reduces complexity.
2025-10-28 19:02:36 +01:00
Magne Sjaastad 91192a671c Use opm-flowdiagnostics-applications as submodule
* Deletes the copy of the code in ThirdPary folder
* Replace code with opm-flowdiagnostics-applications as submodule
* Refactors ECL data handling for flow diagnostics
Updates flow diagnostics to utilize ECL init data consistently.
This change streamlines the passing and usage of initialization
data within the flow diagnostics routines, enhancing code
clarity and maintainability. Removes redundant passing of grid
data, simplifying function signatures.
2025-10-27 14:09:57 +01:00
Magne Sjaastad cfc620b501 Avoids potential null pointer dereference
Adds a null check for the eclResDef pointer before accessing its members.
This prevents a potential crash if eclResDef is null.
Additionally, the unnecessary assertions are removed.
2025-10-23 16:14:12 +02:00
Magne Sjaastad 6bc25c387d #13065 Improves result info handling
Improves result info handling by ensuring the result
definition is valid before accessing it, preventing
potential crashes.
Uses `if (auto)` to check for null result definitions,
and displays a user-friendly message when no result
definition is available.
2025-10-23 16:14:12 +02:00
JJ 1eaf50b6b9 Support running jobs without blocking GUI (#13040)
* Add view job log command.
* Add stop job command.
* Do not block ui while job is running.
* Show progress while job is running
* Make sure user gets notified of running jobs when exiting ResInsight or closing current project.
2025-10-18 02:42:11 +02:00
Magne Sjaastad 0b7a4b12f1 #13019 Remove assert from RiaSummaryTools::summaryCaseMainCollection() 2025-10-14 14:47:58 +02:00
Magne Sjaastad 5f2e2919c8 Avoids iterator invalidation in QwtPlot item lists
When working with a summary ensemble in a Debug build on Windows, a crash happened in RiuQwtPlotWidget::resetPlotCurveHighlighting(). When iterating over list of plot items, one pointer to item pointed to 0xddddddd, a clear indication that the underlying list had been updated during the loop and the iterator invalidated.

The change ensures that modifications to the item list during iteration do not cause unexpected behavior, particularly in scenarios involving grid lines and curve highlighting.

This is achieved by making a copy of the item list before iteration when modifications may occur. For cases where no add/remove will be performed during the iteration, a comment is added to clarify that it is safe to access the reference to the list.
2025-10-14 12:52:24 +02:00
Magne Sjaastad bba6af58e5 #13001 3D-view: Scale factor is not shown correctly 2025-10-13 13:10:33 +02:00
Magne Sjaastad 62188fa9f2 Improve naming of cell related result names
Use radial/theta when required for GUI
Hide DX/DY from the list of available results
2025-10-08 16:03:56 +02:00
Magne Sjaastad fea2170826 Add guarding tying to mitigate reported segmentation fault
2025-10-06 12:48:32.779] [rotating_logger] [error] Stack trace:
  [0] manageSegFailure(int) at :0
  [1]  at :0
  [2] __dynamic_cast at :0
  [3] RimSummaryMultiPlot::updateReadOutLines(double, double) at :0
  [4] CoordinatePicker::trackerText(QPoint const&) const at :0
  [5] QwtPicker::trackerRect(QFont const&) const at :0
  [6] QwtPicker::updateDisplay() at :0
  [7] QwtPicker::begin() at :0
  [8] QwtPicker::transition(QEvent const*) at :0
  [9] QwtPicker::eventFilter(QObject*, QEvent*) at :0
  [10] QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) at :0
  [11] QApplicationPrivate::notify_helper(QObject*, QEvent*) at :0
  [12] RiaGuiApplication::notify(QObject*, QEvent*) at :0
  [13] QCoreApplication::notifyInternal2(QObject*, QEvent*) at :0
  [14]  at :0
  [15] QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) at :0
  [16]  at :0
  [17]  at :0
  [18] QApplicationPrivate::notify_helper(QObject*, QEvent*) at :0
  [19] RiaGuiApplication::notify(QObject*, QEvent*) at :0
  [20] QCoreApplication::notifyInternal2(QObject*, QEvent*) at :0
  [21] QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) at :0
  [22] QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) at :0
  [23]  at :0
  [24] g_main_context_dispatch at :0
  [25] g_main_context_iterate.isra.20 at :0
  [26] g_main_context_iteration at :0
  [27] QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) at :0
  [28] QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) at :0
  [29] QCoreApplication::exec() at :0
2025-10-07 16:33:26 +02:00
Magne Sjaastad b321109904 Delete unused QtCharts files 2025-10-07 12:17:42 +02:00
Kristian Bendiksen 5c48383d71 Refactor: Improve interface for characteristicCellSize() 2025-10-06 09:10:58 +02:00
Magne Sjaastad a73999323a Move defines into separate file 2025-10-03 08:37:24 +02:00
Magne Sjaastad 336e4b65fd Consolidate linear interpolation algorithms
Replaces custom linear interpolation logic with
`std::upper_bound` for improved efficiency.

Refactors the permeability plot panel to utilize the improved
interpolation tool.
2025-10-03 08:37:24 +02:00
Magne Sjaastad 6b7d93e2da Refactor import of radial grid
* Add radial display mode to preferences
* Adds isRadial to grid
* Improve mesh lines for radial cells
For temporary radial LGRs, show mesh outline based on the aggregated geometry of all LGRs of the parent cell clicked on.
* Improve warning message
* Modify cell selection in pick event handler
2025-09-29 11:46:28 +02:00
Magne Sjaastad a2e94a0c83 Create mesh lines based on for lgr cells
If the angular cell count is low, especially 1, the geometry representation of a cell requires refinement in angular(J) direction. Show this geometry as a cylinder segment when holding CTRL and clicking on the radial geometry.
2025-09-24 10:20:56 +02:00
Kristian Bendiksen da741b16ac Revert "RiuSummaryPlot: Fix memory leak by integrating into Qt's parent-child system."
This reverts commit e6746cd819.
2025-09-19 11:00:48 +02:00
Kristian Bendiksen 3e16fc4162 Summary Plot: Fix crash when setting "Col Span" to "unlimited". 2025-09-08 18:07:02 +02:00
Kristian Bendiksen e6746cd819 RiuSummaryPlot: Fix memory leak by integrating into Qt's parent-child system. 2025-09-04 09:04:30 +02:00
Kristian Bendiksen 0cce2bb42d Fix critical RiuContextMenuLauncher memory leak by setting parent widget
Address sanitizer detected a memory leak in CmdFeatureMenuBuilder::MenuItem
objects caused by RiuContextMenuLauncher objects that were never deleted.

Problem: The RiuContextMenuLauncher class has two constructors:
1. RiuContextMenuLauncher(widget, CmdFeatureMenuBuilder&) - sets parent ✓
2. RiuContextMenuLauncher(widget, QStringList&) - missing parent ✗

The second constructor was missing the parent initialization, causing all
RiuContextMenuLauncher objects created with QStringList (used in 10+ locations)
to never be deleted, leading to memory leaks of their internal MenuItem vectors.

Root cause: Missing parent-child relationship meant Qt couldn't automatically
clean up these objects when their associated widgets were destroyed.

Fix: Added `: QObject( widget )` to the second constructor to match the first
constructor's behavior. This ensures Qt's automatic parent-child cleanup
handles the RiuContextMenuLauncher lifecycle properly.

This fixes the systemic issue affecting multiple plot types including:
- Correlation plots, Analysis plots, VFP plots, Well allocation plots
- All locations using `new RiuContextMenuLauncher(widget, {commands})`
2025-09-04 09:04:30 +02:00
Kristian Bendiksen aec17d54a7 Fix CmdFeatureMenuBuilder::MenuItem memory leak in RiuContextMenuLauncher
Address sanitizer detected a memory leak in CmdFeatureMenuBuilder::MenuItem
objects allocated during context menu creation.

Problem: The RiuContextMenuLauncher constructor was creating a temporary
CmdFeatureMenuBuilder object, populating it with menu items, then copying
the entire object to the member variable m_menuBuilder. This caused
unnecessary memory allocation and copying of std::vector<MenuItem> data.

Root cause: Inefficient constructor implementation:
  caf::CmdFeatureMenuBuilder menuBuilder;  // temp object
  for (cmd : commandIds) menuBuilder << cmd;  // populate temp
  m_menuBuilder = menuBuilder;  // copy entire vector (leak source)

Fix: Build the menu directly into the member variable instead of creating
a temporary object and copying it:
  for (cmd : commandIds) m_menuBuilder << cmd;  // direct construction

This eliminates the unnecessary temporary object creation and copy operation
that was causing the MenuItem vector allocation detected by the sanitizer.
The fix maintains identical functionality while being more efficient.
2025-09-04 09:04:30 +02:00
Kristian Bendiksen 89e940b1ea Fix QProxyStyle memory leak in PdmUiTreeViewStyle creation
Address sanitizer detected a memory leak in QProxyStyle objects
created during GUI theme updates.

Problem: The updateGuiTheme() function was called multiple times (e.g., during
initialization) and repeatedly created new PdmUiTreeViewStyle objects for
every PdmUiTreeViewWidget without checking if the widget already had the
correct style set.

Root cause: Each call to updateGuiTheme() would:
1. Iterate through ALL widgets in the application
2. Create a new PdmUiTreeViewStyle for every tree view widget
3. Call setStyle() which should take ownership, but repeated calls
   were causing memory leaks

Fix: Added a check to only create and set a new PdmUiTreeViewStyle if the
widget doesn't already have one. This prevents repeatedly creating new
styles for the same widgets during multiple theme update calls.

The fix uses dynamic_cast to check if the current style is already a
PdmUiTreeViewStyle before creating a new one.
2025-09-04 09:04:30 +02:00
JJ 393917e6f3 Histogram drag/drop and paste improvements (#12851)
* Add drag'n'drop support for ensemble summary vectors and ensembles into histogram plots

* Make sure histogram plot is shown and all update signals are connected when loading a project.

* Support ensemble parameter drag'n'drop from data sources into histogram plots. 

* Show ensemble parameters in data sources tree.

* Add copy/paste of histogram curves

* Re-use all existing parameters in a plot when dragging a new ensemble into it
2025-08-29 15:12:32 +02:00
Magne Sjaastad 4135a743fe Release preparations
* Adds a bounds check on the node index to prevent accessing invalid memory locations.
This prevents potential crashes caused by out-of-bounds access when retrieving summary variable values.
* Updates warning message for incomplete deltas
* Plot based on a single realization from a file set ensemble is not restored correctly on project load
* Populate result addresses if no addresses are present
* Adds CNV_ (convergence) result name
* Avoid include of RiaResultNames.h in header file
2025-08-27 14:22:11 +02:00
Santiago Ospina De Los Ríos 66756ff21e Use template function prefix 2025-08-25 12:45:22 +02:00
Kristian Bendiksen 8f825c3cef #12534 Refactor: Simplify RiaDefines::MultiPlotPageUpdateType usage 2025-08-22 16:10:04 +02:00
jonjenssen a53fa416a5 Set minimum preferred height of legend in 3d view 2025-08-10 20:11:18 +02:00
Kristian Bendiksen ade8e1d7e6 Remove QT_CHARTS dependency. 2025-07-30 13:39:02 +02:00