Commit Graph
2105 Commits
Author SHA1 Message Date
Kristian Bendiksen 5921c44be0 #4529 Remove nextValidId fields and calculate on the fly
Remove cached next-valid-ID member variables and compute them on demand
by scanning existing objects, following the pattern already used by
RimUserDefinedCalculationCollection. This eliminates unnecessary state
and potential corruption risks.

Fixes #4529.
2026-03-30 17:03:06 +02:00
Magne Sjaastad 4798a879d0 Refactor based on review
Harmonize plot title enablement for sub-plots
Encapsulate tracking annotation management in RimCorrelationReportPlot
Improve snapshot capture in RimCorrelationReportPlot
2026-03-30 12:06:57 +02:00
Magne Sjaastad c49b6986c0 CorrelationReportPlot: Refinements, fixes, and simplifications
- Use RimViewWindow in RiuCorrelationReportPlotWidget constructor
- Update default dock layout to match desired screenshot
- Generalize context menu selection fixer to use caf::PdmObject
- Simplify code, fix event filter lifetime, plot titles, and disable summary plot zoom

RiuSummaryQwtPlot: Add missing override keyword to setZoomEnabled
2026-03-30 12:06:57 +02:00
Magne Sjaastad 3fa91d2d6b CorrelationReportPlot: Add time readout, fix context menus, and improve layout
- Add time readout to summary plot with static and tracking lines
- Fix unstable context menus by setting selection before menu build
- Support global default dock layout and enable summary plot
- Fix snapshot and hide tracking annotation on mouse leave
2026-03-30 12:06:57 +02:00
Magne Sjaastad d64dcefc07 CorrelationReportPlot: Add optional summary plot with ADS dock manager layout
- Add optional summary plot in upper right corner
- Replace fixed grid layout with ADS dock manager for flexible layout
- Show plot titles and set splitter width to 1px
- Use setupBeforeSave to persist dock layout state
2026-03-30 12:06:57 +02:00
Kristian Bendiksen 3067823e71 #12957 Sector Model Export: introduce RigRefinement interface hierarchy
Replace the monolithic RigNonUniformRefinement class with a proper
polymorphic hierarchy: RigRefinement (abstract base), RigNoRefinement
(identity), RigUniformRefinement (O(1) uniform), and
RigNonUniformRefinement (per-cell custom fractions).

Ownership uses std::unique_ptr<RigRefinement>, consumers receive
const RigRefinement&. This eliminates the misleading class name,
removes effectiveRefinement() indirection, and gives each refinement
mode an appropriately optimized implementation.
2026-03-30 11:24:56 +02:00
Kristian Bendiksen 4aa0910db3 #12957 Sector Model Export: add non-uniform refinement support to faults code path
Add RigNonUniformRefinement overloads for extractFaults and faultsKeyword,
following the existing dual-overload pattern. The Vec3st overloads now
delegate via fromUniform() to preserve backward compatibility. Update
addFaultsToDeckFile to call effectiveRefinement() instead of refinement().
2026-03-30 11:24:56 +02:00
Magne Sjaastad 871db2e143 WellAllocationPlot: Display connection numbers as 1-based
connectionNumbersFromTop() now adds 1 to all values so connection numbers are displayed starting from 1 in both the plot and ASCII text report. Also updates the fictitious extension point from -1.0 to 0.0 to be consistent with 1-based numbering.
2026-03-27 14:49:03 +01:00
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
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 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 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
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 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 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 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
Kristian Bendiksen 1f42f70d26 OpmFlowDeck: avoid swallowing error messages when loading deck. 2026-03-16 12:53:49 +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 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
Magne Sjaastad 5ea450494a RimWellEventTimeline: Update editors when applying events
Ensure that the well path collection's editors are updated whenever events are applied to the timeline, keeping the UI synchronized with model changes.
2026-03-12 10:37:35 +01:00
Kristian Bendiksen 334ccc3a66 #13682 Fix Unity build: add missing Color3f scripting include to RimWellPath
RimWellPath.cpp has a scriptable cvf::Color3f field but was missing the
Color3f IOHandler specialization header. In Unity builds, this caused
the primary template to be instantiated, conflicting with the
specialization in cafPdmScripting.lib.
2026-03-12 08:30:52 +01:00
Kristian Bendiksen 3d23e9b51b #13682 Fix Windows Unity build linker error for Color3f scripting
Include cafPdmFieldScriptingCapabilityCvfColor3.h so the compiler sees
the Color3f template specialization instead of instantiating the primary
template, which caused duplicate symbols with cafPdmScripting.lib.
2026-03-12 08:30:52 +01:00
Kristian Bendiksen 614acc664a #13682 Python: Expose polygon appearance properties to Python API
Make RimPolygonAppearance scriptable so polygon visual properties
(colors, line thickness, spheres, closed state, plane lock) can be
controlled from the Python API.
2026-03-12 08:30:52 +01:00
Kristian Bendiksen 576c2179da #13682 Python: Add API for well path color
Make m_wellPathColor scriptable so it is accessible via the Python API
as well_path_color (hex string). Add a test and update the
import_well_paths_and_logs example to demonstrate setting colors.
2026-03-12 08:30:52 +01:00
Magne Sjaastad 85b3ad4cf5 RimReservoirGridEnsemble: Fix statistics not including all realizations
Copy result metadata from main case to all cases after loading in shared
grid mode. Without this, findOrLoadKnownScalarResultForTimeStep() returned
UNDEFINED_SIZE_T for cases 1..N, silently excluding them from statistics.
Mirrors behavior of RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo().

RicImportGridAndSummaryEnsembleDialog: Enable 'realization-*' filter by default
and make tree view grow vertically on dialog resize.
2026-03-10 13:17:54 +01:00
Magne Sjaastad fd27722991 RicImportGridAndSummaryEnsembleFeature: Add feature for importing grid and summary ensembles
- Add RicImportGridAndSummaryEnsembleFeature with icon and menu/toolbar registration
- Register in main window toolbar, import menu (both windows)
- Add feature to plot window Standard toolbar
- Wire up post-import view and plot creation
- Skip grid/summary ensemble creation when no files of that type are found
- Keep focus in plot window when no grid ensembles are created
2026-03-09 14:43:02 +01:00
JJ 24be78f105 Tie-in valve improvements (#13661)
Support (bool, something) pairs as tuples on python side.
Support custom outlet valve md
Add python test for custom outlet valve md
Use tie-in depth as default for custom valve md
Standalone valve creation and display updates
Update MSW valve export
Add valve open/shut flag.
Add python examples
2026-03-06 12:01:14 +01:00
magnesj 759b143c5e Fixes by codespell 2026-03-06 06:44:52 +01:00
Magne Sjaastad 50009ac4d2 Use cafPdmUiButton instead of bool PdmField in multiple classes
Replace PdmField<bool> push button pattern with addNewButton() lambdas
in RiaPreferences, RiaPreferencesSummary, RicUserDefinedCalculatorUi,
RimUserDefinedPolylinesAnnotation, RimPolygonFilter, RimFractureTemplate,
RimEllipseFractureTemplate, RimMeshFractureTemplate, and
RicSummaryPlotEditorWidgetCreator.
2026-03-04 09:52:17 +01:00
Magne Sjaastad 9f30c981bc Remove unused cafPdmUiPushButtonEditor.h includes
Follow-up cleanup after switching from bool PdmField push buttons to cafPdmUiButton.
2026-03-04 09:52:17 +01:00
Magne Sjaastad f5234f0e06 RigWellTargetMapping: Extract private implementation into RigWellTargetMappingTools
Move private methods, DataContainer, and ClusterStatistics from
RigWellTargetMapping into a new RigWellTargetMappingTools class to reduce
header complexity. Change generateEnsembleCandidates to accept
std::vector<RimEclipseCase*> instead of RimEclipseCaseEnsemble.
2026-03-04 07:37:19 +01:00
Magne Sjaastad 61a69bacc4 Use cafPdmUiButton instead of bool in PdmField
* Adopts dynamic PDM buttons with lambda callbacks

Refactors PDM push buttons from boolean fields to use the `addNewButton` API with direct lambda callbacks.

This change enforces a new coding guideline to extract complex or multi-line lambdas to dedicated `on*Clicked()` methods, improving code readability and maintainability.

- Replaces `PdmField` button fields with `PdmUiOrdering::addNewButton` calls.
- Extracts multi-line/control-flow lambdas into named methods in `RimFlowCharacteristicsPlot`, `RimGeoMechCase`, and `RimStatisticsContourMap`.
- Removes obsolete `defineEditorAttribute` overrides and `fieldChangedByUi` logic for these buttons.
- Updates `RimWellPathFracture` to utilize base class-provided button creation.
- Adds new lambda line-count guideline to the coding style documentation.
- Includes minor build fixes, such as adding `cafPdmUiButton.h` and correcting tooltip API usage.
2026-03-03 08:54:45 +01:00
Magne Sjaastad 5b7e62f649 RicNewStatisticsContourMapFeature: Consolidate addStatisticsContourMap to use RimReservoirGridEnsembleBase 2026-03-03 07:35:48 +01:00
Magne Sjaastad 8fdaa83f15 RimReservoirGridEnsembleBase: Make optional methods non-pure virtual with default implementations
mainGrid(), unionOfActiveCells(), computeUnionOfActiveCells(), and statisticsCaseCollection() default to null/no-op. Remove redundant overrides from RimEclipseCaseEnsemble.
2026-03-03 07:35:48 +01:00
Magne Sjaastad 601a3bbb78 Refactor RigFormationNames
- Rename RifColorLegendData to RifFormationNamesReader to better reflect the
class purpose of reading formation names from .lyr files.
- Remove inheritance of cvf::Object
- Improve const correctness
2026-02-27 14:17:21 +01:00
Magne Sjaastad 90c08d8981 #13660 Summary: Skip empty curve data to avoid assert in addCurveData 2026-02-26 08:23:53 +01:00