Use field name constants S_VTK/E_VTK with a shared separator constant to
derive internal storage keys, filter them from the flat result list, and
expose them as folders with S11-S23 / E11-E23 sub-items in the UI.
* 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.
ecl_file_get_restart_view can return null when a timestep has no restart
view, and the result was passed unchecked into ERT functions. Also added a
null guard for grid and summaryView at the entry of transferNncFluxData to
prevent a crash in ecl_nnc_geometry_alloc on null grid.
deleteChildrenAsync() spawns a std::thread that deletes old RimFileSummaryCase
objects concurrently with the OpenMP parallel loop in loadFileSummaryCaseData().
#pragma omp critical only synchronizes OMP threads, not std::threads, so OPM/HDF5
library state was accessed simultaneously from both, causing crashes.
Replace with clearWithoutDelete() + synchronous delete to preserve the observer
signal disconnection fix from #12262 while eliminating the thread race.
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.
Replace CVF_ASSERT with bounds checks returning std::unexpected with
descriptive error messages. Call site updated with TODO to propagate
the error when the receiving system is ready.
Add parameter.isNumeric() guard and bounds check in RimCorrelationMatrixPlot::createMatrix(). Text parameters deduplicate values into fewer entries than ensemble cases, causing out-of-bounds access. Add defensive bounds check in RimParameterResultCrossPlot::createCaseData() for consistency.
Detach m_qwtPlotCurveForLegendText before the viewer check so it is
always detached before deletion. Add null check for curves in
detachPlotCurves, and explicitly call detachPlotCurves from
RimWellLogTrack::detachAllPlotItems to ensure curves are detached
before the track is destroyed.
Move points and connectivity reading inside the isFirst guard to avoid redundant parsing on subsequent timesteps. Move displacements reading outside the guard so they are read for every timestep, and update the log message accordingly.
Tests cover readPoints/readDisplacements/readConnectivity/readProperties
in RifVtkImportUtil, and file open, step names, FEM part loading,
displacement reading, and field names in RifVtkReader.
VTK coordinates are negated (z positive downward) to match ResInsight
internal convention, which flips the IJK directions relative to what the
structured grid algorithm expects. Add invertIJK flag to RigFemPartGrid
and RigFemPart so the inversion is applied during struct grid construction.
Only prepend/append padding rows to RSVD/RVVD/RTEMPVD/PBVD/PDVD tables
when the existing table does not already cover the padding depth range.
This prevents non-monotonic depth sequences that caused issues in OPM.
Also expose extendDepthTable as a public static method on RigPadModel
and add unit tests for all extension scenarios.
Co-authored-by: Vegard Kippe <vkip@equinor.com>
- Remove RimSummaryAddressSelector; sync summary plot address directly from curve definitions
- Add defineUiTreeOrdering to expose sub-plots as tree children with showWindow toggle
- Dock widgets now reflect showWindow() state and close signal updates the model
- Add m_showDockTitleBars field to toggle dock area title bar visibility
- Update auto plot title for correlation matrix to 'Pearson Correlation'
* #11371 Remove GLEW dependency and use Qt's QOpenGLFunctions
Replace embedded GLEW library with Qt's native OpenGL function loading
(QOpenGLFunctions/QOpenGLExtraFunctions) to resolve Qt 6 compatibility
warnings about GLEW conflicts with qopenglfunctions.h.
- Update CVF_CALLSITE_OPENGL macro to provide QOpenGLExtraFunctions pointer
- Replace GLEW initialization with Qt OpenGL context validation
- Keep direct calls for fixed-function GL (glBegin, glEnd, glMatrixMode, etc.)
- Remove glew/ directory containing embedded GLEW source
* #11371 Remove GLU dependency to fix Windows build error
GL/glu.h conflicts with Qt's OpenGL headers on Windows due to APIENTRY
redefinition. Replace gluBuild2DMipmaps with glTexImage2D + glGenerateMipmap,
and gluOrtho2D with glOrtho.
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.
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.
On macOS, the native menu bar hides empty menus. The Windows menu was
populated lazily via aboutToShow, but since it was empty at creation
time macOS never rendered it, so the signal could never fire.
Fix by calling slotBuildWindowActions() after createDockPanels() in
both RiuMainWindow and RiuPlotMainWindow constructors.
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.
Replace boolean push button fields used as UI triggers with dynamic buttons
added via addNewButton in defineUiOrdering, removing unnecessary field
boilerplate across multiple classes.
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.
Replace asserts with early-return guards so zero or negative weights
are silently skipped instead of crashing. Add unit tests for zero-weight
and zero-value edge cases in all three calculator classes.
Fixes#12489.
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.
Harmonize plot title enablement for sub-plots
Encapsulate tracking annotation management in RimCorrelationReportPlot
Improve snapshot capture in RimCorrelationReportPlot
- 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
- 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
- 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
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.
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.
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().
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().
Move all refinement-related fields, enums, UI ordering, validation, and
logic from RicExportSectorModelUi into a dedicated RicRefinementSettings
PdmObject class to improve separation of concerns.
The non-uniform path produced 0-based indices using subcellCount/2,
while WELSPECS expects 1-based values. Use (subcellCount+1)/2 to match
the uniform formula semantics of (ref+1)/2.