Commit Graph
1243 Commits
Author SHA1 Message Date
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
Kristian Bendiksen eb39583a7c Apply clang-format to .pvd loading changes 2026-05-04 16:03:23 +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
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 8eb225651b Remove obsolete libecl-based RifReaderEclipseRft, use RifReaderOpmRft only 2026-04-28 12:32:21 +02:00
Magne Sjaastad bd3836ba25 #13901 ShowPlotData: Invert dependencies via capability mixins and text-dialog signal 2026-04-20 14:09:25 +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 387b19ef62 #12276 Add RFT correlation report plot with cross-plot and tornado plot
* Fix defensive guards and TVD interpolation

Guard against out-of-bounds IJK and invalid cells in RifReaderRftInterface.
Guard against null eclCase in RimDataSourceForRftPlt::address.
Guard against null plot widgets in RiuMultiPlotPage.
Fix interpolateMdFromTvd corrupting valid entries after infinity TVD values
by skipping infinity entries in the first pass and tracking only the last
two valid MD values for the startMD adjustment.

* Add RiuQwtCurveSelectorFilter for click-to-select realization in Qwt plots

New shared event filter class that installs on a QwtPlot canvas and calls a
user-supplied callback with the closest data point on each click.

Migrate the local CurveSelectorFilter in RimParameterResultCrossPlot to use
the new shared class. Add Z_HIGHLIGHTED_CURVE to ZIndex enum and replace all
raw z-order integers in RiuQwtPlotCurveDefines with named constants.

* Add RFT correlation report plot with cross-plot and tornado plot

New classes:
- RimRftCorrelationReportPlot: composite plot showing an RFT well log track
  alongside a parameter cross-plot and a tornado plot sub-plot.
- RimParameterRftCrossPlot: cross-plot of ensemble parameters vs RFT-derived
  measured depth values, with click-to-select realization support.
- RimRftTornadoPlot: tornado plot with correlation-sorted parameter list and
  click-to-select realization support.
- RicCreateRftCorrelationReportFeature: context menu command on RimWellRftPlot
  that creates a RimRftCorrelationReportPlot in the correlation plot collection.

Wire up in RimCorrelationPlotCollection and RimContextCommandBuilder.

* Add click-to-select and highlight selected realization in RFT plots

Install RiuQwtCurveSelectorFilter on RimWellRftPlot canvas to support
click-to-select realization. Highlight the selected realization using a
contrast color (orange-red) and increased line thickness. React to both
click-to-select in the plot and selection changes in the Data Sources panel.

Add Z_HIGHLIGHTED_CURVE z-order and replace raw z-order integers with
named constants in RimWellRftPlot.

Highlight selected realization with XCROSS symbol in RimParameterRftCrossPlot
via RimSummaryEnsembleTools::findSummaryCase.

* RimWellRftPlot: add Create RFT Correlation Report to canvas right-click menu

Override appendMenuItems in RimWellRftPlot to add RicCreateRftCorrelationReportFeature.
Call appendMenuItems from RiuMultiPlotPage::contextMenuEvent so any plot type
can contribute canvas menu items without modifying RiuMultiPlotPage.

* RicShowPlotDataFeature: support RimRftCorrelationReportPlot

Add RimRftCorrelationReportPlot to the isCommandEnabled check and expand
it into its cross-plot and tornado sub-plots in onActionTriggered, matching
the pattern used for RimCorrelationReportPlot.
2026-04-16 16:45:44 +02:00
Magne Sjaastad 4564a28f06 #13878 ViewLinker: Guard null pointer use in addDependentView
Replace CVF_ASSERT with an early return guard to prevent crash when
view is null or equals the master view. Also guard null pointer use
in RicSetMasterViewFeature.
2026-04-16 16:43:36 +02:00
Magne Sjaastad c82ba05c1b #13876 WellPathGeometry: Return default values instead of assert and crash 2026-04-16 16:43:36 +02:00
Magne Sjaastad e8223485b1 Fix ADL lookup for cvf pdmToVariant/pdmFromVariant overloads
Move pdmToVariant/pdmFromVariant overloads for cvf::Color3f, Vec3d, Mat4d, and
Mat3d from namespace caf to namespace cvf. Templates in
cafInternalPdmFieldTypeSpecializations.h use "using caf::pdmToVariant" followed
by an unqualified call, so ADL searches the argument's namespace (cvf). With the
overloads only in caf, the default template was selected, causing cvf::Color3f to
be stored raw in a QVariant instead of as QColor — breaking color field editing
and producing QVariant::save warnings.

All call sites now use the unqualified "using caf::pdmXxx; pdmXxx(value)" pattern
so ADL finds the correct overload without depending on cvf:: as a visible prefix.
Add AdlVariantTest to cafPdmCoreColor3fTest.cpp that exercises this exact pattern.

Adds caf::toVariant<T> and caf::fromVariant<T> to cafPdmFieldTraits.h as
thin wrappers that encapsulate the ADL two-step internally. Client code can
now call caf::toVariant(x) directly instead of requiring a using-declaration
at every call site.
2026-04-08 23:12:49 +02:00
Magne Sjaastad ab97381d94 Add ADL-based field traits, migrate all call sites, remove cafInternalPdmValueFieldSpecializations.h
Introduce cafPdmFieldTraits.h with ADL-based pdmToVariant/pdmFromVariant/pdmVariantEqual
as a replacement for PdmValueFieldSpecialization. Migrate all types (AppEnum, FilePath,
PdmPointer, cvf types) and all call sites (PdmDataValueField, PdmProxyValueField, UI
framework, ApplicationLibCode). Delete cafInternalPdmValueFieldSpecializations.h.
Add cafPdmFieldTraits unit tests and fix std::optional support.
2026-04-08 12:37:36 +02:00
Kristian Bendiksen a0dbbf6cb1 Remove deprecated size_t overloads from RigActiveCellInfo
Migrate all callers to use type-safe ReservoirCellIndex and
ActiveCellIndex wrappers, then remove the deprecated isActive(size_t),
cellResultIndex(size_t), and setCellResultIndex(size_t, size_t) methods.
2026-03-31 12:32:05 +02:00
Magne Sjaastad a8ac98ce06 Replace PdmUiPushButtonEditor fields with dynamic buttons
Replace boolean push button fields used as UI triggers with dynamic buttons
added via addNewButton in defineUiOrdering, removing unnecessary field
boilerplate across multiple classes.
2026-03-31 09:16:52 +02:00
Kristian Bendiksen cbbcbb650c #2365 Replace PdmField<QString> with PdmField<caf::FilePath> for file path fields
Convert 11 file/directory path fields from QString to caf::FilePath across
ProjectDataModel classes for type safety and consistent path handling.

Fields converted: RimCalcScript::absoluteFileName,
RimScriptCollection::directory, RimBinaryExportSettings::fileName,
RimExportInputSettings::fileName, RimFractureExportSettings::fileName,
RimReservoirCellResultsStorage::m_resultCacheFileName,
RimProcess::m_workDir, RimWellIASettings::m_baseDir,
RimPlotTemplateFileItem::m_absoluteFileName,
RimWellMeasurement::m_filePath, RimFileWellPath::m_filePath.
2026-03-31 08:46:52 +02:00
Kristian Bendiksen 94757e93e6 #12957 Sector Model Export: replace Enable checkbox with None refinement mode
Add NONE to RefinementMode enum as the default, removing the separate
m_refineGrid checkbox. The UI now shows refinement options only when
Uniform or Non-Uniform mode is selected.
2026-03-30 11:24:56 +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 5d6aba0f70 #12957 Sector Model Export: unified refinement abstraction via effectiveRefinement()
Add effectiveRefinement() to RicRefinementSettings, RicExportSectorModelUi, and
RigSimulationInputSettings, always returning RigNonUniformRefinement regardless of
whether uniform, non-uniform, or no refinement is active.

Merge the dual RigGridExportAdapter constructors into a single one taking
RigNonUniformRefinement, and unify transformIjkToSectorCoordinates to a single
overload. Eliminate all hasNonUniformRefinement() branching patterns in
RigSimulationInputTool.cpp in favour of effectiveRefinement().
2026-03-30 11:24:56 +02:00
Kristian Bendiksen e8a1431c36 #12957 Sector Model Export: extract refinement settings into RicRefinementSettings class
Move all refinement-related fields, enums, UI ordering, validation, and
logic from RicExportSectorModelUi into a dedicated RicRefinementSettings
PdmObject class to improve separation of concerns.
2026-03-30 11:24:56 +02:00
Kristian Bendiksen 282175bdb4 #12957 Sector Model Export: add linear and logarithmic non-uniform refinement sub-modes
Add NonUniformSubMode enum (Custom Widths, Linear Equal Split, Logarithmic
Towards Center) to give users simpler alternatives to manually entering
comma-separated fractional widths.

Linear mode splits each cell in the range into N equal subcells.
Logarithmic mode auto-computes widths with finer resolution near the
center of the range using a geometric series.
2026-03-30 11:24:56 +02:00
Kristian Bendiksen a9918f814e #12957 Sector Model Export: add logging for non-uniform refinement
Log sector size, grid-to-sector coordinate conversion, parsed widths,
clamping, and final refined grid dimensions to help diagnose refinement
issues.
2026-03-30 11:24:56 +02:00
Kristian Bendiksen 354ba9128c #12957 Sector Model Export: use original grid coordinates for non-uniform refinement range
The range start/end fields now refer to cell indices in the original
grid rather than sector-relative indices. Add validation warning when
the refinement range falls outside the sector model bounds.
2026-03-30 11:24:56 +02:00
Kristian Bendiksen 8a9daa94f2 #12957 Sector Model Export: support multi-dimension non-uniform refinement
Replace single-direction non-uniform refinement UI with per-dimension
fields (I, J, K), each with its own enable checkbox, cell range, and
fractional widths. This allows specifying independent refinement in
multiple dimensions simultaneously.
2026-03-30 11:24:56 +02:00
Kristian Bendiksen 06f985b1ed #12957 Sector Model Export: add non-uniform cell refinement
Add a new "Non-Uniform" refinement mode that coexists with the existing
uniform refinement. Users can specify a cell range, direction, and
fractional subdivision widths to create variable-resolution grids.

Core infrastructure:
- RigNonUniformRefinement: per-dimension refinement with cumulative
  fractions and offset tables for O(1)/O(log n) lookups
- RiaCellDividingTools: non-uniform createHexCornerCoords overload
- RigGridExportAdapter: non-uniform constructor, mapping, and
  coordinate transformation overloads

Pipeline integration:
- RigSimulationInputSettings: non-uniform refinement storage
- RigSimulationInputTool: non-uniform paths for grid construction,
  data cropping, BOX context, well keywords, and WELLDIMS
- RifEclipseInputFileTools: non-uniform extractKeywordData overload

UI:
- RicExportSectorModelUi: Uniform/Non-Uniform mode selector with
  direction, cell range, and fractional widths fields
2026-03-30 11:24:56 +02:00
Magne Sjaastad 8d0c3f340b CompletionExport: Add RicMswBranchBuilder and RicWellPathExportMswGeometryPath
Add new MswExport subdirectory with branch builder and geometry path classes
as part of the simplified MSW export approach. Update CMakeLists to include
the new files and add CompletionExportCommands to the include path.
2026-03-27 14:47:32 +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 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 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 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 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
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
Magne Sjaastad 5d65057d6f RiuRecentFileActionProvider: Track last used project file via recent file list
Remove lastUsedProjectFileName from RiaPreferences and store it via the
existing recentFileList QSettings key. loadProject and saveProjectAs now
call addToRecentFiles instead of writing to preferences. A new static
method lastUsedProjectFileName() on RiuRecentFileActionProvider returns
the most recent .rsp entry from the list.
2026-03-11 12:46:43 +01:00
Jon Jenssen 62519d9b24 Support custom DATA file input name.
Fix crash due to invalid cell box
2026-03-10 15:27:48 +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
Magne Sjaastad 5b07323ac8 RicImportGridAndSummaryEnsembleDialog: Add dialog and extract shared tree helpers
- Add new RicImportGridAndSummaryEnsembleDialog for searching and selecting
  grid and summary ensemble files
- Extract firstLevelItems, setCheckedStateChildItems, findItemsMatching and
  populateComboBoxHistoryFromRegistry to public static methods on
  RicRecursiveFileSearchDialog to eliminate duplication
2026-03-09 14:43:02 +01:00
kriben a85b49f86f Fixes by clang-format 2026-03-06 12:32:05 +01:00
Kristian Bendiksen 079372ea85 #13484 Auto-import PVD surfaces for command line and replace case
Extract auto-import logic into public static method
importPvdSurfacesForGridFiles() and call it from:
- Command line case loading (--case argument)
- Replace case menu action
2026-03-06 12:32:05 +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
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
magnesj 76fe5fd4d5 Fixes by clang-format 2026-03-03 07:37:26 +01:00