Commit Graph
20060 Commits
Author SHA1 Message Date
Jørgen Herje 52f9cdf777 Add Polygons data from Cloud (#14811)
Add fetch og polygons from cloud using ri-cloud-api service as submodule

Current version of submodule fetches polygons from Sumo, prodviding polygons with standard results tag.
2026-09-30 18:16:00 +02:00
Magne Sjaastad 61db518efc Address review feedback: add range validation and input-size assertion
- RimContourMapPeaksCollection: clamp m_peakCount to [1,20] and m_minDistance to >= 0.0

- RigContourMapPeakFinder: assert z.size() matches nx*ny before indexing in computeProminenceAndRegionSize
2026-09-30 16:26:04 +02:00
Magne Sjaastad 64fd63b77b #14797 Hide cells-to-include option for line polygon filters 2026-09-30 16:26:04 +02:00
Magne Sjaastad c6664a3361 #14797 Add command to compute contour map peaks
Available from the contour map context menu for Eclipse, GeoMech and ensemble statistics contour maps.
2026-09-30 16:26:04 +02:00
Magne Sjaastad 503ea3eb74 #14797 Contour map: Compute peaks and show them as markers
Each contour map projection owns a peaks collection. Computed peaks are shown in the project tree and visualized as single-point marker polygons in the global polygon collection. Markers are deleted with their peak, copied views drop peaks sharing markers with the original, and peaks are flagged as outdated when the result, time step or value filter changes.
2026-09-30 16:26:04 +02:00
Magne Sjaastad e0e05bcc6d #14797 Polygons: Add sphere display options and view update helpers
Add setters for line and sphere appearance on RimPolygon. Add RimPolygonCollection::updateViewsAfterPolygonsChanged(), shared with the contour map polygon tools, and a deferred variant that is safe to call from destructors.
2026-09-30 16:26:04 +02:00
Magne Sjaastad b28051e3d5 #14797 Add RigContourMapPeakFinder to find local maxima in contour maps
Union-find sweep from highest to lowest value computes the prominence of each peak. Peaks are filtered on prominence and edge contact, ranked by prominence or value, and thinned by minimum distance. Flat shoulders and plateaus are rejected, and prominence is measured against the minimum of each connected data region.
2026-09-30 16:26:04 +02:00
Magne Sjaastad 6c09ad66d9 Fix macOS build: add missing <iomanip> include for std::setw 2026-09-30 07:25:31 +02:00
Magne Sjaastad b1efd7f450 Bump roffcpp submodule to pick up googletest v1.15.2
roffcpp main (36c20f8) bumps its googletest FetchContent pin from
release-1.11.0 to v1.15.2, matching the bump made here for opm-parser-tests, and
updates its own build matrix to supported GitHub runners.

This removes one of the two remaining release-1.11.0 pins that would break a
CMake 4.x configure if the FetchContent declaration order ever changed. The
openzgy pin is still outstanding (CeetronSolutions/openzgy#10).
2026-09-29 14:14:51 +02:00
Magne Sjaastad 055eb49ae8 CI: Pass CMAKE_POLICY_VERSION_MINIMUM=3.5 in clang-tidy and clazy
CMake 4.x on the ubuntu-26.04 runners removed compatibility with
cmake_minimum_required(VERSION < 3.5), and ThirdParty/openzgy/zfp declares
VERSION 3.1 (3.4 on Windows), so configuring fails at
ThirdParty/openzgy/zfp/CMakeLists.txt:4.

zfp is a nested submodule of openzgy pinned at 0.5.5; the first release
declaring a 3.5-or-later minimum is 1.0.0, so clearing this properly means a
major-version upgrade of a compression library and whatever API changes that
brings to the openzgy wrapper. That is worth doing on its own schedule, not as
part of a CI fix.

Pass the policy minimum instead, which is already the established approach in
this repository: ResInsightMac.yml passes the same flag, and both
x64-linux-release and x64-windows-release set it via
VCPKG_CMAKE_CONFIGURE_OPTIONS for the same reason.

A scan of every CMakeLists.txt in the repository and its submodules (excluding
ThirdParty/vcpkg/ports, which the triplets already cover) finds zfp to be the
only remaining declaration below 3.5.

ResInsightWithCache.yml is deliberately left alone: it still runs on
ubuntu-24.04, and its cmake command line feeds the buildcache hash, so adding a
flag there would invalidate the cache for no present benefit. It will need the
same flag when it moves to ubuntu-26.04.
2026-09-29 14:14:51 +02:00
Magne Sjaastad 02a5486f48 CMake: Bump googletest FetchContent pin to v1.15.2 in opm-parser-tests
googletest release-1.11.0 declares cmake_minimum_required(VERSION 2.8.12),
which CMake 4.x rejects, so configuring on the ubuntu-26.04 runners fails with
"Compatibility with CMake < 3.5 has been removed from CMake" at
build/_deps/googletest-src/CMakeLists.txt:4. This was previously masked: the
clang-tidy and clazy runs died earlier, during the vcpkg build.

All googletest consumers share one FetchContent declaration name, so the first
FetchContent_Declare wins and the later ones are inert. opm-parser-tests is
added at CMakeLists.txt:612, ahead of openzgy (675), roffcpp (785),
regression-analysis (794) and ApplicationLibCode (1230), so its pin is the one
that has been in effect for the whole build -- including the targets that
already ask for v1.15.2. Bumping it therefore both fixes the configure failure
and makes the build use the version the rest of the tree already declares.

None of the test directories use the *_TEST_CASE_* macros googletest removed in
1.13, so no test source changes are needed.

The remaining two release-1.11.0 pins live in the roffcpp and openzgy
submodules and cannot be changed from this repository; they are inert while the
declaration order above holds.
2026-09-29 14:14:51 +02:00
Magne Sjaastad edbb0a437b CI: Build vcpkg dependencies release-only in every workflow
vcpkg builds every port in both debug and release unless VCPKG_BUILD_TYPE says
otherwise, and that variable is only read from the triplet file. The workflows
that already pass -DVCPKG_TARGET_TRIPLET/-DVCPKG_HOST_TRIPLET pointing at a
*-release triplet (ResInsightWithCache, rhel8-unit-tests, rhel8-package,
Dockerfile.rhel8) therefore skip the debug half; the remaining three did not.

clang-tidy and clazy-report passed no triplet at all and so used the plain
x64-linux triplet, building every port twice. Both only need
compile_commands.json, so the debug half was pure cost -- and it was the debug
build that failed in the ubuntu-26.04 runs: the snappy error surfaced at
"Building x64-linux-dbg", before the release half was even attempted.

ResInsightMac passed -DVCPKG_BUILD_TYPE=release on the top-level CMake command
line, which has no effect on the ports vcpkg builds, so both macOS legs were
also building debug dependencies. Replace it with the triplet pair and add
x64-osx-release and arm64-osx-release, following the existing convention of
keeping a separate release triplet rather than folding VCPKG_BUILD_TYPE into
the shared overlay so local developer builds keep their debug dependencies.
The new triplets differ from x64-osx/arm64-osx only by
set(VCPKG_BUILD_TYPE release).

Verified that each of the seven cmake invocations using the vcpkg toolchain now
sets both triplet variables, that all four *-release triplets parse and resolve
to VCPKG_BUILD_TYPE=release, and that installing a port with x64-linux-release
builds only "x64-linux-release-rel" with no debug tree.

Also correct the overlay-ports path quoted in a Dockerfile.rhel8 comment, which
the previous commit narrowed to the thrift port directory.
2026-09-29 14:14:51 +02:00
Magne Sjaastad f6787a9ea1 vcpkg: Patch snappy for AVX-by-default toolchains via overlay port
snappy 1.2.2, a transitive dependency of arrow, includes <immintrin.h> only
when SNAPPY_HAVE_BMI2 or SNAPPY_HAVE_X86_CRC32 is set, but MemCopy64() selects
an AVX code path on a separate condition, `defined(__x86_64__) &&
defined(__AVX__)`. The vcpkg port passes -DSNAPPY_HAVE_BMI2=OFF and
-DSNAPPY_HAVE_X86_CRC32=OFF to keep the binaries portable, so on a toolchain
whose default target enables AVX that branch is compiled with no intrinsics
header and snappy.cc fails with "'__m256i' was not declared in this scope".

This broke the clang-tidy and clazy-report workflows the first night after they
moved to ubuntu-26.04. The runner switch also changed the vcpkg compiler hash,
so the binary cache went from "Restored 103 package(s)" to "Restored 0
package(s)" and every port was rebuilt from source, which is what exposed
snappy in the first place. The bug is not GCC 15 specific: microsoft/vcpkg#51047
reports it against GCC 14.3.1. It is still present in snappy 1.3.1 and main, and
vcpkg master still ships 1.2.2 with the SNAPPY_HAVE_* options off, so neither a
baseline bump nor a port update fixes it.

Vendor the port under ThirdParty/vcpkg-overlay-ports and add
avx-immintrin.patch, which includes <immintrin.h> for the __AVX__ branch as
well. The patch cannot change the ISA baseline of the result: it only supplies
a header on a path the compiler was already going to take. Verified by
reproducing the failure locally with an overlay triplet setting
-march=x86-64-v3, confirming the patched port builds both with and without that
flag, and checking that objdump finds no AVX instructions in the library built
with the stock toolchain.

Reference the two overlay ports by their individual directories rather than by
the parent directory. The two configurations resolve different versions of both
ports (default: snappy 1.2.2#1, thrift 0.22.0; rhel8: snappy 1.2.1,
thrift 0.20.0#1), so an overlay of the whole directory would downgrade thrift
for the default builds and bump snappy for RHEL8. Dry runs of both manifests
confirm each profile now picks up only its own overlay.

The bumped port-version misses the existing vcpkg binary caches, but those
caches are already cold for the ubuntu-26.04 workflows.
2026-09-29 14:14:51 +02:00
Magne Sjaastad b1f093fa7d Add issue policy and script to close stale issues
* Add issue policy and script to close stale issues
* Update README with current features, input formats and requirements
2026-09-29 13:19:12 +02:00
dependabot[bot] fa859cdb8d Bump astral-sh/setup-uv from 10.1.0 to 10.2.0
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/bec219d24cd3e171d82865faccec33120bb574f4...c18668ad3cf93ea998bef934396af7bb5c839dc7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-28 18:36:09 +02:00
Magne Sjaastad ccdde6596d #13807 Add 3D viewer background context menu with Link View, Update Bounding Box, Zoom All and default camera position 2026-09-28 18:35:28 +02:00
Magne Sjaastad 50a587b292 #13807 Improve generic view bounding box computation and add explicit recompute command
- Only consider visible well paths when computing the generic view bounding box.
- Fix polygon visibility filtering so individually hidden polygons no longer contribute to the bounding box.
- The bounding box is no longer implicitly invalidated when object visibility is toggled; it now only changes on initial load or when explicitly recomputed.
- Add RicUpdateGenericViewBoundingBoxFeature, a context menu command on RimGeneric3dView that recomputes the domain bounding box from currently visible objects, updates the grid box geometry, and zooms to fit.
2026-09-28 18:35:28 +02:00
Magne Sjaastad 5c97f97f32 #13807 Rename command text 'New View' to 'New Grid Model View' 2026-09-28 18:35:28 +02:00
Magne Sjaastad 34f5c52ca7 #13807 Add Python scripting support for generic view (surface/polygon visibility)
Based on magnesj/ResInsight#1078:
- Lift surfaceInViewCollection()/polygonInViewCollection() to virtual Rim3dView methods
- Make RimGeneric3dView scriptable as GenericView
- Add Project.create_generic_view() Python method
- RimcGridView surface/polygon methods now work on any Rim3dView
- Add Python tests and example script
2026-09-28 18:35:28 +02:00
Magne Sjaastad 7838290a4d #13807 Add a case-less Data View and merge it with Eclipse views in the tree
- Added RimGeneric3dView, a 3D view that is not tied to any grid case,
  useful for wells, surfaces and other data not requiring a reservoir
  grid. The view supports a custom name.
- Introduced RimGenericViewCollection, a new top-level collection that
  holds both Eclipse views and RimGeneric3dView instances. It overrides
  defineUiTreeOrdering() to display both types as a single flat list
  under the top-level 'Views' node.
- RimOilField now exposes a single genericViewCollection instead of a
  plain eclipseViewCollection field.
- RimEclipseViewCollection is unchanged and continues to be used for
  per-case and ensemble view collections.
- Updated RimEclipseCase::globalViewCollection() and related helpers to
  use RimGenericViewCollection, and added matching overloads in
  RicNewViewFeature for creating eclipse views from the merged
  collection.
- Added RicNewGenericDataViewFeature to create a new generic data view
  from the context menu.
2026-09-28 18:35:28 +02:00
Magne Sjaastad a57e53db05 Fix build: declare explicit destructor for RimEclipseContourMapView
cvf::ref<RivContourMapProjectionPartMgr> requires the type to be complete
at the point the implicit destructor is instantiated. Declaring the
destructor and defining it in the .cpp (where RivContourMapProjectionPartMgr.h
is included) avoids the incomplete-type error on clang/gcc Linux builds.
2026-09-28 10:30:12 +02:00
Magne Sjaastad 64b53b0612 #14710 Show active data filter as overlay text in contour map view
Refresh the label when the filter selection changes and repaint immediately, as this happens outside a display model rebuild.
2026-09-28 10:30:12 +02:00
Magne Sjaastad bb8af7bbbd #14710 Compute per-time-step visible cells for dynamic data filters
A static property with an active dynamic filter now produces a contour map per time step. Adds a synthetic ensemble fixture with unified restart files, as the OPM reader used for statistics does not support per-step restart files.
2026-09-28 10:30:12 +02:00
Magne Sjaastad cf75dbf58e #14710 Warn when loading a project with the obsolete formation filter
Keep the removed formation filter fields as obsolete so old projects still parse, and warn that the filter is no longer applied.
2026-09-28 10:30:12 +02:00
Magne Sjaastad 9911c49d2b #14710 Support ensemble data filters in ensemble contour maps
Replace the built-in formation filter with ensemble data filters. Load ensemble data filters after project read, and parent new views before assigning the case so the ensemble filter collection is resolved correctly.
2026-09-28 10:30:12 +02:00
Magne Sjaastad 2bdc35ef68 Keep ubuntu-24.04 for the main build workflow 2026-09-28 09:22:46 +02:00
Magne Sjaastad 10ecec9fb2 Use ubuntu-26.04 runners in all GitHub workflows
Install clang-19 from the Ubuntu archive, as apt.llvm.org has no LLVM 19 repository for 26.04.
2026-09-28 09:22:46 +02:00
Magne Sjaastad cdfc10b833 Count qwt axes when removing a plot axis 2026-09-28 09:18:41 +02:00
Magne Sjaastad d3ce3146fd Guard result metadata copy against a main case without results 2026-09-28 09:18:41 +02:00
Magne Sjaastad 0db64b400b Catch roff parse errors when checking for grid data 2026-09-28 09:18:41 +02:00
Magne Sjaastad 17e8c96e00 Use resdata reader for cases with non-unified restart files
The opm-common reader only reads unified restart files (UNRST). When the
opm-common reader was selected in preferences, cases with one restart file per
time step (X0000, X0001, ...) were opened without dynamic results.

- Fall back to the resdata reader when there is no unified restart file but
  non-unified restart files are present.
- Unit tests using dynamic results check that the result and time step exist
  before accessing them, so a missing result fails the test instead of
  crashing the test executable.
2026-09-27 21:13:13 +02:00
Kristian Bendiksen beadb306c2 #14640 Simulator Events: Use one experimental feature flag
The import and schedule export of simulator events are two halves of the same
workflow, so they share the "simulator-events" flag instead of having one
keyword each. Users who enabled "simulator-events-import" have to tick the new
entry once in Preferences -> System -> Experimental Features.
2026-09-25 14:35:45 +02:00
Kristian Bendiksen 9dda0faa3c #14640 Simulator Events: Add menu to export schedule based on events
The schedule generated from the well event timeline can now be written to
file from the GUI, without scripting.

- RicScheduleDataGenerator::generateScheduleForTimeline() collects the dates
  and wells from the timeline (honoring the last applied timestamp, never
  filtering insert-date events). The Python generate_schedule() method now
  calls it, so GUI and Python export the same schedule.
- New RicExportScheduleFeature "Export Schedule from Events" asks only for the
  file name and uses fixed defaults: the Eclipse case of the active view (else
  the first case of the project), MSW keywords for every well with events, the
  first date as a comment and aligned columns.
- Available from the context menu of the well event timeline and the well path
  collection, and from File -> Export, gated by the new experimental feature
  "simulator-events-export".
2026-09-25 14:35:45 +02:00
Kristian Bendiksen 8324af966c #14666 Simulator Events: Expand INSERT_DATE into insert-date events
INSERT_DATE statements are now expanded into one timeline event per
occurrence instead of a list of bare dates, so each generated date keeps
the COMMENT of its statement.

- New RimWellEventInsertDate (EventType::INSERT_DATE): a date-only event
  that generates no keyword, added with
  WellEventTimeline.add_insert_date_event(event_date, comment).
- The schedule generator writes the comment of an insert-date event as
  "--" lines directly below its DATES keyword.
- generate_schedule(_text) no longer takes additional_dates; insert-date
  events are part of the timeline, but keep the previous behavior of not
  being filtered by set_timestamp().
- SimulatorEventsDocument.report_dates and ApplyReport.report_dates are
  replaced by SimulatorEventsDocument.insert_date_events/insert_dates;
  merging files drops insert dates repeating both date and comment.
2026-09-25 14:35:45 +02:00
Kristian Bendiksen 70e10cb386 #14666 Simulator Events: Align INSERT_DATE with other keyword events
INSERT_DATE is now a SCHEDULE event using KEY=VALUE attributes, and the file
format version is bumped to SIMEVENTS 1.2:

    <date-expr> INSERT_DATE [EVERY=<duration>] [UNTIL=<date-expr>]

- EVERY takes a duration literal, DURATION variable or expression
  (EVERY=1mon, EVERY=30d, EVERY=12mon, EVERY=12h) and must be positive.
  Occurrence n is start + n months (clamped), then + n times the fixed part,
  which preserves the dates of the previous DAY/MONTH/YEAR recurrences.
- UNTIL is an inclusive end date and requires EVERY; quote values with spaces.
- COMMENT is accepted and ignored; other attributes are rejected.
- SIMEVENTS 1.1 files and old-style INSERT_DATE lines are rejected with a
  migration hint showing the rewritten line.
2026-09-25 14:35:45 +02:00
Kristian Bendiksen cbd3d39a5c #14582 Simulator Events: Merge events from multiple files
Importing several SIMEVENTS files together now merges them into one document
before coalescing, so keyword events with the same owner, type and timestamp
are combined across files, not only within one file.

- Add merge_simulator_events_documents, parse_simulator_events_files and
  apply_simulator_events_files. Source locations carry the file name, so
  conflict warnings and errors identify both files.
- Reject mismatched UNIT, and a second RESTART or duplicate WELSPECS across
  files. Collect parse errors from all files in one pass.
- Warn when files declare the same FILTER name with different expressions,
  and keep each file's filter instead of reusing the first one.
- CLI accepts multiple files; the import dialog allows multi-selection.
2026-09-25 14:35:45 +02:00
Magne Sjaastad 423bce9f22 Update devbranch to 2026.09.2 2026-09-24 14:46:03 +02:00
Magne Sjaastad 016ee07dca #14775 Input Property: rename Generated and refresh Data Sources 2026-09-24 08:17:17 +02:00
Magne Sjaastad 20a6373104 #14780 Add unit tests for grouping mode None with varied folder structures
Add a test covering a flat 'realization-N/CASE.EXT' folder structure
(no iter-N level) grouped with EnsembleGroupingMode::NONE, verifying
all files end up in a single best-effort ensemble. Also add a test
confirming empty input produces no bogus ensemble entry.
2026-09-24 08:16:29 +02:00
Magne Sjaastad e269893c04 #14780 Create a best effort ensemble instead of nothing for None grouping
RiaEnsembleNameTools::groupFilesByEnsembleName had no branch for
EnsembleGroupingMode::NONE, so it silently returned an empty map and
no ensemble was created for this grouping mode. Add handling that
groups all input files into a single ensemble.

Also surface warning dialogs instead of silently doing nothing when
no ensemble/grid ensemble could be created from the selected files,
in RicImportGridAndSummaryEnsembleFeature and
RicCreateGridCaseEnsemblesFromFilesFeature.
2026-09-24 08:16:29 +02:00
Magne Sjaastad 8f9b828ac4 Make filter collection and filter names read-only in tree view 2026-09-22 16:16:23 -04:00
JJ bafaa596a3 Remove obsolete cmake config - SOURCE_GROUP_HEADER_FILES (#14783) 2026-09-22 14:23:32 +02:00
Kristian Bendiksen b0f60c392f #14651 SIMEVENTS 1.1: datetime dates and Go-style durations
Increase the time resolution of the SIMEVENTS format and replace whole-day
integer offsets with Go-style duration literals.

- All DATE values are now datetimes with second resolution. A date-only
  literal means midnight; a time-of-day requires the 'T' separator and
  fractional seconds are rounded to the nearest second.
- DURATION values and offset terms are Go-style literals such as 5d,
  12h30m, 1.5h, 3mon and -3d. Units (mon, d, h, m, s) are mandatory, must
  appear in strictly descending order without repeats, and a fraction is
  allowed only on the last component (never on mon or s). Unitless numbers
  and the legacy DAYS suffix are rejected with hints.
- New Duration type keeps calendar months separate from the fixed
  timedelta part; adding months clamps to the end of shorter months, and
  str() renders the Go-style form.
- Header version bumped to 1.1; 1.0 files are rejected with a migration
  hint.
- Update tests, sample .events file, example script and
  docs/simulatorEvents.md.
2026-09-22 14:20:36 +02:00
Kristian Bendiksen fed0fa43c7 #14772 Python: GridCaseGroup.compute_statistics() treats an empty case_ids list as all cases
The legacy computeCaseGroupStatistics command could not distinguish an unset list from an
empty one, so [] meant all statistics cases. Keep that in the deprecation shim.
2026-09-22 14:19:23 +02:00
Kristian Bendiksen 0eff2c193a #14772 exportPropertyInViews: Keep write failures as errors
Only a missing property in a view was a warning in the legacy command; a failed write
aborted with COMMAND_ERROR. The forwarding turned every failure into a warning. Add
RimEclipseView_exportCurrentProperty::hasCurrentProperty() so the Ricf command can
distinguish the two cases without parsing error strings.
2026-09-22 14:19:23 +02:00
Kristian Bendiksen 4148e7a5b1 #14772 Create the export folder on demand in exportCompletions and exportMswCompletions
The legacy exportMsw and exportWellPathCompletions commands relied on the export
implementation creating the folder (RicWellPathExportCompletionsFileTools::openFileForExport),
so the default <project>/completions folder worked on a fresh project. The new Rimc methods
rejected a non-existent folder up front. Create it instead, and only fail if that fails.
2026-09-22 14:19:23 +02:00
Kristian Bendiksen 7cb5ee4363 #14772 Ricf: Only fall back to the first case/group for replaceCase and replaceSourceCases
RicfForwarding::findCase() and findCaseGroup() resolved a negative id to the first
Eclipse result case / first case group for every legacy command. Only replaceCase and
replaceSourceCases had that behavior; all other commands rejected a missing id. Make the
lookups strict and add explicit findCaseOrFirstEclipseResultCase() / findCaseGroupOrFirst()
for the two replace commands.
2026-09-22 14:19:23 +02:00
Kristian Bendiksen d17930d2b3 #14772 Python: Fix type annotations in new wrapper code 2026-09-22 14:19:23 +02:00
Kristian Bendiksen eac6fa3482 #14772 Python: Update examples to use the object methods instead of deprecated wrappers 2026-09-22 14:19:23 +02:00
Kristian Bendiksen 072ef45909 #14772 Document the Rimc object method / Ricf forwarding convention in the agent guidelines 2026-09-22 14:19:23 +02:00