Commit Graph
19733 Commits
Author SHA1 Message Date
Kristian Bendiksen 8c2f23c41b #14365 Nested hybrid grid: simplify refinement hierarchy 2026-08-20 11:00:22 +02:00
Jon Jenssen a86cb6cf4d Formatting fixes 2026-08-20 10:28:45 +02:00
Jon Jenssen 35ec18a3a4 Bring back primary and controlled tags in linked views. Remove obsolete menu command. 2026-08-20 10:28:45 +02:00
Jørgen Herje d25dad35ef Give unit test helpers file-specific names so unity builds do not collide
Several unit test files define helpers with the same name in an anonymous namespace. Each is internal to its own translation unit in a normal build, so they never meet, but the Windows CI job builds with unity enabled and merges several files into one translation unit. There the duplicates are a plain redefinition.
2026-08-19 12:46:02 +02:00
Kristian Bendiksen a7bd331bb3 #14524 Histogram: Hide filter info with curve collection 2026-08-19 12:23:07 +02:00
Kristian Bendiksen 488d631d81 #14524 Histogram: Start a user-defined bin range at the data range
Initialize the min and max cutoffs to the data range of the selected result
when the bin range mode is set to User Defined. The previous fixed default of
[0..1] excluded most values for results like PERMX.

The data range is computed by the same statistics query as the histogram,
respecting the selected time step and an active visible-cells filter, but
without custom binning so min and max are the range of the data.
2026-08-19 12:23:07 +02:00
Kristian Bendiksen 05588f4327 #14524 Histogram: Reset user-defined bin range on property change
A user-defined bin range is tied to the value range of a specific result: a
range set up for FLUXNUM does not apply to PERMX. Reset the bin range mode to
Automatic and the min/max cutoffs to their defaults when another property is
selected, and reset the stale cutoffs when the user sets the bin range mode
back to Automatic.
2026-08-19 12:23:07 +02:00
Kristian Bendiksen 5f465bf19a #14524 Histogram: Set linear binning when selecting a non-logarithmic property
Make the property-driven binning mode symmetric: selecting a non-logarithmic
result (e.g. FLUXNUM) after a logarithmic one (e.g. PERMX) sets the binning mode
and x-axis back to linear.

Replace the one-way logarithmicBinningEnabled signal with a binningModeChanged
signal carrying the new mode, so the x-axis scale follows the binning mode in
both directions, also when the binning mode itself is changed in the UI.
2026-08-19 12:23:07 +02:00
Kristian Bendiksen aaaf5689aa #14524 Histogram: Enable logarithmic binning when selecting a logarithmic property
Selecting a logarithmic result manually in the grid statistics data source
property editor now enables logarithmic binning and a logarithmic x-axis, the
same as creating the plot from a 3D view.

The previously selected result variable is tracked so that only an actual
property change enables logarithmic binning: other property edits leave a
user-selected binning mode alone, and binning modes stored in project files are
kept as-is on load.
2026-08-19 12:23:07 +02:00
Kristian Bendiksen 6c2c13770e #14524 Histogram: Auto-select logarithmic binning and show filter info text
Select logarithmic binning and a logarithmic x-axis automatically when creating a
grid statistics histogram plot from a 3D view showing a logarithmic result
(RiaResultNames::isLogarithmicResult).

Show a plot info label at the top right of the plot canvas describing active data
filters: "Filter: Visible cells in 3D view" when a cell filter view is set, and
"Filter: User defined x-range [min..max]" when the bin range is user-defined. The
label collects unique filter descriptions from the data sources of all visible
curves and is removed when no filters are active.
2026-08-19 12:23:07 +02:00
Magne Sjaastad 508804d6ab #14544 Make mime data hasFormat() consistent with formats()
MimeDataWithIndexes and MimeDataWithReferences advertised every stored format in formats() but denied all of them except their own format name in hasFormat(). The object reference paths that the tree view stores under the ObjectReferenceList mime type were therefore reported as absent, and only worked because QMimeData::data() does not consult hasFormat().

Fall back to QMimeData::hasFormat() so the two functions agree.
2026-08-19 10:32:17 +02:00
Kristian Bendiksen d57abe525d #14533 Orion events: Add group sections 2026-08-19 10:28:35 +02:00
Kristian Bendiksen 3932ac4519 #14535 Orion events: Parse boolean keyword values 2026-08-19 10:28:35 +02:00
Kristian Bendiksen 98147c5c9a #14535 Orion events: Validate keyword field names 2026-08-19 10:28:35 +02:00
Kristian Bendiksen a3bd47b365 #14537 Well events: Refresh tree after timeline changes 2026-08-19 10:28:35 +02:00
Kristian Bendiksen afb13508dc #14514 Remove PERFID and DSHIFT from the ORIONEVENTS format
They are not planned as part of the file format. PERFID on a completion event is now an unknown-attribute error like any other unrecognized key, and DSHIFT on keyword events is forwarded unchanged instead of being stripped with a warning. FILTER keeps its ignore-with-warning behavior outside PERFORATION events.
2026-08-19 10:28:35 +02:00
Kristian Bendiksen b3d0256941 #14514 Add option to include list of dates into schedule file
GenerateSchedule gains an AdditionalDates parameter (ISO date strings). The dates are merged, deduplicated and sorted with the event dates and each becomes a DATES keyword even when no events fall on it, ensuring a summary report at that date in Eclipse/Flow. They are deliberately not filtered by the last applied timestamp.

The ORIONEVENTS 2.0 format gains a top-level REPORT <date-expr> directive (date variables and day arithmetic supported). Parsed dates are collected on OrionDocument.report_dates and surfaced by the applier as sorted ISO strings on ApplyReport.report_dates, ready to pass to generate_schedule_text(additional_dates=...).
2026-08-19 10:28:35 +02:00
Kristian Bendiksen 8c3df6076d #14366 Python: Add per-view surface controls 2026-08-19 10:14:59 +02:00
Kristian Bendiksen 56fb7a660b #14367 Python: Add per-view polygon visibility API 2026-08-19 10:14:59 +02:00
Magne Sjaastad 5b62a84a12 Log error when a result fails to load
findOrLoadKnownScalarResultForTimeStep asserted when the reader failed to
load a result. A result listed in the meta data that cannot be read from
file is a run-time condition, not a programming error, and aborted the
application in builds with asserts enabled.

Report the failing result name and time step through RiaLogging instead.
2026-08-19 07:26:27 +02:00
Magne Sjaastad 71090bdc18 Skip texture binding when texture setup has failed
RenderStateTextureBindings::setupTextures() ignores the return value of
Texture::setupTexture(). When setup fails, the texture is deleted and left
without a valid OpenGL id, but applyOpenGL() still calls Texture::bind(),
where CVF_ASSERT on the id aborts the application.

Skip bindings without a valid texture id and log a render error instead.
2026-08-19 07:26:27 +02:00
Magne Sjaastad 43a925c3f0 #14527 Scale MAPAXES to grid units in the opm-common grid reader
opm-common scales MAPAXES to meter based on the MAPUNITS keyword, while COORD and ZCORN are left in the units given by GRIDUNIT. The map axis transform uses normalized axes plus an origin translation, so the origin must be in grid units to match the node coordinates. Scale the map axes accordingly, and use with_mapaxes() as the guard, as get_mapaxes() returns a fixed size array that is only assigned when the MAPAXES keyword is present. The duplicated map axes handling in the two readers is moved into a shared function.

RivSingleCellPartGenerator-Test.cpp and RivIjkIntersectionGeometryGenerator-Test.cpp both define buildBoxGrid in an anonymous namespace. The definitions do not collide as long as the two files end up in different unity build chunks, but adding a test file repartitions the chunks and the build then fails with a redefinition error.
2026-08-19 07:25:41 +02:00
Kristian Bendiksen 15323a46cb #14459 Sort Z-scale factors and step through custom values with shortcuts
Introduce RiaZScaleTools as a single source for the Z-scale factor list, merging the predefined factors with custom values entered during the session. The toolbar combo box, the property editor combo box and the Ctrl+Shift+Up/Down shortcuts all use this shared sorted list.

The toolbar combo box previously appended custom values at the end, producing an unsorted, ever-growing list, and the shortcuts stepped through the predefined factors only, skipping custom values visible in the list.
2026-08-18 18:40:41 +02:00
dependabot[bot] 45a212d6c3 Bump astral-sh/setup-uv from 9.0.0 to 10.0.1
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 9.0.0 to 10.0.1.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/c771a70e6277c0a99b617c7a806ffedaca235ff9...20cfd1bf945f4377ade1205e4dbc17946fc9a30d)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: 10.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-18 14:17:21 +02:00
Magne Sjaastad d6c0df228d Fix RHEL8 vcpkg build broken by the toolchain cross-compile check
The RHEL8 job pins its own older ports baseline in
vcpkg-configuration-rhel8.json for Rocky Linux 8 compatibility. At that
baseline arrow 18.1.0 passes -DCMAKE_SYSTEM_PROCESSOR=x64, which the
updated linux toolchain reads as a cross build and answers with a
nonexistent x64-linux-gnu-gcc. The January 2025 toolchain had no such
inference, so the mismatch used to be harmless.

Bump the vcpkg submodule to normalize the vcpkg triplet architecture to
the GNU processor name before the cross-compilation check.

The default baseline is unaffected: arrow 21.0.0 there no longer passes
the flag, upstream having removed it in microsoft/vcpkg#47958.
2026-08-14 12:51:26 +02:00
Magne Sjaastad fa0c45a24f Update vcpkg to the 2026.07.29 release
Rebase the fork-local patches onto microsoft/vcpkg tag 2026.07.29
(9e593bb18ea69cc5095e012465dcd675a822ed0d): drop /Z7 from the vcpkg
Windows toolchain, and set CMAKE_POLICY_VERSION_MINIMUM for the
x64-linux and x64-windows triplets.

The previous submodule commit was based on upstream from January 2025,
which pinned msys2-runtime-3.5.4-2. That distfile has been pruned from
all MSYS2 mirrors, so any Windows build with a cold vcpkg binary cache
failed with a 404 while rapidjson acquired pkgconf. The new base pins
msys2-runtime-3.6.5-1, which is still hosted.

The ports baseline in vcpkg-configuration.json is left unchanged.
2026-08-14 12:51:26 +02:00
Magne Sjaastad 0af06ad965 #14423 Fail a unit test leaving data behind in the shared project
The project is a global object shared by all tests, and the MSW export tests loaded a project without closing it. The two summary cases of that project stayed in the summary case main collection, and made RimSummaryCaseMainCollection.RemoveCases_NoDanglingInCallerVector fail on Windows only. Google Test runs the test suites in link order, and the MSW suite runs before the summary suite on Windows and after it on Linux.

Add a test event listener reporting a failure for the test leaving cases, ensembles, well paths or views behind in the project. The project is closed as well, so the tests running after the offending one are unaffected.
2026-08-14 10:23:34 +02:00
Magne Sjaastad db594490fc #14517 Share the mock case factory between the summary tests
RimDeltaSummaryEnsemble-Test.cpp and RimSummaryCaseMainCollection-Test.cpp each defined an identical createMockCase() in an anonymous namespace. A unity build concatenates the two translation units, which merges the two anonymous namespaces into one and makes the second definition a redefinition, breaking the build with C2084.

Move the factory to RimMockSummaryCase.h, the header both tests already include for the mock case itself, and drop both local copies.
2026-08-14 10:23:34 +02:00
Magne Sjaastad 8ac2255832 #14423 Defer destruction of orphaned derived cases to a batch flush
Closing all summary cases while a delta ensemble is present crashed with a use-after-free. RicCloseSummaryCaseFeature::deleteSummaryCases holds a case list across removeCases and deletes it afterwards, while removeCases made the delta ensemble rebuild and destroy derived cases that are themselves part of that list. The previous fix rewrote the caller list with the surviving cases, which stopped the crash but left the hazard in place for any other caller holding a case list across a removal.

Add RimSummaryCaseUpdateBatch, a plain scope object that is ambient for the duration of its scope. Removal now only detaches, and hands the detached cases to the batch. The outermost scope flushes, regenerating the dirty delta ensembles in dependency order first so a chained delta ensemble sees the final state of its source, then destroying the orphans with caf::PdmObjectHandleTools::deleteObjects. A nested batch contributes to the outermost one and never flushes. Orphans are held as guarded pointers, so a case the caller destroyed itself is skipped instead of being destroyed twice. Both contribution points fall back to immediate execution when no batch is active, so call sites that do not open one keep behaving as before.

Open a batch in RimSummaryCaseMainCollection::removeCases and in RicCloseSummaryCaseFeature::deleteSummaryCases, which is the outermost of the two and therefore keeps the detached cases alive across its own deleteObjects call. removeCases no longer rewrites the caller list, so it now takes it by const reference.
2026-08-14 10:23:34 +02:00
Magne Sjaastad 6c0cc9c363 #14423 Rebuild delta ensemble derived cases declaratively
Derived cases were pooled through an m_inUse flag on RimDeltaSummaryCase. Every regeneration marked all cases not in use, which also severed their source references and cleared their caches, then handed them back out one by one and deleted whatever was left over. The flag conflated pool bookkeeping with owning the source references, allSummaryCases() hid the not-in-use cases from the rest of the project, and cases taken from the pool were pushed straight into m_cases without connecting nameChanged, so a renamed source case never propagated to the derived case.

Replace the pooling with desiredSourceCasePairs(), a pure computation of the source case pairs the ensemble should have, and rebuildDerivedCases(), which diffs that against the existing derived cases keyed on the source case pointer pair. Matching cases are reused, missing ones are created, and surplus ones are detached and returned to the caller instead of being deleted in place. Keying on the pointer pair makes the rebuild idempotent, also right after project load where the derived cases arrive from XML with their sources already resolved.

Add the protected RimSummaryEnsemble::addCaseWithoutDependencyUpdate(), used both by addCase() and by the rebuild, so a derived case gets nameChanged connected without triggering the dependent-ensemble notification that the rebuild is already performing itself.

Remove setAllCasesNotInUse(), firstCaseNotInUse(), deleteCasesNoInUse(), RimDeltaSummaryCase::setInUse()/isInUse() and the m_inUse field, and add clearSourceCases() for the one thing setInUse(false) was actually needed for. Old project files keep loading, unknown XML keywords are skipped. The activeOnly parameter of allDerivedCases() is gone and RimDeltaSummaryEnsemble no longer overrides allSummaryCases().
2026-08-14 10:23:34 +02:00
Magne Sjaastad f0d6081448 #14423 Add cycle-safe delta ensemble dependency traversal
Delta ensembles were located by scanning the summary case main collection for objects referring to a given ensemble, and the dependent ensembles were visited by unguarded recursion. A dependency cycle, which is constructible through the UI, made that recursion run forever, and an ensemble used as both source 1 and source 2 was reported twice.

Add dependentDeltaEnsembles(), deltaEnsemblesInUpdateOrder() and wouldCreateDependencyCycle() to RimSummaryEnsembleTools. The traversal uses the PDM back references, deduplicates, is iterative with visited and on-path sets, and returns the delta ensembles in topological order so a delta ensemble is always visited before the delta ensembles using it as a source. Back edges are logged instead of traversed.

Reimplement updateDependentDeltaEnsembles on top of the new traversal and replace RimDeltaSummaryEnsemble::findReferringEnsembles() with dependentDeltaEnsembles() at its four call sites. Back references also find a delta ensemble that is detached from the project tree, which the previous ancestor scan did not.
2026-08-14 10:23:34 +02:00
Magne Sjaastad b97a52005e #14423 Fix crash when closing summary cases referred by a delta ensemble
Removing a source case makes a delta ensemble recreate and delete its derived cases. Those cases are part of the list being removed, leaving dangling pointers that crash in PdmObjectHandle::prepareForDelete(). Use guarded pointers and return only the surviving cases.
2026-08-14 10:23:34 +02:00
copilot-swe-agent[bot]andmagnesj 2a0f9a3b25 #14520 Fix Cell Edge Results loaded even if disabled
Co-authored-by: magnesj <1793152+magnesj@users.noreply.github.com>
2026-08-13 15:51:46 +02:00
Magne Sjaastad acbc041f13 Remove Copilot coding agent setup workflow
The copilot-setup-steps job ran before every Copilot task and spent up to
an hour on submodule checkout, Qt, vcpkg and a full build, which is wasted
work for documentation and other text-only tasks. Remove it so cloud tasks
start from a plain checkout.
2026-08-13 14:49:10 +02:00
Magne Sjaastad 3371141a60 #14319 Guard against malformed statistics cache files when restoring contour map results 2026-08-13 07:22:30 +02:00
Magne Sjaastad 0049d6ee72 #14319 Store ensemble contour map statistics cache as GRI surface files 2026-08-13 07:22:30 +02:00
Magne Sjaastad 4d789634f4 #14319 Cache computed ensemble contour map statistics as ROFF files next to the project 2026-08-13 07:22:30 +02:00
Magne Sjaastad 88832908a4 #14319 Add binary ROFF writer with round-trip unit tests 2026-08-13 07:22:30 +02:00
Kristian Bendiksen 5674130504 #12720 Histogram: Recreate summary vector curves when dropping an ensemble
When an ensemble is dropped on a histogram plot showing summary vector curves,
create a new curve per distinct vector and time step for the dropped ensemble,
matching the existing behavior for ensemble parameter curves.
2026-08-13 07:19:18 +02:00
Kristian Bendiksen 2a19af2321 #12720 Histogram: Accept summary vector drag'n'drop on histogram multi plot
Add a virtual RimMultiPlot::handleDroppedObjects so RiuMultiPlotBook routes drop
events to any multi plot type instead of only RimSummaryMultiPlot. Implement the
handler in RimHistogramMultiPlot: each dropped ensemble summary vector, ensemble
parameter or file set ensemble creates its own new histogram subplot, following
the behavior of the summary multi plot. Extract RimHistogramPlot::isDroppableObject
so unsupported dropped objects do not create empty subplots.
2026-08-13 07:19:18 +02:00
Kristian Bendiksen 329b7e7876 #7750 Histogram Plot: Group bin settings in a 'Bins' property group
Move Number of Bins and the new binning fields into a shared UI group created by
RimHistogramDataSource::appendBinningUiOrdering().
2026-08-13 07:19:18 +02:00
Kristian Bendiksen d96159fb7c #7750 Histogram Plot: Add logarithmic binning and user-defined bin range
Add BinningMode (Linear/Logarithmic) and OutOfRangeHandling (Exclude/Include in
Boundary Bins) to RigHistogramCalculator, with defaulted constructor arguments so
existing callers are unaffected. All four histogram plot data sources get shared
options for binning mode and an optional user-defined bin range through new PDM
fields on RimHistogramDataSource.

The grid statistics data source computes non-default histograms through a new
non-caching RigStatisticsDataCache::computeHistogram() pass-through, leaving the
cached statistics used by the 3D overlay and the P10/P90/mean annotation lines
untouched.

Selecting logarithmic binning enables logarithmic scale on the plot X axis once,
via a new signal handled by RimHistogramCurve.

Also fix the bin index computation to use uniform bins of width range/nBins,
consistent with calculatePercentil() and the bin edges drawn by the plots. The
previous divisor (nBins - 1) shifted counts by up to one bin width relative to
the drawn bars and slightly biased histogram-based percentile estimates.
2026-08-13 07:19:18 +02:00
magnesj f742fdcac4 Bump to version 2026.06.2-dev.04 2026-08-12 16:01:23 +02:00
Kristian Bendiksen 8bfbe00056 #14136 Event Timeline: Use shorter column headers in exported schedule file
Shorten long OPM parser item names (e.g. CONNECTION_TRANSMISSIBILITY_FACTOR) in the aligned keyword output by truncating underscore-separated tokens until the header fits the data width, so headers no longer pad data rows past the 132-character line limit enforced by some simulators.
2026-08-12 15:35:06 +02:00
Jørgen Herje 5afb5c8a17 Sumo summary data using ri-cloud-api (#14503)
- Fetch SUMO summary data using ri-cloud-api
- Update ri-cloud-api submodule to get improved speed on sumo search
2026-08-12 12:22:40 +02:00
Kristian Bendiksen 62712997e8 #14216 Assign created valve template back to the valve event and reuse it on re-apply
If a valve event already has a valve template assigned, applying the event now reuses that template for the created well path valve instead of creating a new one. When no template is assigned, the template created from the event parameters is assigned back to the event, so the event UI shows the template in use and repeated applies no longer accumulate duplicate templates.
2026-08-12 11:23:32 +02:00
Kristian Bendiksen 9df7b933a7 #14216 Improve well event GUI: keyword item table, timeline sorting and filtering
Show keyword event items as an editable table in the property panel instead of one tree node per attribute. Items expose a single typed Value column via a proxy field; name and type are read-only.

Add sorting (date, well, type; ascending or descending) and filtering (wells, event types, optional date range) to the well event timeline. The project tree shows the filtered event count in the timeline node name.

Provide well path options for the event well path field, name keyword event tree nodes consistently with other event types, and hide the unused well path field for schedule-level keyword events.
2026-08-12 11:23:32 +02:00
Magne Sjaastad c8b1ebc266 #14505 caf: Defer group box deletion in PdmUiFormLayoutObjectEditor
The group boxes were destroyed with a raw delete, which destroys the child widgets immediately and defeats the deleteLater() used by PdmUiFieldEditorHandle to keep field editor widgets alive. When the rebuild is triggered from fieldChangedByUi(), Qt is still using those widgets further up the stack, giving a use-after-free.

Hide and detach the group box before scheduling a deferred delete, so it leaves the layout, the visual tree and the focus chain immediately. Detaching first is what plain deleteLater() did not do in issue 9719.
2026-08-11 08:36:37 +02:00
Magne Sjaastad d5a7e79d50 #14505 caf: Guard null auto value tool button in PdmUiLineEditor
The tool button and the layout are owned by m_placeholder, which is not returned as the editor widget when auto value is not supported. Nothing tracks m_placeholder in that case, so it can be destroyed together with a parent widget while the reparented m_lineEdit survives. A later configureAndUpdateUi() then found a non-null m_lineEdit and a null m_autoValueToolButton, and crashed on hide().

Guard both pointers before use, matching how m_label and m_lineEdit are already guarded in the same function. This is a separate defect from the use-after-free in issue 14505, found while reproducing it in cafTestApplication.
2026-08-11 08:36:37 +02:00
Magne Sjaastad 702e7e3173 #14505 caf: Add cafTestApplication repro for reentrant property editor rebuild
Adds a ReentrantEditorRebuild demo object that rebuilds all property editors from inside fieldChangedByUi(), while Qt is still executing QLineEdit::focusOutEvent. Type a value into Realization Filter and press Tab to trigger. The change handler drops both the line edit field and its parent group from the ui ordering, so PdmUiFormLayoutObjectEditor::configureAndUpdateUi() tears down widgets that are still in use further up the stack. Uncheck Rebuild Layout On Change to run the same edit without the reentrant rebuild.
2026-08-11 08:36:37 +02:00