Commit Graph
3472 Commits
Author SHA1 Message Date
Magne Sjaastad 2870dc715e #13405 WellAllocationPlot: Fix missing first connection in plot and plot data
The fictitious depth point (-1.0) that extends the topmost connection bar
was only added for accumulated flow on branch 0. For inflow mode and
accumulated mode on branches > 0, the first connection bar had no extent
and was invisible, and the data export skipped the first real connection.
2026-03-26 14:22:17 +01:00
Magne Sjaastad 04e4303f64 #13796 WellAllocationPlot: Set defaults to Well Flow and Inflow Rates 2026-03-26 09:02:50 +01:00
Magne Sjaastad 641acf9e35 ViewLinker: Fix null pointer dereference when master view is null
Guard against null m_masterView in updateDependentViews, allViewsForCameraSync, allViews, and updateScaleZ to prevent crashes when linking views without a valid master view set.
2026-03-23 16:11:11 +01:00
copilot-swe-agent[bot] 2f08f15fc9 #13676 Grid model: Include negative values for DEPTH calculations 2026-03-23 15:17:27 +01:00
Magne Sjaastad 4de2701bef PropertyFilter: show filter settings when linked with cell result
When m_linkedWithCellResult is true, the early return in defineUiOrdering
was hiding all filter options (range, filter mode, category selection).
Hide only the Result group when linked; always show the Filter Settings group.
2026-03-23 13:31:10 +01:00
Magne Sjaastad 8df24c5bd3 Crash: use SA_SIGINFO on Linux for enhanced crash diagnostics
Switch signal handler registration from signal() to sigaction(SA_SIGINFO)
on Linux to capture fault address, signal code description, and program
counter at crash time. These are logged to the file logger and included
in OpenTelemetry crash reports.
2026-03-23 10:30:14 +01:00
Magne Sjaastad 20052771ad CompletionExport: Simplify findFishboneLateralsWellBoreParts and add unit tests
- Make findFishboneLateralsWellBoreParts public and return result by value
- Move WellBorePartForTransCalc to its own header RicWellBorePartForTransCalc.h
- Replace MSW tree traversal with direct RimFishbones lateral geometry iteration
- Add setSubsOrientationMode() to RimFishbones for deterministic test angles
- Add unit tests validating intersected cells and result values
2026-03-23 10:29:58 +01:00
Magne Sjaastad 6119f73b30 Fix index out of bounds in RigReservoirBuilderMock and RigWellTargetMappingTools test
Guard NNC cell indices against out-of-bounds in addNnc.
Fix test using ActiveCellIndex(1) on a single-element vector.
2026-03-23 10:29:58 +01:00
Kristian Bendiksen a3b784ea34 #13740 Add tests for FIP keyword handling in sector model export
Add regression tests verifying that custom FIPABC keyword in the
REGIONS section is correctly cropped and padded during sector model
export, similar to how FIPNUM is handled.
2026-03-23 09:30:16 +01:00
Magne Sjaastad 185b8a1d26 #13771 RftPlot: Ensemble curve set selection and highlighting
- Legend items are now ordered to match the project tree order
- Selecting a curve set in the project tree highlights it in the plot
  and hides member curves of other curve sets (statistics unaffected)
- Clicking a legend item in the plot selects the curve set in the
  project tree
- Improve text layout in dialog when multiple file names are found
- Fix missing update of ensemble curve sets
2026-03-20 14:52:47 +01:00
Kristian Bendiksen 27c0647611 Refactor: split long method. 2026-03-20 14:30:34 +01:00
Kristian Bendiksen 9678cbf88d #13411 Add tests for MULTIPLY and ADD inside BOX/ENDBOX context
Tests cover record-level processing (no overlap, partial overlap with
clamping, completely inside sector) and full deck transformation with
BOX/ENDBOX for both MULTIPLY and ADD keywords.
2026-03-20 14:30:34 +01:00
Kristian Bendiksen 6ae364200f #13411 Sector Model Export: skip ACTNUM in replaceKeywordValuesInDeckFile
ACTNUM is already correctly computed by updateCornerPointGridInDeckFile
with proper inactive cell handling. Prevent replaceKeywordValuesInDeckFile
from overwriting it with all-1s via extractKeywordData, which treats
ACTNUM as a category result and sets defaultExportValue=1 for all cells.
2026-03-20 14:30:34 +01:00
Kristian Bendiksen cc61559c7d Janitor: Cleanup includes. 2026-03-20 14:30:34 +01:00
Kristian Bendiksen 539eec6cc5 #13411 Sector Model Export: unify BOX/ENDBOX processing into single pass
Replace 7 separate deck iterations (cropDataKeywordsInsideBoxContext,
expandBoxContextInDeckFile, and 5 replace*KeywordIndices wrappers) with
a single transformKeywordsInDeckFile function that tracks BOX/ENDBOX
state once and handles all keyword types as they are encountered.
2026-03-20 14:30:34 +01:00
Kristian Bendiksen fce37b8fdb #13411 Sector Model Export: crop data keywords inside BOX/ENDBOX to sector intersection
Data keywords (PORO, EQLNUM, etc.) inside BOX/ENDBOX contain values for the
sub-box only. When BOX coordinates are transformed to sector coordinates, the
data size must match the transformed box dimensions. Crop boxed data keywords
to the intersection of the BOX region with the sector, preserving the
BOX/ENDBOX structure in the exported deck. If the box does not intersect the
sector, the data keyword is removed.
2026-03-20 14:30:34 +01:00
Kristian Bendiksen ff1018a65f #13411 Add test for data keyword cropping with 4 EQLNUM regions
Add a new .DATA file with K-layer based EQLNUM regions (1-4) and a
test that verifies correct spatial cropping of EQLNUM, EQUIL records,
and PORO when exporting a sector model.
2026-03-20 14:30:34 +01:00
Kristian Bendiksen e6d5c8e6d4 #13411 Sector Model Export: skip ACTNUM in cropDataKeywordsInDeckFile
ACTNUM is handled separately during export, so it should not be
cropped by the generic data keyword cropping logic.
2026-03-20 14:30:34 +01:00
Kristian Bendiksen 42df3170dd #13411 Add integration test for data keyword cropping in sector model export
Verify that PORO, EQLNUM, and SATNUM are correctly cropped from 6000
to 600 values when exporting a 10x10x6 sector from the 20x30x10
model5 grid, and that cropped values match the original uniform data.
2026-03-20 14:30:34 +01:00
Kristian Bendiksen 983be234c1 #13411 Sector Model Export: crop direct listing data keywords from deck
Add cropDataKeywordsInDeckFile() that reads raw cell values directly from
OPM deck keywords (via isDataKeyword/getRawDoubleData/getIntData) and crops
them to the sector box. This handles relperm endpoint arrays (SWL, SWU,
SGCR, SOWCR, etc.) that are specified via direct listing in the .DATA file
and not available in eclipse case results. Runs before
replaceKeywordValuesInDeckFile, which now skips already-cropped keywords.
2026-03-20 14:30:34 +01:00
Magne Sjaastad b14e873fac StatisticsContourMap: Refactor computeStatistics and move helpers to anonymous namespace
Split computeStatistics() into computeStatisticsSharedGrid() and
computeStatisticsIndividualGrids(), and move findKLayersForFormations
and extractCaseResults to an anonymous namespace as free functions.
2026-03-19 15:10:43 +01:00
Magne Sjaastad 831751a903 ContourMapProjection: Replace references with naked pointers
Replace reference members and constructor parameters with raw pointers in
RigContourMapProjection and subclasses. Remove cvf::ref usage in
RigEclipseContourMapProjection. Add updateRealizationData() to allow
swapping active cell info and result data per realization without
rebuilding the grid mapping.
2026-03-19 15:10:43 +01:00
Magne Sjaastad ca2a4dcc2c EnsembleFileSet: Move case creation to createDerivedObjects() lifecycle hook 2026-03-19 15:10:26 +01:00
Magne Sjaastad 04ca172893 PdmObjectHandle: Add createDerivedObjectsRecursively() lifecycle hook
Add createDerivedObjectsRecursively() which traverses the object tree using
direct recursion and calls the virtual createDerivedObjects() on each node.
Called between the two resolveReferencesRecursively() passes in RiaApplication,
allowing objects to create child objects based on already-resolved ptr fields.
The second resolve pass then handles references in the newly created children.
2026-03-19 15:10:26 +01:00
Magne Sjaastad bd7f7cd7e3 EnsembleImport: Add recent files support, file pattern field, and UX improvements
- Store imported ensemble root directory in recently used files list
- Auto-reimport from recent files without dialog using persisted parameters
- Add file pattern field to filter filenames within matched folders
- Gray out and untick create-grid/summary checkboxes when no files of that type are found
- Disable OK button when both checkboxes are unticked
- Show all ensembles collapsed when multiple are detected
- Default-select only the first ensemble when multiple are detected
2026-03-19 15:10:26 +01:00
Magne Sjaastad ba0474616c MSW: Suppress logging when null check fails during UI-triggered update 2026-03-19 15:10:26 +01:00
Magne Sjaastad 6ff75e3700 SummaryMultiPlot: Improve sub-plot stepping and duplicate plot handling 2026-03-18 13:54:06 +01:00
Magne Sjaastad 4586df88fe SummaryPlotSourceStepping: Add isAtEnd() and fix source stepping for sub-plots 2026-03-18 13:54:06 +01:00
Magne Sjaastad 08af803a0e Delete unused functions and fields 2026-03-18 13:54:06 +01:00
Magne Sjaastad 83f667cdf8 Replace RimTools::wellPathCollection() with RimWellPathCollection::instance()
Remove the redundant wrapper function and update all call sites to use RimWellPathCollection::instance() directly.
Remove unused #include "RimTools.h" from files using RimWellPathCollection::instance() directly
2026-03-18 13:41:27 +01: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 a73067b6ea #13727 EnsembleWellLog: Detach QwtPlotCurve before delete to avoid crash on destruction 2026-03-17 20:13:26 +01:00
Magne Sjaastad f4a14c7d28 #13727 EnsembleWellLog: Refactor LAS export to use standalone curves without dummy plots
Replace temporary RimWellLogPlot/RimWellLogTrack creation with standalone
RimWellLogExtractionCurve objects that load data and export directly via
RigLasFileExporter, eliminating the need to create and delete dummy plot objects.
2026-03-17 20:13:26 +01:00
Magne Sjaastad 8c82f834cf #13727 WellLog: Remove cvf::Object from RigWellLogCurveData, use value types throughout
- RigWellLogCurveData no longer inherits from cvf::Object; calculateResampledCurveData returns by value
- RimWellLogCurve::curveData() returns const reference instead of pointer; m_curveData stored by value
- RigLasFileExporter: replace cvf::Collection with std::vector<RigWellLogCurveData>; SingleChannelData stores RigWellLogCurveData by value
- Update all callers to use dot notation instead of pointer dereference
2026-03-17 20:13:26 +01:00
Magne Sjaastad b229417f7c Add comment explaining manual layout deletion in RiuWellLogPlot destructor
Only one of the two scroll bar layouts gets reparented via addLayout()
depending on orientation; the other has no parent and must be explicitly
deleted. Add comment to clarify why both are deleted explicitly.
2026-03-17 14:03:11 +01:00
Magne Sjaastad f12c9f74a6 Remove redundant explicit delete of parented QObjects in RiaApplication
m_osduConnector and m_sumoConnector are created with RiuMainWindow as
parent, so Qt deletes them when the main window is destroyed. The
explicit delete calls were no-ops (QPointer was already null) but
misleading.
2026-03-17 14:03:11 +01:00
Magne Sjaastad f9dd7f1123 Fix crash when closing project with open grid statistics dialog
Use QPointer instead of unique_ptr for m_gridStatisticsDialog to avoid double-free when Qt's parent-child mechanism deletes the dialog before Rim3dOverlayInfoConfig destructor runs.
2026-03-17 14:03:11 +01:00
Magne Sjaastad b7b2a73721 Add context menu actions to hide/show all geometry for well visibility
Two new actions added to the well path context menu:
- "Hide All Geometry (Show Wells)": hides grid cells, faults, and intersections,
  then forces simulation wells and well paths visible.
- "Show All Geometry": restores grid cells, faults, and intersections visibility.

Added RimIntersectionCollection::setActive() for direct state control.
2026-03-16 16:14:08 +01:00
Magne Sjaastad 107615dd09 Fix Unity build: correct misplaced .cpp files in header sections of CMakeLists
Three .cpp files were incorrectly listed in SOURCE_GROUP_HEADER_FILES instead of their
corresponding .h files, causing each to be compiled twice in unity builds and producing
duplicate symbol linker errors (LNK2005) and unresolved externals (LNK2019).
2026-03-16 16:14:08 +01:00
Magne Sjaastad 4f022aee72 RiuRecentFileActionProvider: Normalize path separator to avoid duplicates
Use QDir::fromNativeSeparators before storing or removing file names to
ensure paths with mixed separators are treated as the same entry.
2026-03-16 14:00:21 +01:00
Magne Sjaastad 46b56a800c #12560 Surface: Add export to GRI format with UI dialog and context menu integration
CMake: Change mdspan link from PRIVATE to PUBLIC for surfio_lib
2026-03-16 14:00:07 +01:00
Magne Sjaastad 70b4b63b24 #12560 RifSurfio: Add export to GRI and IRAP binary/ASCII formats 2026-03-16 14:00:07 +01:00
Kristian Bendiksen ca45a5658c #13712 Sector Model Export: Enable extra padding for RVVD keyword. 2026-03-16 12:53:49 +01:00
Kristian Bendiksen 1f42f70d26 OpmFlowDeck: avoid swallowing error messages when loading deck. 2026-03-16 12:53:49 +01:00
Magne Sjaastad 4dd0068605 RicHelpAboutFeature: Display active gRPC port in About dialog
Retrieve the active gRPC port number from the application instance and display it within the version information section of the About dialog.
2026-03-13 15:30:22 +01:00
Jon Jenssen f7154a8146 Fix crash issue with empty blocks when removing block keywords from file deck 2026-03-13 11:41:20 +01:00
Magne Sjaastad 4b43fcf0a7 Revert ContourMap texture-based rendering changes
Reverts:
- ContourMap: Smooth texture edges with weighted alpha blending (2dc7123d8)
- ContourMap: Increase texture resolution with bilinear interpolation (2e1e99602)
- ContourMap: Add texture-based rendering as default rendering mode (87ef7a01b)
2026-03-12 17:31:56 +01:00
Magne Sjaastad 2dc7123d8f ContourMap: Smooth texture edges with weighted alpha blending
Replace hard transparent/opaque edge cutoff with a weighted alpha
derived from the bilinear corner weights. Pixels at the boundary fade
proportionally to how much of their area falls within the defined
region, eliminating the hard staircase artefact.
2026-03-12 15:41:18 +01:00
Magne Sjaastad 2e1e99602b ContourMap: Increase texture resolution with bilinear interpolation
Scale texture up 4x and bilinearly interpolate between adjacent vertex
values to eliminate block artefacts. Pixels adjacent to any undefined
(infinity) vertex are rendered transparent.
2026-03-12 15:31:49 +01:00
Magne Sjaastad 87ef7a01b9 ContourMap: Add texture-based rendering as default rendering mode
Extract and clean up prototype from contour-map-01 branch:
- RivContourMapProjectionPartMgr: add appendProjectionAsTexturedQuad(),
  createSingleTexturedQuadPart(), createXYPlaneQuadGeoWithTexCoords(),
  and createTexture() — renders the map as a single GPU-textured quad
  with transparency (alpha=0) for undefined/infinity cells
- RimContourMapProjection: add m_showTextureImage (default true) and
  m_showTrianglesWithColor (default false) PDM fields; guard triangle
  mesh generation when showTrianglesWithColor() is false
- RimEclipseContourMapView, RimGeoMechContourMapView: branch
  appendContourMapProjectionToModel() to use texture or triangle path
  based on the new flags; Statistics view inherits Eclipse path

Prototype dead code (debug file save, SurfaceEffectGenerator fallback,
redundant createImage()) not carried forward.
2026-03-12 14:40:26 +01:00