Commit Graph
3581 Commits
Author SHA1 Message Date
Magne Sjaastad 7f51676da2 Custom Mock Model: Add extent and offset fields to dialog
Expose XYZ extent and XY UTM offset as user-editable fields in the
Customize Mock Model dialog instead of hard-coding them in
RimEclipseResultCase. Defaults match the previous hard-coded values
(6000/12000/500 extent, 400000/6000000 offset).
2026-05-08 10:28:00 +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 4957bf5a8b #13126 RiaLogging: Take std::string_view for logElapsedTime message
Switch the message parameter from const QString& to std::string_view so
callers with std::string in hand no longer need a QString::fromStdString
wrapper. The internal duration formatting still uses QString::arg, fed
from a single QString::fromUtf8 conversion.

Callers passing QString locals are updated with .toStdString() at the
call site.
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 0e27709fe3 #13963 Well path: Migrate legacy SSIHUB cache file path to m_filePath
Restore m_filePathInCache_OBSOLETE as a read-only field (write disabled)
so existing projects that stored the well path in WellPathFilePathInCache
can still be loaded. In initAfterRead, look up the cache file in the
current project's cache directory and copy the path into m_filePath.
2026-05-07 12:57:05 +02:00
Kristian Bendiksen 8638e5a14c #13959 RigSimulationInputTool-Test: Check transformKeywordsInDeckFile return value
Wrap the discarded calls to the [[nodiscard]] std::expected-returning
transformKeywordsInDeckFile in EXPECT_TRUE(...has_value()) to silence
C4834 and assert that the transformation succeeded.
2026-05-06 12:34:22 +02:00
Magne Sjaastad 498c6be663 Pipe geometry: Skip non-finite coords and degenerate cylinder segments
Robustness fixes in RivPipeGeometryGenerator:

- updateFilteredPipeCenterCoords: drop NaN/Inf input coords. The main loop
  now skips iterations where any of the three sampled coords is undefined,
  and the trailing endpoint walks back to the last finite coord so the
  segment-to-result bookkeeping invariant holds.

- computeExtrudedCoordsAndNormals: stop asserting on parallel plane/ray
  intersections (these can occur at very sharp bends due to numerical
  issues) and return early when the extruded node count does not match the
  expected cross-section node count.
2026-05-05 21:55:10 +02:00
Magne Sjaastad bac0249e6a #13962 GeoMech: Show empty unit string for dimensionless FAULTMOB property 2026-05-05 21:54:58 +02:00
Magne Sjaastad e8db66a377 #13964 Show/Hide Geometry: Do not manipulate well path visibility control
Stop changing RimWellPathCollection::wellPathVisibility from the Hide Grid
Geometry and Show All Geometry features. Hide still activates the well path
collection so well paths are drawn when grid cells are hidden.
2026-05-05 12:42:06 +02:00
Magne Sjaastad bdb46d9df4 #13963 Well path: Fix empty file path after reopening JSON-imported well paths
Remove the SSIHUB cache mechanism (m_filePathInCache, isStoredInCache,
setupBeforeSave, updateFilePathsFromProjectPath) from RimFileWellPath. The
cache path was triggered whenever the well path's id field was non-empty,
which JSON imports populate, causing m_filePath to be cleared on save.
2026-05-05 12:04:56 +02:00
jonjenssen 1564df8115 Soil calculation: Keep trying next time steps. 2026-05-04 18:14:33 +02:00
Kristian Bendiksen eb39583a7c Apply clang-format to .pvd loading changes 2026-05-04 16:03:23 +02:00
Kristian Bendiksen 5fcca6bf09 #13940 Fracture export: Guard transmissibility condenser against internal-only neighbor sets
Replace the fatal CAF_ASSERT in calculateCondensedTransmissibilities() with an
early return when no external cells are present. The fracture export pipeline
now yields no completions for such fractures instead of aborting the process.

Fixes #13940.
2026-05-04 15:29:07 +02:00
Magne Sjaastad aac21b071b #13942 SummaryQwtPlot: Guard remaining QPointer dereferences 2026-05-04 15:28:08 +02:00
Magne Sjaastad 4f941c3ef2 #13938 SummaryMultiPlot: Guard against null curve point tracker 2026-05-04 15:27:50 +02:00
jonjenssen 09bbaa58bf Add additional result size checks 2026-05-04 15:22:10 +02:00
Vegard Kippe 4fdb301695 Ensure .pvd files are loaded when cases are opened from history or command line 2026-05-04 15:18:02 +02:00
Vegard Kippe e3be3dd9cc Do not import .pvd files associated with other simulation runs. 2026-05-04 15:18:02 +02:00
Jon Jenssen 0726f20694 Protect flattening code against polylines with a single point 2026-05-02 13:51:40 +02:00
Magne Sjaastad 86500efbdc #13926 GeoMech well log: Guard against OOB indices when interpolating results
Bounds-check every gridResultValues access in interpolateGridResultValue
to prevent segfaults observed in interpolateInterfaceValues' OMP loop
when a result vector was empty or sized for a different result position
type. OOB now returns the infinity sentinel that matches the existing
undefined-value path and the initializeResultValues pre-fill, so
downstream invalid-value checks correctly skip these slots.

interpolateInterfaceValues additionally short-circuits and logs a
warning with the field/component name when the input result vector is
empty, instead of failing silently.
2026-04-30 21:50:45 +02:00
Kristian Bendiksen 605662062c #13924 ContourMap: Use early returns in append-to-model guards
Address review feedback: replace the long conjunction guards added in the
previous commit with early-return statements for readability. Hoist the
legendConfig pointer into a local so the body reuses it instead of calling
legendConfig() repeatedly.
2026-04-29 14:20:38 +02:00
Kristian Bendiksen 32374b1cb6 #13924 ContourMap: Guard against null mapGrid/legendConfig in append-to-model
Mirror the nullptr guards added to RimContourMapProjection::generateGeometryIfNecessary
(commit fdc8608a29) in the three sibling RimEclipseContourMapView and
RimGeoMechContourMapView "append ... to model" methods, which were still
unconditionally dereferencing mapGrid() and legendConfig()->scalarMapper().
2026-04-29 14:20:38 +02:00
Kristian Bendiksen 08b998ac4c #13922 PolygonFilter: Guard K index against per-grid cellCountK
The K layer returned by findEclipseKLayer is computed against one grid
(usually the main grid), but updateCellsForEclipse then forwards it to
every grid including LGRs whose cellCountK can be smaller. Inside
updateCellsKIndexEclipse the unguarded cellIndexFromIJKUnguarded call
combined with the bounds-unchecked cell() accessor produced an
out-of-range cell whose corner indices crashed RigCell::center() and
cellCornerVertices.

Fixes #13922.
2026-04-29 14:11:46 +02:00
Kristian Bendiksen 88355751a5 Sector export: Hide empty Refinement Regions folder in project tree
Add shouldBeVisibleInTree() to RimRefinementRegionCollection (true only
when at least one region exists) and consult it from
RimEclipseView::defineUiTreeOrdering. Refresh the parent view's
connected editors from addNewRegion, removeRegion, and onChildDeleted so
the folder appears and disappears as regions are added or removed via
the generic delete-item action.

The "New Refinement Region" action remains reachable from the Eclipse
view's context menu while the folder is hidden.
2026-04-29 13:14:49 +02:00
Kristian Bendiksen 663142be71 Sector export: Exclude refinement region wireframe from mouse picking
Skip pick items with no cvf source info in both pick paths
(displayContextMenu and findFirstItems). Without this, the refinement
region wireframe — which has no source info — became the topmost hit,
causing the picking handler to bail out and leaving Result Info empty
instead of falling through to the underlying cell.
2026-04-29 13:14:49 +02:00
Kristian Bendiksen 2b52193e90 Sector export: Default refinement region to small centered box
Initialize new refinement regions with a small box (~1/4 of grid I/J
extent) centered in I/J and spanning the full K range, so the wireframe
is clearly visible against the parent grid edges instead of coinciding
with the grid bounds.
2026-04-29 13:14:49 +02:00
Kristian Bendiksen 87e9ab7b5b Sector Export: scale MINPV with refinement
This avoids marking small cells as inactive.
2026-04-29 13:14:49 +02:00
Kristian Bendiksen 9d04f0b122 Sector export: Add refinement regions
Promote sector-export refinement from inline wizard fields to first-class
PDM objects so users can create, edit, and preview refinement regions in
the 3D view before opening the export dialog.
2026-04-29 13:14:49 +02:00
Kristian Bendiksen e936ce24a6 CellFilters: Extract RicCellFilterFeatureTools to deduplicate features
The four single-add cell-filter features (CellIndex, UserDefined,
UserDefinedIndex, RangeSlice) repeated the same combined-filter
dispatch: detect a selected RimCombinedFilter, resolve its case, add
the new filter, select it, and bail out. Move that boilerplate into a
templated helper so each feature shrinks to a single call.

Addresses PR #13911 review feedback.
2026-04-29 11:40:18 +02:00
Kristian Bendiksen 5989785daf CellFilters: Invert dependency in RimCombinedFilter
Replace the six typed addNewXxxFilter factories with a single generic
addNewFilter<T>(init) template. The combined filter no longer references
any concrete RimCellFilter subclass; callers supply the type and an init
lambda for type-specific configuration, while the combined filter handles
cycle checks, parent-case propagation, signal wiring, and host notification.

Addresses PR #13911 review feedback.
2026-04-29 11:40:18 +02:00
Kristian Bendiksen 9d5a8c28f4 CellFilters: Add combined filter for mixing cell and property filters
Add RimCombinedFilter, a node placed under the Eclipse property-filter
collection that holds child filters (cell or property) and combines their
results with a user-chosen AND or OR mode. Supports nesting and is exposed
to Python via the generated rips CombinedFilter class.

To let the same evaluation machinery handle any filter type, introduce a
unified applyToCellVisibility(cellVis, grid, timeStep) virtual on
RimCellFilter with a default implementation that bridges the existing
range/index dispatch. RimEclipsePropertyFilter overrides it with the body
extracted from RivReservoirViewPartMgr::computePropertyVisibility, which
collapses to a generic per-child call and preserves the prior behavior
for ordinary property filters.

Loosen RimEclipsePropertyFilterCollection::m_propertyFilters to
PdmChildArrayField<RimCellFilter*>, keeping the XML tag "PropertyFilters"
and the typed propertyFilters() accessor. Add recursive helpers
(hasActiveEvaluatableDescendant, hasActiveDynamicPropertyDescendant,
hasActiveFormationNamesPropertyDescendant) so hasActiveFilters,
hasActiveDynamicFilters and isUsingFormationNames see property filters
nested inside a combined filter. Bridge filter changes inside a combined
filter to updateDisplayModelNotifyManagedViews, since the property-filter
collection doesn't subscribe to filterChanged signals.

The existing RicNew* cell-filter creation features now route the new child
into a selected combined filter when one is selected, otherwise into the
top-level cell-filter collection as before. The combined filter's context
menu offers the full mixed set: property, polygon, range, index,
user-defined, and nested combined filter.
2026-04-29 11:40:18 +02:00
Magne Sjaastad b27199f4ba RimRftCorrelationReportPlot: Rename correlation plot field and accessor to tornado plot 2026-04-29 10:16:24 +02:00
Magne Sjaastad 42a11da26b Correlation: Sync depth range to tornado and use RFT curve depth values for filtering 2026-04-29 10:16:24 +02:00
Magne Sjaastad 97ed7121ed #13863 Roff: Load grid zonation (subgrids) as SUBGRIDS input property
Read the ROFF "subgrids.nLayers" array and expand it into a 1-based per-cell integer property (SUBGRIDS) so ROFF zonation becomes a regular grid property. If a companion "subgrids.names" array is present, zone names are surfaced as category code-names via the existing color-legend flow.
2026-04-28 19:18:12 +02:00
Magne Sjaastad 5d7d6e85ee RimProject: Include reservoir grid ensemble realizations in allGridCases 2026-04-28 13:51:45 +02:00
Magne Sjaastad 8eb225651b Remove obsolete libecl-based RifReaderEclipseRft, use RifReaderOpmRft only 2026-04-28 12:32:21 +02:00
jonjenssen 9a5dfd8183 Do not allow rename of top surface folder 2026-04-28 12:32:08 +02:00
Magne Sjaastad 72b6aafa01 Correlation: Sync report plots, fix stale annotations and selection highlight, tune RFT defaults 2026-04-27 15:44:14 +02:00
jonjenssen bc7fbc7b76 Add valve keywords to list of well keywords to filter when exporting sector model 2026-04-27 15:09:39 +02:00
Kristian Bendiksen 0c949f2dc3 #13854 Sector export: Shift BCCON Z-face K indices when pad model is enabled
Pad-model extension assumed OPM-style "Z+" for the positive-Z exterior face,
but ResInsight emits "Z" (OPM-Flow short form). The K1/K2 shift never fired,
leaving the bottom boundary face at the original NZ instead of the new
padded NZ. Match both "Z" and "Z+" so the extension applies.

Adds a regression test verifying that with BCCON_BCPROP and padding the "Z"
exterior face is shifted by nzUpper + nzLower while the "Z-" face remains
at K=1, and documents the exterior-face semantics of the direction mapping.
2026-04-23 19:50:19 +02:00
Kristian Bendiksen 2d88be506d #13908 Python: Add API to read well log information
Expose well logs attached to a well path through the Python API. A new
`well_path.well_logs()` returns the list of well logs, and each
`WellLog` gains `channel_names()` and `well_log_data()` for reading
channel names, measured depth, optional TVD MSL/RKB, and channel
values.

The read methods are registered on the abstract `RimWellLog` base
class and use the common `RigWellLogData` interface so they work for
imported, LAS and OSDU well logs alike.
2026-04-23 19:50:05 +02:00
Magne Sjaastad cf62f07224 #13806 Python: Add color legend scripting API
Expose RimColorLegendCollection and RimColorLegend to Python via
CAF_PDM_OBJECT_METHOD entries that let callers create a legend, append
category items with a hex-string color, bind a legend to a (case,
resultName) pair and delete that binding.

Scriptable fields on RimColorLegend and RimColorLegendItem make the
created objects inspectable from Python.

The (case, resultName) binding interface in RimColorLegendCollection,
RimRegularLegendConfig and RimEclipseCellColors now takes a const RimCase*
instead of a case id, matching the caller patterns and avoiding ambiguity
when multiple cases share an id domain.
2026-04-20 18:55:36 +02:00
Magne Sjaastad 75c1cedaec #13806 Python: Add API for creating discrete grid properties
Add a data_type parameter to set_active_cell_property, set_active_cell_property_async
and set_grid_property so callers can upload INTEGER-typed discrete properties in
addition to the existing FLOAT properties. Previously a discrete property required
the result name to end with "NUM"; the explicit data type makes the intent
independent of the name.

The gRPC service now forwards the selected data type to
RigCaseCellResultsData::createCategoryResult, and the Python tests cover both
float and integer property uploads.
2026-04-20 18:55:36 +02:00
Magne Sjaastad bd3836ba25 #13901 ShowPlotData: Invert dependencies via capability mixins and text-dialog signal 2026-04-20 14:09:25 +02:00
Magne Sjaastad 99910c3d7d #13903 Harmonize correlation and tornado bar-chart behavior
Extract shared helpers into a new RimCorrelationBarChartTools
namespace so RimCorrelationPlot and RimRftTornadoPlot share a
single source of truth for:

- highlightSelectedParameterBar and the click-to-parameter-name
  lookup
- the axis-label format, abs/sort-value math, and the
  addBarEntry call (with the "legendText must equal parameter
  name" convention) via addCorrelationBar

Also enable click-to-select on RimCorrelationPlot: use the
parameter name as the bar chart title so click-to-select works,
and recolor the selected bar via a new HighlightBarColor field,
mirroring the pattern used in RimRftTornadoPlot.
2026-04-20 11:41:26 +02:00
Magne Sjaastad 4dfe238fef Summary: Keep curves in other ensembles unchanged when highlighting a realization 2026-04-20 10:52:02 +02:00
Magne Sjaastad c66d29e6ea #13894 PolygonInView: Refresh owning picker editors when toggling picking
After migrating m_enablePicking from a PdmField<bool> to a PdmUiButton callback, the RimPolygonFilter parent was no longer notified via childFieldChangedByUi, so its 3D editor did not register or unregister the pick event handler and the button label did not refresh. Route the toggle through a helper that also calls updateEditorsAndVisualization on the owning RimPolylinePickerInterface.
2026-04-17 21:19:20 +02:00
Kristian Bendiksen f881899815 #13855 Ensure BCPROP goes first in schedule section during sector export 2026-04-17 19:56:49 +02:00
JJ f1923333af Job improvements (#13895)
* Add job wait/queued state
* Add support for limiting number of jobs running
* Add job queue for jobs waiting to run
2026-04-17 19:55:50 +02:00
Magne Sjaastad 7d2d1b831a #13875 ElementPropertyReader: Fix MODULUS scaling bug and remove duplicated code
The range-based loop used the outer column index 'i' as the element index, causing only one slot to be written while all others remained zero. Extracted scaleColumnIfModulus() helper to remove duplication between both branches.
2026-04-16 17:10:16 +02:00