Commit Graph
187 Commits
Author SHA1 Message Date
Magne Sjaastad 83b4aa35a2 #1136: Apply global curve appearance to summary plots and ensemble curve sets 2026-10-19 09:40:46 +02:00
Magne Sjaastad fac5eb5f3b #8735: Add SummaryPlotCollection multi plot commands and subplots 2026-10-16 09:57:12 +02:00
Magne Sjaastad 56944d8b1b #11172: Show decline curve equations in plot and select time by date 2026-10-13 12:44:00 +02:00
Magne Sjaastad 044454b9b1 Auto-assign Y-axis for ensemble curve sets based on unit/vector match
Extends the existing single-curve auto axis assignment (unit and summary vector matching, then alternating left/right) to also cover RimEnsembleCurveSet. Previously ensemble curve sets were always placed on the default left axis, so e.g. FOPT and FOPR ensembles ended up on the same axis despite differing units.

- Add RimEnsembleCurveSet::unitNameY(), looked up from the first available summary case reader in the ensemble.
- Move X and Y axis assignment from RimSummaryPlot to new RimSummaryPlotTools. Y-axis assignment takes a RiaSummaryAddressModifier::CurveAddressProvider, and compares against both curves and curve sets in the plot.
- RimEnsembleCurveSetCollection::addCurveSet gains an autoAssignPlotAxis flag (default true, matching addCurveAndUpdate for single curves).

Also fixes a bug in the summary plot editor where ensemble curve sets manually assigned to different Y-axes collapsed onto the same axis when clicking OK. The PdmPtrField axis reference does not resolve across the cloned preview and target plots. Add RimEnsembleCurveSet::findOrAssignLeftOrRightAxisY() to capture and re-apply the axis explicitly.

Add RimSummaryPlot-Test.cpp with unit tests for axis auto-assignment of curves and ensemble curve sets.

Fixes #14728
2026-09-16 06:28:50 -04:00
Magne Sjaastad 1fc5e424e4 #14539 Schedule tree updates and release user defined axis ranges for all plot types
Axis range and auto-zoom setters now schedule the editor update instead of
performing it immediately. Every immediate update rebuilds the tags of the whole
project tree, and zoom-all releases the range and re-enables auto zoom for every
axis of every subplot. Scheduling also avoids deleting the tag whose clicked
signal is still being emitted from onPinnedTagClicked().

Remove the m_isAutoZoom branches in fieldChangedByUi(). The field is not part of
any UI ordering, and both orderings end with skipRemainingFields(), so the
branches were unreachable. Comments referring to a "Set Range Automatically"
checkbox are updated accordingly.

The pinned tag no longer reuses pinned.svg, which is also the Quick Access dock
icon and must keep following the widget palette. The gray tag variant lives in
PinnedAxisRange.svg.

Zoom All is an explicit request for automatic ranges, but only summary plots
released the user defined range. Histogram, grid cross, VFP and analysis plots
share RimPlotAxisProperties and set the range as user defined when a min or max
is typed, so Zoom All left them with a stale pinned tag and permanently blocked
enableAutoValueMinMax().

Release the range for every axis owned by the window in RimViewWindow instead,
which makes the summary specific overrides redundant.
2026-09-09 12:08:10 +02:00
Magne Sjaastad 3284fd200a #14539 Add shared-axis, pinned-range indicators and Auto Zoom command for axis objects
Replace the chain/padlock icon with a simple two-headed-arrow icon
(SharedAxis.svg) for linked time/property axes.

Add a pinned-range project-tree tag shown when an axis range is
user-defined, using the standard gray pinned.svg icon. The tag
refreshes immediately regardless of the code path that changes the
range/auto-zoom state (Zoom All, data source changes, axis linking,
UI edits), and clicking the tag releases the user-defined range so
the axis auto-zooms again.

Add RicToggleAxisAutoZoomFeature, a checkable context-menu command
on Y-axis and time-axis objects that toggles auto-zoom and keeps the
pinned/user-defined-range tag in sync in both directions.

Move axis-specific context-menu entries out of RimContextCommandBuilder
into appendMenuItems() overrides on RimPlotAxisProperties and
RimSummaryTimeAxisProperties, per the project convention of keeping
object-specific menu logic in the object.

Fix RimSummaryPlot::timeAxisSettingsChanged() to actually re-apply
auto-scale to the plot widget when auto-zoom is re-enabled on the
time axis; previously only the property was updated, and no
recompute of the plotted range was triggered.
2026-09-09 12:08:10 +02:00
Magne Sjaastad 110bdbe0c7 #14539 Summary Plot: Preserve user defined axis ranges when the data source changes
An axis range defined by the user is now kept when a summary case or ensemble is added, reloaded or replaced. The range is marked as user defined when the user edits the min/max values, unchecks "Set Range Automatically" or zooms interactively in the plot.

The user defined range is released by "Zoom All", by double click in a plot, by checking "Set Range Automatically" or by changing the Y axis range aggregation of a summary multi plot.
2026-09-09 12:08:10 +02:00
Jørgen Herje 0d9d4fed19 Improved Sumo summary data fetching (#14551)
Sumo data is loaded so the application stays responsive while it waits.

Run Sumo transfers on a dedicated thread
Split RiaSumoConnector into transport and data delegates
Load Sumo summary vectors concurrently and without waiting
Show that Sumo data is being loaded
2026-08-20 11:48:25 +02:00
Magne Sjaastad 9b268e6d98 #14543 Use time from simulation start in Show Plot Data
When the summary plot time axis is configured to show time from simulation start, the text produced by Show Plot Data and the ASCII export now reports the same values instead of date and time. The time column header becomes "Time [<unit>]", and each row reports the elapsed time relative to the first time step of the first curve, scaled to the display unit selected on the time axis. Plots using the date based time axis are unchanged.

Time in months and years is computed using calendar arithmetic instead of a fixed number of seconds per unit, so a time step exactly N calendar months or years after the simulation start reports exactly N. This makes resampled data report whole numbers also when a leap year is part of the interval. The calendar arithmetic is available as RiaQDateTimeTools::calendarYearsBetween() and calendarMonthsBetween(), and is used both when plotting the curves and when reporting the time column.
2026-08-20 11:26:56 +02:00
Magne Sjaastad 1660e333ff #14493 Delete curves for all cases in one pass when deleting a summary ensemble
deleteSummaryCaseCollection() looped over every case in the ensemble, and for each case scanned every summary plot and called updateConnectedEditors() on every multi plot. For an ensemble with many realizations this scanned each plot once per realization, and updated the connected editors once per realization and multi plot. This showed up as a hot spot in the profiler.

Replace deleteCurvesAssosiatedWithCase() with deleteCurvesAssosiatedWithCases(), which takes a set of cases and returns whether anything was deleted. Each plot is now scanned once, and the connected editors of a multi plot are updated only when that multi plot actually lost a curve.

RicCloseSummaryCaseFeature and RicCloseObservedDataFeature are updated to the new signature. RicCloseSummaryCaseFeature also scans each plot once instead of once per case.
2026-08-10 12:38:41 +02:00
Magne Sjaastad 56e98ba1c4 #14476 ApplicationLibCode: Replace CVF_ASSERT with CAF_ASSERT
Migrate all assert macros in ApplicationLibCode to CAF_ASSERT and remove every
use of cvfAssert.h.

CVF_ASSERT is replaced one to one. CVF_TIGHT_ASSERT is also replaced by
CAF_ASSERT, which is semantically exact: CVF_ENABLE_TIGHT_ASSERTS is 1 only
under _DEBUG, and that is what CAF_ASSERT now does. The two CVF_FAIL_MSG sites
become CAF_ASSERT( false && "message" ), preserving the message with the idiom
already used elsewhere in the code base.

Counts before and after: CVF_ASSERT 1044 to 0, CVF_TIGHT_ASSERT 66 to 0,
CVF_FAIL_MSG 2 to 0, cvfAssert.h references 154 to 0.

Include handling: files that included cvfAssert.h directly now include
cafAssert.h instead, includes left dead by the migration are removed, and files
that were relying on cvfAssert.h transitively get an explicit cafAssert.h. Files
that reach cafAssert.h through another caf header are left unchanged; a missing
include here is a compile error, not a silently disabled assert.

ResultStatisticsCache links only LibCore and therefore had no path to
cafAssert.h. Add the cafPdmCore directory as a private include path rather than
linking the library, since cafAssert.h is header only.

Note that this stops these asserts from firing in Release and RelWithDebInfo,
where CVF_ASSERT was previously active.
2026-08-07 15:05:57 +02:00
jonjenssen 2faa1cd149 Some cleanup 2026-06-17 13:55:32 +02:00
jonjenssen 797d9ac2db Work in progress 2026-06-17 13:55:32 +02:00
Jon Jenssen d2d7c6ac61 First non-MDI version. Still some missing links and features. 2026-06-17 13:55:32 +02:00
Kristian Bendiksen bb0afbf962 #13126 RiaLogging: Extract errorInMessageBox to RiuMessageDialog
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.
2026-05-08 10:11:09 +02:00
Magne Sjaastad bd3836ba25 #13901 ShowPlotData: Invert dependencies via capability mixins and text-dialog signal 2026-04-20 14:09:25 +02:00
Magne Sjaastad ba1055fbc4 #13813 Remove duplicated snapshotWindowContent overrides that replicate base class behavior 2026-03-30 17:59:01 +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 8e4000590c Add RiaSummaryAddressCollectionTools utility module
Refactor summary address collection logic into a new utility module, RiaSummaryAddressCollectionTools, with functions for object identification, curve definition generation, duplicate filtering, and address-to-case/ensemble mapping. Update RimSummaryPlot to use these utilities, improving modularity and maintainability. Add comprehensive
unit tests for the new module.

Adds test for mock summary case
2026-02-18 14:27:36 +01:00
Magne Sjaastad 395ed06725 Update readout settings for created plot 2025-10-07 12:17:42 +02:00
Kristian Bendiksen f793abe46d #12558 Summary Plot: Fix crash when deleting sub plots.
The std::unique_ptr<RiuPlotWidget> would delete the widget when
RimSummaryPlot object was recreated. This would lead to a
double-delete since the RiuPlotWidget was already deleted by Qt
through the parent-child relationship.

Fixed by using QPointer, and leaving the cleanup to Qt.

Fixes #12558.
2025-08-11 15:04:24 +02:00
Kristian Bendiksen ade8e1d7e6 Remove QT_CHARTS dependency. 2025-07-30 13:39:02 +02:00
Magne Sjaastad 2f9971cb30 Enhances ensemble curve handling and performance
* Removes obsolete code
* Return first non-empty return value from reader
* Simplifies water cut curve visibility check
* Defers the page update until after all plots have been added.
* Add settings to control number of threads
* Refactors ensemble curve handling and visibility

Improves the efficiency of ensemble curve set management by separating realization and statistics curves into distinct collections. This allows for more targeted operations, such as selectively showing/hiding realization curves without affecting statistics.
Also defers data loading of curves until they are actually displayed, optimizing performance.
The visibility updates are modified to optionally skip updating the parent plot, providing more control over replotting behavior and preventing unnecessary updates.
2025-07-30 07:16:29 +02:00
Kristian Bendiksen ea0fb1bdd8 #12559 Fix crash when creating new summary cross plot curve.
Fixes #12559.
2025-07-04 18:54:35 +02:00
Magne Sjaastad b99a213ae7 Add resampling method to RiaCurveMerger
Delete unused parameter
2025-06-16 10:37:34 +02:00
Magne Sjaastad ad83985e62 #12457 Move management of time axis annotations
Use RimTimeAxisAnnotationUpdater for management of annotation objects.
2025-05-08 07:27:42 +02:00
Magne Sjaastad 5f0dd58de9 Improves zoom behavior in multi-plots
Refactors zoom handling in multi-plot scenarios to ensure consistent
axis ranges and proper synchronization between subplots, especially
when linking subplot axes.

Removes direct zoom event handling from subplots and centralizes zoom
logic in the multi-plot container.

This ensures that the 'Zoom All' operation correctly adjusts the
Y-axis ranges based on the configured aggregation method and linked
axes settings.
2025-04-04 13:37:53 +02:00
Magne Sjaastad 70e37e8f5d #12283 Add filter based on summary value at timestep
* Show collapsed range as a single line
* Improves plot annotation label placement
* Adds option to show/hide axis properties
* Adjusts plot info label alignment
* Adds filter by summary value functionality
* Enables ensemble creation from filtered cases
2025-04-01 14:51:13 +02:00
Magne Sjaastad 7e33fee1ac Avoid include in headers 2025-03-14 14:03:09 +01:00
Magne Sjaastad c728979bc1 #12203 Improve selection and highlight of curves in summary plot
Skip distance check when clicking in the plot, always select closest curve
When pressing CTRL, toggle highlighted curves
Allow multi select of realizations in Project Tree
Avoid curve highlight operation during zoom
Make sure wheel zoom works for a single plot
2025-03-07 11:05:39 +01:00
Magne Sjaastad 85abd0c51b #12181 Grid Cell Curve: Allow stacking of grid cell curves in summary plot
* Add stacking to grid cell curves in summary plot
* Add spacing in label text "Cell I J K"
* Add padlock icons and do not delete locked curves
* Show padlock icons only when summary plot is automated
2025-02-24 14:20:13 +01:00
Magne Sjaastad bbd79cca6a #12168 Allow highlight of curves based on selection of realization object
Use the first available highlighted curve as basis for display of horizontal readout value. Fallback to single realization curves.
When selecting a realization in project tree, highlight all related curves
Make sure zoom rect works when readout annotations are active
2025-02-18 11:04:40 +01:00
Magne Sjaastad b165488828 Remove settings settings from plot editor
Remove appearance and name settings
2025-02-13 15:12:24 +01:00
Magne Sjaastad 0604eea74b #12157 Always show vector name when underscore is present 2025-02-13 15:12:24 +01:00
Magne Sjaastad 04cd253fc6 Move files
Fix includes
2025-02-13 15:12:24 +01:00
Magne Sjaastad 037102196e #12090 Add option to hide time labels on x axis 2025-02-06 07:42:03 +01:00
Magne Sjaastad 2021b286ab Show time annotation in all sub plots (#11906)
* Prepare for more customization of annotation objects
* Move files
* Add configuration of readout lines in sub plots. The location along the time axis is based on the current mouse cursor position. The location is distributed to all sub plots. Optional support for readout of values at the current time.
2025-02-05 17:19:01 +01:00
Magne Sjaastad 67e6df28b5 #11857 Make sure the summary curve type is updated
Always compute curve type Rate or Accumulated based on address if Auto curve type is set.
2024-11-06 07:16:07 +01:00
Magne Sjaastad df091336e0 Move summary tools into separate folder 2024-10-22 07:28:43 +02:00
Magne Sjaastad 42d700ff7d Remove unused code 2024-10-16 14:32:36 +02:00
Kristian Bendiksen e9c46c5cec Rename RimSummaryCaseCollection to RimSummaryEnsemble. 2024-07-30 08:55:12 +02:00
Magne Sjaastad 34e30b38d3 #11372 Make sure regression curves can be resampled
Make sure a regression curve based on observed data can be resampled. Split display of curves, one section for resampled curves and one section for observed curves without resampling.
2024-07-25 10:29:16 +02:00
Magne Sjaastad aea804b161 Rename to improve readability 2024-05-03 14:39:39 +02:00
Magne Sjaastad ce513be638 Remove all use of .uiCapability()->setUiTreeHidden( true ); 2024-02-05 10:15:36 +01:00
Magne Sjaastad 01a082f9fc #11161 Change default tree visibility state for childField and childArrayField 2024-02-05 10:15:36 +01:00
Magne Sjaastad 57cb3c0a0b #11141 Improve curve and plot title for calculated summary curves
Remove obsolete special handling of calculated curves
2024-02-02 10:27:20 +01:00
Kristian Bendiksen 08f9e9b5bb Janitor: move historyIdentifier/differenceIdentifier. 2023-12-04 17:26:44 +01:00
Magne Sjaastad 163b742ad0 Remove drag/drop of individual summary curves
Drag/drop of individual curves is unstable. Remove drag/drop, as arrow buttons can be used to change ordering of curves.
2023-11-27 13:14:16 +01:00
Magne Sjaastad 4b0f2b362e Add support for placing legend at several positions
Show legends on top of preview plot
2023-11-27 13:14:16 +01:00
Magne Sjaastad 7d8b947a71 Make sure default left and right axis always is used if available 2023-11-27 13:14:16 +01:00