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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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().
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.