Commit Graph
19711 Commits
Author SHA1 Message Date
Magne Sjaastad 197d58a750 Bump to 2026.09.0 v2026.09.0 2026-08-31 12:45:32 +02:00
Magne Sjaastad 91af3667c8 Add field and object keywords 2026-08-31 12:22:51 +02:00
Magne Sjaastad fd219da50f #14619 ReservoirDataModel: Guard well target mapping against missing or incomplete result data
RigWellTargetMappingTools accessed cellScalarResults() and result vectors without verifying the requested time step or index was within bounds, and without checking for null case data pointers.  Add the missing guards.
2026-08-31 12:20:48 +02:00
Magne Sjaastad cda9551dbb #14222 Well target mapping: Avoid clamp crash with invalid min/max bounds
std::clamp() invokes undefined behavior when the low bound is greater
than the high bound. In resetMinimumCellValuesToDefault(), the
minimum/maximum bounds for saturation, pressure, permeability and
transmissibility are derived from case data and can end up inverted
when no data is available, which crashed or produced garbage values.
2026-08-31 12:20:48 +02:00
Magne Sjaastad f8a55787fd #14646 MSW: Number fracture branches by measured depth
The branch number of a fracture followed the order the fractures were created, so appending a second set of fractures to a well put them after the existing ones regardless of where along the well they sit. Sort by the fracture start MD instead. The order also decides which fracture connects a grid cell shared by two of them.
2026-08-31 10:28:41 +02:00
Magne Sjaastad d085f6ce74 #14646 MSW: Report a grid cell only once across COMPSEGS branches
A grid cell has a single COMPDAT connection and must be connected to exactly one segment, but the geometry-based export emitted one COMPSEGS row per branch intersecting the cell. Restore the well-global bookkeeping the removed tree path had: tag each branch with its origin and let the branch carrying most flow claim a shared cell, perforations before fishbones before fractures.
2026-08-31 10:28:41 +02:00
Magne Sjaastad 377751eb68 Histogram: Make selected sub-plot visible in histogram multi plot
Selecting a curve or a plot inside a RimHistogramMultiPlot in the project
tree now scrolls the multi plot view to make the containing histogram plot
visible, mirroring the existing behavior for RimSummaryMultiPlot.
2026-08-31 10:28:10 +02:00
Magne Sjaastad a4e031b734 Grid statistics: Zoom all on histogram plot after creation
When creating a histogram from grid cell results (e.g. PERMX) via
"Create Grid Statistics Plot", zoom the histogram plot to fit the data
right after the curve is populated, instead of leaving it at default axis
ranges.
2026-08-31 10:28:10 +02:00
Magne Sjaastad e5c3e54227 #14538 Well path: Preserve renamed file well name without breaking legacy projects
Reverts the unconditional change from commit 74ffc822f2 and replaces it with
a safer fix: only skip re-initializing the well path name from the source
file on reload when a name has already been set. Older projects that never
serialized the well path Name field (e.g. TestCase_RFT_PLT/RegressionTest.rsp)
still get their name populated from the file on load, while renamed well
paths in newer projects keep their custom name across reloads.

Restores the RMS well round-trip test that verifies a renamed well path
name persists after save/reopen.
2026-08-31 10:28:10 +02:00
JJ 75ebd7f20b Well target updates (#14619)
Support well target mapping calculations for ensembles.
2026-08-28 13:36:02 +02:00
Kristian Bendiksen 04be720491 #14614 Orion Events: Make import an experimental feature 2026-08-28 13:22:33 +02:00
Kristian Bendiksen b00471dce2 #14614 Orion Events: Add menu item for importing events from file
Add RicImportOrionEventsFeature to File -> Import -> Well Data and the well
path collection context menu. The feature opens a file dialog and launches
the Python interpreter asynchronously with the new --apply mode of the
rips.orion_events CLI, which connects back to the running instance through
RESINSIGHT_GRPC_PORT and applies the events to the well event timeline.
Output is shown in the Process Monitor panel.
2026-08-28 13:22:33 +02:00
Magne Sjaastad 5f0c3f8a54 #14632 Guard against out-of-range time step index when loading results
A case in an ensemble can have fewer time steps than the case defining the time step axis of a statistics case. The time step index was used to index m_cellScalarResults directly, reading past the end of the vector in Release where CAF_ASSERT is a no-op.
2026-08-28 07:15:47 +02:00
Magne Sjaastad 6d7959d150 #14542 Summary: Assign unique case ids when importing multiple cases
Summary cases are created and given a case id before they are added to the
project. The id search only sees cases already in the project, so every case
in a batch import was given the same id.

The Data Sources tree stores the owning case id in each summary address, and
all lookups resolve to the first case with that id. Selecting the same vector
from several cases therefore produced a single curve, and dropping a vector
from one of the other cases hit the duplicate check and did nothing.
2026-08-28 07:02:50 +02:00
Magne Sjaastad 5e17f9986d #14627 Grid statistics: Fix NaN deviation for near-constant results
The single-pass sum-of-squares formula subtracts two large and nearly equal numbers. Where a result such as PORO is identical or near-identical across the realizations, the true variance is below the rounding noise floor, the radicand turns negative and sqrt() returns NaN.

Compute the deviation in two passes instead, centering on the exact mean. This also removes the loss of significance the old formula had for values with a large common offset.

Min, max, range, mean and deviation all report HUGE_VAL when the input holds no valid values, but the sum reported the zero it was accumulated from. A caller testing the result with isValidNumber would accept that zero as real data.
2026-08-28 07:01:57 +02:00
Magne Sjaastad ca8c1b8d04 #14626 Add Import Summary Case to the File menu in the main window 2026-08-27 15:02:49 +02:00
jonjenssen 8f4061208e Use a copy of the OSDU OpenZGY code, not a submodule, due to server instabilities. 2026-08-27 13:46:51 +02:00
Magne Sjaastad 9a5af909f2 #14511 Activate 3D view after importing grid model from summary case 2026-08-27 12:45:28 +02:00
Magne Sjaastad 3508b0a72e #14558 3D filters: Reconnect filter signals after project load
Reading a caf::PdmPtrField sets the pointer to null before the reference string is resolved, and clearing a ptr field disconnects all signals between the referenced object and the field owner. The signal connections established by RimFilterInViewCollection::setSourceCollections() in the view constructor were therefore lost when a project was loaded, and adding a cell filter, property filter or data filter no longer refreshed the Filters node in the project tree. Reconnect in initAfterRead, which runs after the references have been resolved.
2026-08-27 11:42:50 +02:00
Magne Sjaastad 5edefe4ad7 #14602 Summary: Keep the summary toolbar active for child objects of a multi plot
The toolbar is only shown when the active plot view window is a multi plot. When a child object is selected, the first ancestor view window is the sub plot, so the toolbar was cleared and hidden.

Use the summary multi plot as active plot view window when any object inside the multi plot is selected.
2026-08-27 10:16:06 +02:00
Magne Sjaastad 61117162da #14602 Contour map: Keep interactive panning when reloading a project
Viewer::setView() moves the camera to look straight at the point of interest. Panning does not move the point of interest, so this discarded the camera position restored from the project file.

Only reset the view direction if the camera is not already oriented top-down, which is the case when a contour map has been rotated by a linked 3D view.
2026-08-27 10:16:06 +02:00
Magne Sjaastad cf3dadacf7 #14602 UI adjustments for summary import and curve calculator
Use a file dialog caption matching the imported file type instead of always showing "Import Grid Model".

Parent the summary vector selection dialog to the active window, so closing it does not raise the 3D main window in front of the plot window when opened from the Summary Curve Calculator.
2026-08-27 10:16:06 +02:00
Kristian Bendiksen 0cbb5f5935 #14615 Orion Events: Preserve historical keyword values 2026-08-27 10:14:27 +02:00
Magne Sjaastad 6c63c755e7 #14606 Contour Map: Use the cached ensemble statistics when the project is reloaded
The map size of the sample grid was recomputed from the expanded bounding box and the sample spacing stored in the project file. The expanded bounding box is an exact multiple of the sample spacing, but after the limited precision of the project file the division can land just above a whole number of cells, and the map size gets one extra cell. The cache files were then rejected, and the ensemble statistics recomputed.

Store the map size in the project file, and use it directly when the sample grid is restored from the cache.

Identify the input grids of the cache validity key by file path, size and modification time, so that the cache is also invalidated when a grid file is modified in place. Label and count the primary case and the ensemble cases, so that a primary case can not be mistaken for the first ensemble case.
2026-08-27 09:37:31 +02:00
Kristian Bendiksen d760925090 #14611 Nested hybrid grid: number sibling LGRs consistently
A refinement level with a single reconstructed LGR keeps the bare level name (LGR_NHG_L2). A level with several LGRs now numbers all of them with 1-based suffixes (LGR_NHG_L4_1 .. LGR_NHG_L4_N) instead of leaving the first one without a suffix.
2026-08-26 14:59:25 +02:00
Magne Sjaastad d7ea4351e3 #14600 Keep MdiWindowController as project file keyword
Older versions of ResInsight depend on this keyword to create the window controller for plot windows. 3D views work with both keywords, because Rim3dView creates the controller in its constructor, while plots only get one from the project file. DockWindowController is kept as a read alias so project files written by recent dev builds still load.
2026-08-26 14:42:42 +02:00
Kristian Bendiksen f88136eb6a #14573 Orion Events: Add recurring report dates 2026-08-26 14:28:42 +02:00
Kristian Bendiksen 74ffc822f2 #14538 Well path: Preserve renamed file well name
The renamed well path name is serialized correctly, but reopening the project reloads the source well path file and overwrites the saved name with the name from that file. The reload flag only protected the completion export name, despite the loader also updating the displayed well path name.

Only initialize the well path and export names from the source file during first import. Subsequent data reloads preserve the names stored in the project while continuing to refresh geometry and metadata.

Add an RMS well round-trip test that renames an imported well, saves and reopens the project, and verifies that the custom name is retained.
2026-08-25 08:25:20 +02:00
Magne Sjaastad 7b11292839 #14596 Skip computing corner coordinates for cells excluded by the K filter
Move the call to cellCornerVertices below the K filter early out, so the corner coordinates are only computed for the cells that are actually tested against the polygon.
2026-08-25 08:22:29 +02:00
Magne Sjaastad 4a6ebedade #14596 Name the remaining unnamed OpenMP critical sections
All unnamed critical regions map to the same implicit name, so a single process wide lock was shared by summary import, geometry generation, grid bounding box computation and NNC merging. Unrelated parallel loops therefore serialized against each other.

Give each region a critical_section_ name describing what it protects. The two regions guarding RifOpmCommonEclipseSummary::sm_createdEsmryFileCount deliberately share one name, as they protect the same counter.
2026-08-25 08:22:29 +02:00
Magne Sjaastad 63f73a2154 #14596 Document OpenMP conventions for agents
Describe the OpenMP 2.0 constraints that follow from building with MSVC /openmp, and why an orphaned work sharing construct can deadlock the application when the master thread is also the Qt GUI thread.

Also document the pattern of collecting results in per thread buffers and merging after the parallel region, the convention of naming critical sections, and the rule that exceptions must not escape a structured block.
2026-08-25 08:22:29 +02:00
Magne Sjaastad eec9a88bd3 #14596 Collect cells per thread in polygon filter instead of using critical sections
All four cell filter loops guarded a push_back into a shared container with an unnamed critical section, taking a process wide lock for every cell matching the polygon. On large grids with a permissive polygon this can be slower than running single threaded, and it made the resulting cell order vary between runs.

Collect the cells in per thread buffers and append them in thread order after the parallel region, following the pattern used elsewhere in the code base. This removes eight critical sections.
2026-08-25 08:22:29 +02:00
Magne Sjaastad 5c325dcc0b #14596 Remove unnecessary critical section in RiaCurveMerger
Each iteration writes to its own element of accumulatedValidValues, which is sized before the loop, so no synchronization is required. The write to curveValues a few lines below uses the same pattern without a critical section.

All unnamed critical regions share a single process wide lock, so this also removes contention against unrelated parallel loops.
2026-08-25 08:22:29 +02:00
Magne Sjaastad ad0f5f1bce #14596 Remove dead ordered clause and per-triangle lock in NNC geometry generation
The loop was declared with an ordered clause, but the body contains no ordered region, so the clause only enabled the ordered scheduling machinery without providing any ordering. The intended deterministic vertex order was not achieved either, because the actual synchronization was a critical section, which does not preserve iteration order.

Collect vertices in per thread buffers and merge them in thread order after the parallel region, following the pattern already used in RivFaultGeometryGenerator. This removes a lock acquisition per triangle in the innermost polygon loop, and makes the generated geometry identical from run to run.
2026-08-25 08:22:29 +02:00
Magne Sjaastad fa85100da7 #14596 Remove dead reserve and redundant barrier in NNC computation
totalNumberOfConnections was declared, listed in the reduction clause and used to size otherConnections, but it was never incremented. The counting was lost when the loop body was moved into extractConnectionsForFace, so the call has always been reserve( size() + 0 ), which RigConnectionContainer::reserve turns into a no-op.

The reserve was also called by every thread on the shared container without synchronization. Removing it eliminates that data race. The explicit barrier is redundant as well, since the omp for construct has no nowait clause and therefore already synchronizes before the merge.
2026-08-25 08:22:29 +02:00
Magne Sjaastad a7684a14d6 #14596 Use #pragma omp parallel for when building corner point grids
The loops were annotated with #pragma omp for, which is a work-sharing construct that does nothing outside an enclosing parallel region. Replace it with #pragma omp parallel for so the cell loops actually run in parallel.
2026-08-25 08:22:29 +02:00
Magne Sjaastad d2862941f6 #14596 Remove stray #pragma omp for in cvfqt::Utils::toTextureImageRegion
The pragma had no enclosing parallel region, so it did not parallelize anything and only added confusion.

This code caused a deadlock on Windows for the following workflow:
1. import a grid model
2. Import a large summary ensemble with no ESMRY that triggers display of a progress dialog. Make sure the progress dialog is displayed on top of the 3D models -> deadlock
2026-08-25 08:22:29 +02:00
Kristian Bendiksen 565d7b7819 #14571 Orion Events: Expand Python usage examples 2026-08-24 13:26:19 +02:00
Kristian Bendiksen 41b7df5a20 #14571 Orion Events: Preserve post-processed events during merge 2026-08-24 13:26:19 +02:00
Kristian Bendiksen 64317dfad7 #14575 Orion Events: Rename WELLSPEC event to WELSPECS 2026-08-24 13:26:19 +02:00
Kristian Bendiksen da6eb2062c Orion Events: Align imported schedule output in example code 2026-08-24 13:26:19 +02:00
Kristian Bendiksen 0adf471a5d #14514 Orion Events: Include report dates in schedule 2026-08-24 13:26:19 +02:00
Kristian Bendiksen 15adbeb9a1 #14575 Orion Events: Add context to validation errors 2026-08-24 13:26:19 +02:00
Kristian Bendiksen e1b192ff86 #14570 Orion Events: Fix schedule user metadata 2026-08-24 13:26:19 +02:00
Kristian Bendiksen d6878ea562 #14513 Orion Events: Add raw schedule text events 2026-08-24 13:26:19 +02:00
Kristian Bendiksen 1803c636a5 Python: Fix keyword event example rendering 2026-08-24 13:26:19 +02:00
Kristian Bendiksen 2ef4814257 #13672 Python: Add APIs to arrange and link views 2026-08-24 12:43:44 +02:00
Magne Sjaastad c9750f4698 Avoid crash when grid data is missing in shared grid ensemble 2026-08-24 09:10:22 +02:00
Magne Sjaastad a6b903acf3 Avoid terminate on parse error in element property file 2026-08-24 09:10:22 +02:00
Magne Sjaastad d53e5b48b3 Avoid GUI cleanup on a main window being destroyed 2026-08-24 09:10:22 +02:00