Commit Graph
1243 Commits
Author SHA1 Message Date
Magne Sjaastad 7dfa813c06 #12674: Assign well path unit system from loaded cases
Move unit system assignment for new well paths into RimWellPathCollection::assignUnitSystem, used by addWellPath and onChildAdded so Python-created well paths get the case unit system. Ignore unloaded and unknown-unit cases in RimProject::commonUnitSystemForAllCases.

Pasted and multiple-lateral well paths are copies that already carry unit specific settings, so skip unit assignment for them. Note: RimProject::commonUnitSystemForAllCases now ignores unloaded and unknown-unit cases and returns UNKNOWN only for mixed units, which affects its other callers.
2026-10-23 12:01:59 +02:00
JJ 1581e06f2b Export ensemble parameters to file (#15012)
Export ensemble parameters to a comma separated text file provided by user
2026-10-23 07:17:48 +02:00
Magne Sjaastad 6a15c84463 #13485: Export unique top-level well paths for completions and MSW 2026-10-22 13:34:49 +02:00
Magne Sjaastad 56ff80c8e2 #13360: Integrate project version restore tool into GUI
Add a GUI feature for restoring previous versions of a project file from
its backup database, replacing the need for the external standalone tool.

- RiaProjectBackupTools: add extractVersionsToFolder() to read all stored
  revisions from a project's .rspdb backup database and write each one to
  a timestamped .rsp file in a destination folder.
- RicRestoreProjectVersionsUi: dialog for selecting the project file and
  export folder, defaulting to the currently open project. Adds a Recent
  Project Files dropdown (backed by RiuRecentFileActionProvider) that
  quickly populates the project file and export folder fields.
- RicRestoreProjectVersionsFeature: new command feature wired into the
  File menu as 'Restore Previous Project Versions...', using the
  OpenFolder icon and placed after a separator below Save Project / Save
  Project As.
- RiuRecentFileActionProvider: add recentProjectFiles() to expose the
  list of recently used project files.
- Added '...' suffix to Save Project As, consistent with other
  dialog-launching actions.
2026-10-21 22:23:38 +02:00
JJ 6c39729e77 Support submitting opm flow jobs to Slurm or LSF (#14943)
Add preferences for HPC/Batch scheduler
Add Slurm and LSF support
Add batch job monitor
Support launcher specific user settings
Use internal timer to refresh job state
Add some more options to batch monitor
Improve naming
Add tests for job lists
Change WSL handling for processes.
2026-10-21 18:14:13 +02:00
Kristian Bendiksen 409f175467 COMPLUMP: Choose completion number by largest overlap in cell
When several perforation intervals cut the same cell, the completion number
was taken from the first contribution, which depended on the order events
were applied. Unrelated event changes (e.g. group tree members) could then
change COMPLUMP numbers on boundary cells.

Pick the number with the largest summed MD overlap in the cell, with ties
going to the lowest number. Also use stable_sort for same-date events so
they keep file order.
2026-10-21 14:43:07 +02:00
Jon Jenssen 5293dbe015 Add preference setting to select which dynamic result to show as default (if available) 2026-10-20 19:02:32 +02:00
Magne Sjaastad fd0ec10d6b #13889: Import zone colors from stratigraphy.json and zones from yaml
Import zone colors from an FMU stratigraphy.json file located next to the
formation files, and import formation zones from a yaml file.

- Add RifFormationNamesFileParser and move the layer zone table, yaml and
  stratigraphy.json parsers there from RifFormationNamesReader.
- Return std::expected from convertStringToColor.
- Prefer zonation_ecl_map yaml when several yaml files are present, and ignore
  other yaml files.
- Document the FMU location of the formation files.
- Add unit tests and test data for fmu, malformed and missing-color inputs.

Issues: #13889, #13888
2026-10-20 13:36:02 +02:00
Magne Sjaastad c04edc9d39 #14963: Order COMPDAT connections mainbore-first, then laterals
Completions could interleave mainbore and lateral connections, since the
final sort ordered by well name, completion type and measured depth, and
each lateral has its own independent MD scale. Connections for a well's
mainbore should all come before connections for its side steps.

Added RicScheduleDataGenerator::sortCompletionsMainBoreFirst(), which
groups completions by owning well path (via
RigCompletionData::sourcePdmObject()) and emits them in the traversal
order of RimWellPath::allWellPathLaterals(), mainbore first. Sibling
laterals are ordered by tie-in measured depth, as allWellPathLaterals()
itself is not deterministic. The sort is applied in
completionDataForWellPaths() so schedule export, COMPDAT/COMPLUMP export
and the gRPC/Python query all get the same ordering.
2026-10-20 13:06:58 +02:00
Magne Sjaastad 6e8e658f6d #14980: Remove global max segment length from segment collection
The global max segment length no longer exists, so segment subdivision is defined only by the segment intervals.
2026-10-19 21:13:13 +02:00
Magne Sjaastad 81bcc2657d #14962: Update MSW segments when segment intervals change
Segment interval edits, creation and deletion did not trigger the automatic MSW segment update, so the segment visualization along the well path was stale.
2026-10-19 20:00:04 +02:00
Magne Sjaastad 625d7e684e #12925: Apply global curve appearance to summary plots and ensemble curve sets 2026-10-19 15:55:25 +02:00
Kristian Bendiksen 360c3c69db #14684 Simulator Events: Allow schedule generation without a grid case
Grid-dependent keywords (WELSPECS, COMPORD, COMPDAT, COMPLUMP, WELSEGS, COMPSEGS, WSEGVALV, WSEGAICD) are skipped and reported as WARNING comments in the schedule header, so production-data-only setups can still generate DATES and well control keywords.
2026-10-19 12:00:28 +02:00
Kristian Bendiksen c56e921160 #14958 Sim Events: Move PRESSURE_COMPONENTS to WELSPECS
Move Pressure Drop and Length and Depth from the segment collection to
the well path completion settings. PRESSURE_COMPONENTS is now a dated
WELSPECS attribute used for the WELSEGS header at export, and is
rejected on SEGMENT events.
2026-10-19 09:28:29 +02:00
Kristian Bendiksen 2f86d4c210 #14956: Rename well event Tubing to Segment
Rename RimWellEventTubing to RimWellEventSegment (keyword WellEventSegment),
EventType::TUBING to SEGMENT, and the scripting method AddTubingEvent to
AddSegmentEvent (Python: add_segment_event). Update the project tree label,
schedule comments, Python helpers, examples, tests and docs.
2026-10-19 09:28:29 +02:00
Magne Sjaastad 43a4378cee ResInsight: Migrate commands, UI and application code to attribute map 2026-10-17 13:23:22 +02:00
Magne Sjaastad fac5eb5f3b #8735: Add SummaryPlotCollection multi plot commands and subplots 2026-10-16 09:57:12 +02:00
Magne Sjaastad c323846ec5 #13475: Unified LGR completion export tables and single WELSPECL entry per well
* Export LGR completions in single COMPDATL, WPIMULTL and COMPLMPL tables
* Export only first WELSPECL entry per well
* Move LGR test well path to subfolder and format test
2026-10-15 15:25:49 +02:00
Magne Sjaastad 393d32578e #11172: Create decline curves with distinct colors and tree-ordered legend 2026-10-13 12:44:00 +02:00
Magne Sjaastad 97d132685b #14804: Address review comments on segment placement, ISEG gRPC, min/max validation 2026-10-12 19:12:08 +02:00
Magne Sjaastad d8f346e9ab #14804 MSW export: Segmentation controls per interval and around perforations
Add fixed, min and max segment length per segment interval (fixed is exclusive with min/max, min and max can be combined), connect COMPSEGS rows to the nearest segment node, and add collection options for a single segment before the first and after the last perforation.
2026-10-12 19:12:08 +02:00
Magne Sjaastad 98c638418c #14906: Avoid abort in New Default Summary Plot with empty selection
Crash signature 77d8eac5b954.

RicNewDefaultSummaryPlotFeature::onActionTriggered ends with CAF_ASSERT( !selectedEnsembles.empty() ). If the selection no longer has a summary case or ensemble when the action fires, the assert aborts.

Only create ensemble curve sets when the ensemble selection is not empty.

Call stack:
[5] RicNewDefaultSummaryPlotFeature::onActionTriggered(bool) at ResInsight/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.cpp:148
[6] caf::CmdFeature::actionTriggered(bool) at ResInsight/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp:176
[15] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1828
[21] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1828
[33] RiuMultiPlotPage::contextMenuEvent(QContextMenuEvent*) at ResInsight/ApplicationLibCode/UserInterface/RiuMultiPlotPage.cpp:449
[37] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1828
[42] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1828
[53] main at ResInsight/ApplicationExeCode/RiaMain.cpp:267
[54] __libc_start_main at :0
2026-10-12 19:00:45 +02:00
Magne Sjaastad c57864df51 #14889: RFT Ensemble: Additional UI fixes
* #14889: Do not change main window when importing well picks
* #14889: Fix clipped bottom of plots in dock windows
* #14889: Add Create RFT Correlation Report to Ensemble Correlation Plots menu
* #14889: Show imported observed FMU RFT data as table
* #14889: Use time step from source RFT plot in RFT correlation report
* #14889: Show observed data in RFT cross plot when no RFT samples are available
* #14889: Keep RFT plot zoom when toggling formation in RFT correlation report
* #14889: Do not change main window when importing formations
* #14889: Use general delete for observed data and improve FMU RFT data name
2026-10-12 18:50:57 +02:00
Kristian Bendiksen 24e5d2b441 #14870 Schedule export: reject independent trees sharing an MSW name 2026-10-12 18:47:03 +02:00
Kristian Bendiksen f3d9d04281 #14870 Schedule export: export multilateral wells once per well name
Wells sharing an export name now produce one WELSPECS/COMPORD record,
one set of MSW keywords, and no duplicate COMPDAT/COMPLUMP connections.
Events on any well in the group trigger the group's keywords.

Connections in cells shared by several well paths of a group are combined
into one record. MSW keywords are exported for the well tree of the first
group member selected for MSW export.

Fixes #14870
2026-10-12 18:47:03 +02:00
Kristian Bendiksen 164dee3f4b #14873 Schedule export: valve events only emit WSEGVALV/WSEGAICD
VALVE events no longer trigger WELSPECS, COMPORD, WELSEGS and COMPSEGS.
WELSEGS/COMPSEGS are only regenerated for tubing and perforation events.

Fixes #14873
2026-10-12 18:47:03 +02:00
Magne Sjaastad f0dc8c47f0 #14899: Hide main windows on close instead of deleting them
WA_DeleteOnClose left RiuMainWindow::instance() and RiuPlotMainWindow::instance() null after the user closed a window, so any unguarded use crashed. Keep both windows alive for the application lifetime and rebuild their views when a closed window is shown again.

Fixes #14899.
2026-10-12 17:23:10 +02:00
Alif Be 60f96f0ebd #14643: Add blank line after RAW_TEXT 2026-10-12 12:54:20 +02:00
Magne Sjaastad 277322cbcb #14884 Reparent hidden field labels when rebuilding form layout
A hidden label is never added to a layout, so it stayed parented to the
group box it was created in. When the field moved directly to another
group, the old group box was deleted together with the label, and the
next update hit a null label in PdmUiCheckBoxEditor.

Add GroupVisibilityByEnum to cafTestApplication to reproduce the crash.
2026-10-09 13:31:39 +02:00
Magne Sjaastad 5812826db6 #14880: RFT correlation plot formation workflow
* Add Add Well Picks button to well log formation settings
* Expose formation zone colors and shading alpha from RFT track
* Average observed pressures per formation with full min/max range
* Show formation-colored observed pressure and depth filter in RFT correlation plots
* Default new RFT correlation plots to formation filter and ensemble parameter coloring
* Move Qwt code out of RFT correlation Rim classes
* Align RFT correlation depth filter bars and click zones with displayed track formations
2026-10-08 17:32:23 +02:00
Magne Sjaastad 45814555b5 #14878: Add Well Picks (no trajectory) formation source for well log tracks and RFT
New Zonation/Formation Names source WELL_PICKS_NO_TRAJECTORY resolves zone
depths directly from a well-picks file + well name, for tracks without a well
path (e.g. RFT plots without a trajectory). Kept strictly separate from the
existing WELL_PICK_FILTER (well-path-based) source so neither falls back into
the other's resolution path. RFT plots automatically select this source when
no well path exists but a matching well-picks file is found.

Also avoids including RiaWellLogTrackDefines.h from header files; the affected
headers now use opaque enum forward declarations, with the real definitions
included only in the .cpp files that need the enumerator values.
2026-10-08 12:44:14 +02:00
Magne Sjaastad a6a88eeb21 #14878: Migrate well path formations to project-level collection, add manual import command
RimWellPath and RimWellPathCollection now reference a RimWellFormationsFile in the
project-level well formations collection instead of owning per-well-path formations
geometry directly. Reworked the well-pick import command (renamed
RifWellPathFormationsImporter to RicImportWellFormationsFeature) to create/find the
project-level file and link it to the matching (or newly created) well path.
2026-10-08 12:44:14 +02:00
Alif Be 1abff4c0dc Adjust ordering of Flow keywords 2026-10-07 10:48:42 +02:00
Magne Sjaastad 1da4a9e188 Dock window: add permanent detach, stop auto-docking embedded RFT plots
RimWellRftPlot: add detachFromDockPermanently(), which removes the plot from its dock
and discards the window controller for good (unlike removeWindowFromDock(), which must
leave the controller intact so the window can be re-docked later). RimWellRftPlot no
longer docks itself in its constructor, since it can also be embedded as a non-dockable
child of another plot. RicCreateRftPlotsFeature now explicitly calls dockAsPlotWindow()
for its stand-alone RFT plot to preserve existing behavior.

RimRftCorrelationReportPlot: use detachFromDockPermanently() instead of
removeWindowFromDock() for its embedded RimWellRftPlot, and re-apply that detachment in
initAfterRead(), since the PDM factory bypasses the constructor when restoring child
plots from a project file.
2026-10-06 08:15:59 +02:00
Kristian Bendiksen f8b20a3f44 Add missing function headers in cpp files 2026-10-05 19:56:36 +02:00
Kristian Bendiksen d53419bd5c Remove obsolete SOURCE_GROUP_HEADER_FILES everywhere. 2026-10-05 19:56:36 +02:00
Kristian Bendiksen 3a7b8f6be8 Workflows: Add UI for taskmaestro workflows
Discover taskmaestro workflows under ~/.taskmaestro/workflows/ and surface
them as a "Workflows" collection in the project tree alongside Scripts.
Each workflow's task input schema is auto-generated by introspecting the
Pydantic models via a Python helper (rips.taskmaestro_helper) and rendered
as PDM field bindings - scalars for str/int/float/bool, and PdmPtrField
pickers for fields typed as rips.Case / rips.WellPath / rips.View.

The Run button on a RimWorkflow writes input.yaml from current bindings
(rips object references serialized as __resinsight_ref__ maps), spawns
the helper's run subcommand, and streams output to a modeless log dialog.
The helper resolves __resinsight_ref__ markers back to live rips objects
via the running ResInsight's gRPC server before driving taskmaestro.
2026-10-05 19:56:36 +02:00
Magne Sjaastad 63eaa1266d Address review feedback on crash-fix batch
- Camera::fitView/computeFitViewEyePosition: derive one corrected, non-parallel up vector and use it consistently for right, upNorm, planeTop and the final setFromLookAt(), instead of only repairing the right vector. Previously the degenerate (parallel dir/up) case still produced a singular view matrix because up itself was never corrected. Added a regression test exercising fitView() end-to-end (not just computeFitViewEyePosition()) that checks the resulting direction/up/right form a valid orthonormal basis.
- RimViewController::updateCameraLink/updateTimeStepLink: guard against ownerViewLinker()->masterView() being null (RimViewLinker::setMasterView(nullptr) is a supported state), not only against a null view linker.
- RicHistogramPlotTools: use RiaGuiApplication::isRunning() before calling RiaGuiApplication::instance(), since instance() itself asserts when there is no running GUI application.
- RimDockWindowController::updateViewerWidget: create the view widget before the dock widget, so a failed view-widget creation does not leave a dock widget allocated without a dock manager (which deleteDockWidget() cannot clean up).
- RimStimPlanModelCalculator::calculateFormation: avoid continue via a small lambda, and reject double values outside the range of int before the static_cast to avoid undefined behavior.
2026-10-05 19:56:10 +02:00
Magne Sjaastad b0e8d0b62c Make RicHistogramPlotTools robust against null plots, data sources, and missing singletons
Guard all public entry points against null plot/data-source/curve/ensemble arguments, null-check RiaGuiApplication::instance() and RimMainPlotCollection::current() before dereferencing, and skip null curves/data sources when collecting existing data sources.
2026-10-05 19:56:10 +02:00
Kristian Bendiksen 4977941896 #14821 Python: Report specific errors when import_surface fails
- Return std::expected from RimSurfaceCollection::importSurfacesFromFiles
  with a message naming the files that could not be imported
- Return specific errors from ImportSurface and NewSurface scripting
  methods instead of nullptr
- Import before deleting the surface to overwrite, so a failed overwrite
  keeps the existing surface
- Catch surfio exceptions in RifSurfio to avoid a crash on corrupt files
- Include the method name in the generic "no result" gRPC error
- Add Python tests for import_surface error handling
2026-10-05 08:30:33 +02:00
Kristian Bendiksen 3046c7e09d #14829: Emit insert-date event comment above DATES keyword
Fixes #14829.
2026-10-02 12:36:54 +02:00
Magne Sjaastad b6704429cd Scope GRPC/ODB/OpenVDS/HDF5 build flags to avoid full rebuilds
- Remove unused SOURCE_GROUP_HEADER_FILES from GrpcInterface CMakeLists
- Scope the following defines to the files that need it ENABLE_GRPC, USE_ODB_API , USE_OPENVDS, USE_HDF5 
- RifOdbReader.cpp copied an odb_InstanceRepository by value, which
  fails to compile under MSVC's strict conformance mode due to an
  ambiguous implicit copy constructor in the vendor headers (diamond
  inheritance). Use a reference instead, since it was only ever read
  from.
2026-10-02 12:24:29 +02:00
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 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 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 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 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
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