Commit Graph
59 Commits
Author SHA1 Message Date
Magne Sjaastad 7dfa813c06 #12674: Assign well path unit system from loaded cases
Move unit system assignment for new well paths into RimWellPathCollection::assignUnitSystem, used by addWellPath and onChildAdded so Python-created well paths get the case unit system. Ignore unloaded and unknown-unit cases in RimProject::commonUnitSystemForAllCases.

Pasted and multiple-lateral well paths are copies that already carry unit specific settings, so skip unit assignment for them. Note: RimProject::commonUnitSystemForAllCases now ignores unloaded and unknown-unit cases and returns UNKNOWN only for mixed units, which affects its other callers.
2026-10-23 12:01:59 +02:00
Magne Sjaastad c57864df51 #14889: RFT Ensemble: Additional UI fixes
* #14889: Do not change main window when importing well picks
* #14889: Fix clipped bottom of plots in dock windows
* #14889: Add Create RFT Correlation Report to Ensemble Correlation Plots menu
* #14889: Show imported observed FMU RFT data as table
* #14889: Use time step from source RFT plot in RFT correlation report
* #14889: Show observed data in RFT cross plot when no RFT samples are available
* #14889: Keep RFT plot zoom when toggling formation in RFT correlation report
* #14889: Do not change main window when importing formations
* #14889: Use general delete for observed data and improve FMU RFT data name
2026-10-12 18:50:57 +02:00
Magne Sjaastad bc62af3bb5 #14878: Fix stale well picks, import errors and overlapping zones 2026-10-08 12:44:14 +02:00
Magne Sjaastad 029759f548 #14878: Guard against deleted formations collection and missing geometry 2026-10-08 12:44:14 +02:00
Magne Sjaastad a6a88eeb21 #14878: Migrate well path formations to project-level collection, add manual import command
RimWellPath and RimWellPathCollection now reference a RimWellFormationsFile in the
project-level well formations collection instead of owning per-well-path formations
geometry directly. Reworked the well-pick import command (renamed
RifWellPathFormationsImporter to RicImportWellFormationsFeature) to create/find the
project-level file and link it to the matching (or newly created) well path.
2026-10-08 12:44:14 +02:00
Magne Sjaastad 91e2e4d575 Make RigWellPathFormations a value type
The object is immutable after construction and small, so reference
counting via cvf::Object adds nothing. Store it by value and use
std::optional where it may be absent.
2026-10-07 13:37:23 +02:00
Magne Sjaastad 7838290a4d #13807 Add a case-less Data View and merge it with Eclipse views in the tree
- Added RimGeneric3dView, a 3D view that is not tied to any grid case,
  useful for wells, surfaces and other data not requiring a reservoir
  grid. The view supports a custom name.
- Introduced RimGenericViewCollection, a new top-level collection that
  holds both Eclipse views and RimGeneric3dView instances. It overrides
  defineUiTreeOrdering() to display both types as a single flat list
  under the top-level 'Views' node.
- RimOilField now exposes a single genericViewCollection instead of a
  plain eclipseViewCollection field.
- RimEclipseViewCollection is unchanged and continues to be used for
  per-case and ensemble view collections.
- Updated RimEclipseCase::globalViewCollection() and related helpers to
  use RimGenericViewCollection, and added matching overloads in
  RicNewViewFeature for creating eclipse views from the merged
  collection.
- Added RicNewGenericDataViewFeature to create a new generic data view
  from the context menu.
2026-09-28 18:35:28 +02:00
Magne Sjaastad 2ac1948abe #14245 Remove gsl functions and ThirdParty/gsl folder 2026-06-24 18:47:04 +02:00
Kristian Bendiksen 8636180ee5 #13801 Fix invalid progress max when reading well logs
The countWellLogs lambda in RimWellPathCollection::loadDataAndUpdate()
declared its return type as bool, truncating the well log count to 0 or 1.
The progress max was then too low, and loading projects with two or more
well logs ran the progress value past max, triggering reportError() in
caf::ProgressInfo during regression tests.
2026-06-12 16:30:10 +02:00
Kristian Bendiksen 253d57f1a5 #14121 Well Path: prevent crash when exporting completions for a non-existing well path
When a project references an RMS well path file that no longer exists, the well path geometry is null. The MSW completion export validated the eclipse case, well path, and MSW parameters but not the geometry, so generateCellSegments asserted and crashed when triggering Export Completion Data for Visible Well Paths.

Guard the single MSW export dispatcher extractSingleWellMswData with a well path geometry null check that returns an error, protecting all export callers. Harden generateCellSegments to return empty instead of asserting on null geometry.

Also log a warning on the interactive well path import path when a file cannot be read, matching the existing project-load behavior.

Fixes #14121.
2026-06-08 08:46:40 +02:00
Kristian Bendiksen 5ffcb69acc #13126 RiaLogging: Use std::string_view instead of QString for logging 2026-05-08 10:11:09 +02:00
Kristian Bendiksen bb0afbf962 #13126 RiaLogging: Extract errorInMessageBox to RiuMessageDialog
Move the QMessageBox-displaying helper out of the logging utility into a
dedicated UI class. RiaLogging.h no longer pulls QMessageBox/QWidget into
the ~270 files that include it. Behavior is preserved: showError displays
the dialog when running interactively (and not under regression tests),
then forwards the text to RiaLogging::error.
2026-05-08 10:11:09 +02:00
Magne Sjaastad 211ae24241 Auto-update MSW segments on UI changes (opt-in)
Adds an 'Auto Update Segments' toggle (default: on) to the MSW Segment
Visualization group in WellPathCollection. When enabled, MSW segments
are automatically recomputed and redrawn whenever the user modifies:
- Well path geometry or targets
- Perforation intervals
- Fishbone laterals
- Fractures
- Well path fields

The update is triggered via a new updateMswSegmentsForObject()
method, which resolves the top-level well from the changed object, clears
existing segments for all lateral wells in that group, recomputes segments
using updateSegments(), and schedules a full redraw.

When auto-update is disabled, an 'Update Segments' button is shown
instead, allowing manual control.
2026-03-17 20:15:07 +01:00
Magne Sjaastad e6e6d5b818 Refactor MSW segment update to use static method
Refactored RimMswSegmentCollection::updateSegments from an instance method to a static method that requires explicit top-level RimWellPath and RimEclipseCase parameters. Updated RimWellPathCollection to collect unique top-level wells and call the new static method.
2026-02-18 09:22:14 +01:00
Kristian Bendiksen a4dad97024 #13425 Add time-dependent well events and schedule data generation
Implement timeline-based event system for managing temporal changes in
well completions, perforations, valves, and production controls.

Features:
- Event timeline container with date-based querying
- Six event types: PERF, VALVE, TUBING, WSTATE, WTYPE, WCONTROL
- Schedule keyword generation (DATES, COMPDAT, WELSEGS, WCONPROD, WCONINJE)
- Multi-well schedule generation support
- Python GRPC API for event management
- YAML configuration file support
- Comprehensive test suite

Implementation:
- New directory: ApplicationLibCode/ProjectDataModel/WellEvents/
- Event classes inherit from RimWellEvent base class
- RimWellEventTimeline integrated into RimWellPath
- RicScheduleDataGenerator for multi-well schedule export
- Python API: event_timeline(), add_perf_event(), add_valve_event(), etc.
- Tests verify all event types and YAML config parsing

#13425 Add date tracking to valves and diameter/roughness intervals

Add creation date fields to RimWellPathValve and RimDiameterRoughnessInterval
to support filtering objects by date during completion data export.

- Add m_useCustomStartDate and m_startDate fields
- Add enableCustomStartDate(), setCustomStartDate(), isActiveOnDate() methods
- Set creation dates when applying valve and tubing events in RimWellEventTimeline

#13425 Add date-based filtering for schedule data export

Add optional export date parameter to MSW data collection functions to filter
valves and perforations based on their creation dates during schedule export.

- Add exportDate parameter to collectWsegvalvData, collectWsegAicdData,
  collectWsegSicdData, and collectCompsegData functions
- Filter valves by checking isActiveOnDate() on the associated RimWellPathValve
- Add RimPerforationInterval reference to RicMswPerforation for date filtering
- Pass export date from RicScheduleDataGenerator through the extraction chain

This ensures segment numbers reflect the full model while only including
objects active on the export date in output keywords.

Add test to prove compsegs changes over time.

#13425 Fix mypy type checking errors in well_events.py

- Add type annotations to all function parameters
- Fix generic type hints (dict -> Dict[str, Any])
- Import Any type for proper type safety
- Add type: ignore for method reassignment
- All 31 tests pass

#13425 Add schedule-level keyword events for non-well-specific keywords

Add a new event type called "Keyword Event" for schedule-level Eclipse
keywords (RPTRST, GRUPTREE, RPTSCHED, etc.) that are NOT tied to a
specific well path. This complements the existing RimWellEventKeyword
which operates at the well level.

- Add RimKeywordEvent class inheriting from RimWellEvent with null wellPath
- Add SCHEDULE_KEYWORD enum value to EventType
- Add addKeywordEvent() method to RimWellEventTimeline
- Add AddKeywordEvent Python API method to RimcWellEventTimeline
- Update RicScheduleDataGenerator to output global keywords after well sections
- Add Python wrapper add_keyword_event() with type inference
- Add tests and examples for RPTRST, GRUPTREE keywords
2026-02-12 08:15:22 +01:00
Magne Sjaastad de3758cf60 Set PdmUiButton default alignment to right
Removed manual setAlignment(Qt::AlignRight) calls for UI buttons,
as PdmUiButton now defaults to right alignment. Also removed
unused cafPdmUiButton.h includes from several files.
2026-01-27 13:37:26 +01:00
Magne Sjaastad 4b3ebd2a95 Add MSW segment support to well path completions/collection
Introduce MSW segment collection to RimWellPathCompletions, including UI tree integration and completion list updates. Add MSW Eclipse case and show bands fields to RimWellPathCollection, with new UI controls and update logic. Implement segment update and visualization methods, option calculation for Eclipse case selection, and update headers and includes accordingly.
2026-01-20 14:13:22 +01:00
Magne Sjaastad c6ed12be92 Adds MSW name grouping pattern functionality
Implements a new command to set the MSW grouping pattern, and ensures that the pattern is only updated if a new value is set.
2026-01-12 09:32:42 +01:00
Magne Sjaastad e79ff8e7a7 Add MSW grouping options to RimWellPathCollection
Introduce "MSW Grouping" feature to allow users to control how multi-segmented wells are grouped by name. Adds a new enum for grouping mode (use preferences, custom, disabled), new fields for grouping mode and pattern, and updates UI and logic to support these options. This provides greater flexibility and user control over well path grouping, especially for multi-lateral wells.
2026-01-12 09:32:42 +01:00
Magne Sjaastad 0228d14899 #12869 Allow multiple import of all well file types
Previously, we had support for import of well log file including (some) well path geometry. Then, when the full well path was imported later, the well log data was moved to the full well path. This functionality is now removed as it is not working well when we allow import of multiple well path files.
2025-09-03 11:04:21 +02:00
Kristian Bendiksen 9488a8a3a0 Refactor: simplify RimWellPathCollection::addWellPaths. 2025-08-29 15:31:47 +02:00
Kristian Bendiksen a2473af644 #12848 Python: fix unexpected returned well path when importing.
Fixes #12848.
2025-08-29 15:31:47 +02:00
Magne Sjaastad 377d300767 #12719 Allow import of same well multiple times
Also exposes the well path collection object through the project object, and updates examples.
2025-08-08 08:56:15 +02:00
Magne Sjaastad e50835c77f Improve progress info summary
Use task system to improve the progress info experience. Remove progress info for well picks to reduce number of progress bars.
2025-07-20 08:28:15 +02:00
Magne Sjaastad 938222f878 #12091 Show dialog with cancel button when requesting authorization tokens 2025-02-03 12:45:30 +01:00
Magne Sjaastad 065528ffba #11909 Add null pointer guards when detecting unit system 2024-11-21 12:01:46 +01:00
jonjenssen da683bed9e Move Rig well related things to subfolder and update include statements 2024-10-31 15:08:59 +01:00
Magne Sjaastad 2814b92055 Qt6: Adjustments (#11804)
* Qt6: Avoid insertWidget, use addWidget
In Qt6, the insertWidget function checks if the index parameter is valid based on current widgets present in the layout. This is error prone, and use addWidget to avoid manual counting of index.

* Disable use of Qt keyword foreach

* Replace use of QRegExp with QRegularExpression
Replace use of QRegExp with QRegularExpression
Remove dependency on qt5compat module
Simplify an expression based on review

* Remove Qt5 ifdefs

* Guard access out of bounds seen in debug build

* Avoid reuse of string variable

* Disconnect all signals from the QOpenGLContext
The call stack when this assert happens indicates that there are more signals to be disconnected from the object. Crash is fixed by disconnecting all signals.

Assert seen in debug build:

ASSERT failure in caf::Viewer: "Called object is not of the correct type (class destructor may have already run)", file C:\Qt\6.6.3\msvc2019_64\include\QtCore/qobjectdefs_impl.h, line 130

* Fix issue related to delete of a linked view
Guard null pointer use in view linker. Remove complicated cleanup in destructor in Rim3dVew.
2024-10-28 13:09:18 +01:00
Magne SjaastadandKristian Bendiksen kristian.bendiksen@gmail.com 9e41db33f5 Progress: optionally call QApplication::processEvents on progress updates
Add ProgressInfoEventProcessingBlocker

Co-authored-by: Kristian Bendiksen kristian.bendiksen@gmail.com
2024-09-11 12:48:54 +02:00
Magne Sjaastad cfc97bb615 Revert "Progress: optionally call QApplication::processEvents on progress updates."
This reverts commit eb762fd122.
2024-09-10 08:18:37 +02:00
Kristian Bendiksen eb762fd122 Progress: optionally call QApplication::processEvents on progress updates.
Fixes the missing updates of UI when running long tasks in main thread.
2024-09-09 14:15:28 +02:00
Magne Sjaastad 141484f8a7 Improve error handling when trying to access OSDU data
Show more details when support for SSL is missing.

Move connection of signal/slot away from constructor. This makes it possible to use ResInsight even if SSL is not available.
2024-08-19 16:33:19 +02:00
Kristian Bendiksen b324fdb26b Close project if cancelling well path loading. 2024-08-16 15:46:22 +02:00
Kristian Bendiksen bf2a852b4d Add cancellation of well path collection loading. 2024-08-16 15:46:22 +02:00
Kristian Bendiksen 76a1d43b0e Osdu: make sure token is valid before background loading. 2024-08-14 11:32:07 +02:00
Kristian Bendiksen 2651ca91b6 Add well log loaders. 2024-08-14 11:32:07 +02:00
Kristian Bendiksen 694d2eda66 Add background data loader framework and well path loaders. 2024-08-14 11:32:07 +02:00
Kristian Bendiksen 44daecac9a Refactor: move RiaOsduConnector to Tools/Cloud. 2024-07-10 18:57:15 +02:00
Kristian Bendiksen 122b724a83 Osdu: Split blocking and non-blocking api, and fix race condition on parquet data. 2024-07-10 18:57:15 +02:00
Kristian Bendiksen d0a870bb38 #11514 OSDU: parse and add datum elevation to well paths. 2024-06-18 15:47:47 +02:00
Kristian Bendiksen 8854abe482 Osdu: get well paths from ddms instead of Osdu Storage api. 2024-06-14 17:31:22 +02:00
Kristian Bendiksen 23d716754e Add action for downloading and parsing well log from OSDU Wellbore DDMS. 2024-06-14 17:31:22 +02:00
Kristian Bendiksen 0477371e0d Refactor: use new base class WellLog where possible. 2024-06-14 17:31:22 +02:00
Kristian Bendiksen 577ef1e154 Add support for well paths from OSDU. 2024-05-24 15:19:43 +02:00
Magne Sjaastad ce513be638 Remove all use of .uiCapability()->setUiTreeHidden( true ); 2024-02-05 10:15:36 +01:00
Kristian Bendiksen a8c719b289 #10663 WBS Plot: Import well log from CSV file.
Also compute SH_MK_MIN/EXP/MAX and FG_MK_MIN/EXP results.
2024-01-29 15:05:08 +01:00
Kristian Bendiksen 8df4dd42eb Refactor: rename RimWellLogFile to RimWellLogLasFile 2023-10-02 16:04:53 +02:00
Kristian Bendiksen 5bf2c2a89d #10367 Janitor: Remove unneccessary 'this' pointers 2023-08-07 13:38:27 +02:00
Magne Sjaastad 0c90f67dcc Change API for PdmObjectHandle and PdmFieldHandle
* Refactor interface to PdmObjectHandle and PdmFieldHandle
Return objects instead of passing in structures as parameters

* Add nodiscard to several functions
* Remove redundant this->
* Rename to ptrReferencedObjectsByType
2023-05-12 21:41:34 +02:00
Magne Sjaastad 51331facac Improve how wells are connected during import
When importing new wells, consider all wells when connecting multi segment wells
Make sure that import of individual well paths will give the same ordering as importing all wells in a single operation.
2023-03-07 12:51:14 +01:00