Commit Graph
547 Commits
Author SHA1 Message Date
JJ 0c9dd08e7b Calculate quality control results (#15149)
* Register qc results and calculate automatically on demand
2026-11-10 20:42:45 +01:00
Magne Sjaastad 10afb45933 Show measured depth labels on the well path pipe surface
Labels are anchored at the pipe surface point closest to the camera and offset perpendicular to the pipe on screen. Also account for well paths starting at non-zero measured depth.
2026-11-10 15:38:08 +01:00
Magne Sjaastad 512c22b46e #15084: Address review comments and add Above/Below/Between/Outside value filter types
Show the value range of all rows when a value filter is active.
2026-11-10 09:40:19 +01:00
Magne Sjaastad 4daaa159ff #15084: Use shared statistics type enum
Add RiaDefines::StatisticsType and use it in Summary Table, statistics contour map and ensemble surface statistics instead of three separate enums with the same values.
2026-11-10 09:40:19 +01:00
Magne Sjaastad 082ff3c04f #15084: Add value filter to Summary Table 2026-11-10 09:40:19 +01:00
Magne Sjaastad 0991edaaf4 #15084: Always show first and last tick labels in legend 2026-11-10 09:40:19 +01:00
Stefan Crooijmans 70a47d2ac0 #12460 Python: Write vertex properties to GOCAD TSurf files
Add an overload of RifSurfaceExporter::writeGocadTSurfFile that writes
PROPERTIES and PVRTX lines, which RifSurfaceImporter::readGocadFile
already reads. Write coordinates with 16 significant digits instead of
the QTextStream default of 6, which truncates UTM coordinates.
2026-11-09 19:48:06 +01:00
Magne Sjaastad 25d7fccbf0 Fix use of deleted field editors in notifyFieldChanged
Updating the containing editor can delete field editors and remove them from m_editors while the set is iterated. Iterate a copy and skip editors that are no longer connected. Same fix in PdmUiItem::updateConnectedEditors().

Call stack:
[0] performCrashLogging at ResInsight/ApplicationExeCode/RiaMainTools.cpp:178
[1] manageSegFailureSA(int, siginfo_t*, void*) at ResInsight/ApplicationExeCode/RiaMainTools.cpp:310
[4] std::_Rb_tree_const_iterator<caf::PdmUiEditorHandle*>::operator++() at /opt/rh/gcc-toolset-13/root/usr/include/c++/13/bits/stl_tree.h:368
[5] caf::PdmFieldUiCap<caf::PdmField<std::vector<int, std::allocator<int> > > >::setValueFromUiEditor(QVariant const&, bool) at ResInsight/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmUiFieldCapability.inl:116
[6] caf::CmdFieldChangeExec::redo() at ResInsight/Fwk/AppFwk/cafCommand/cafCmdFieldChangeExec.cpp:139
[8] caf::CmdUiCommandSystemImpl::fieldChangedCommand(std::vector<caf::PdmFieldHandle*, std::allocator<caf::PdmFieldHandle*> > const&, QVariant const&) at ResInsight/Fwk/AppFwk/cafCommand/cafCmdUiCommandSystemImpl.cpp:146
[9] caf::PdmUiCommandSystemProxy::setUiValueToField(caf::PdmUiFieldHandle*, QVariant const&) at ResInsight/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiCommandSystemProxy.cpp:113
[10] caf::PdmUiTreeSelectionQModel::setData(QModelIndex const&, QVariant const&, int) at ResInsight/Fwk/AppFwk/cafUserInterface/cafPdmUiTreeSelectionQModel.cpp:538
[21] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1879
[27] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1879
[38] main at ResInsight/ApplicationExeCode/RiaMain.cpp:267
[39] __libc_start_main at :0

[0] performCrashLogging at ResInsight/ApplicationExeCode/RiaMainTools.cpp:178
[1] manageSegFailureSA(int, siginfo_t*, void*) at ResInsight/ApplicationExeCode/RiaMainTools.cpp:310
[4] caf::PdmUiFieldHandle::notifyFieldChanged(QVariant const&, QVariant const&) at ResInsight/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiFieldHandle.cpp:85
[5] caf::PdmFieldUiCap<caf::PdmPtrField<RimEclipseCase*> >::setValueFromUiEditor(QVariant const&, bool) at ResInsight/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafInternalPdmUiFieldCapability.inl:116
[6] caf::CmdFieldChangeExec::redo() at ResInsight/Fwk/AppFwk/cafCommand/cafCmdFieldChangeExec.cpp:139
[8] caf::CmdUiCommandSystemImpl::fieldChangedCommand(std::vector<caf::PdmFieldHandle*, std::allocator<caf::PdmFieldHandle*> > const&, QVariant const&) at ResInsight/Fwk/AppFwk/cafCommand/cafCmdUiCommandSystemImpl.cpp:146
[9] caf::PdmUiCommandSystemProxy::setUiValueToField(caf::PdmUiFieldHandle*, QVariant const&) at ResInsight/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmUiCommandSystemProxy.cpp:113
[10] caf::PdmUiComboBoxEditor::slotIndexActivated(int) at ResInsight/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp:455
[21] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1879
[27] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1879
[38] main at ResInsight/ApplicationExeCode/RiaMain.cpp:267
[39] __libc_start_main at :0
2026-11-09 10:22:43 +01:00
Magne Sjaastad 99d675b796 Fix crash when StimPlan file has no time steps
Time steps are not read when a file has more than one grid section. setDefaultsBasedOnFile() then indexed the empty time step list, and setDataAtTimeValue() wrote at index -1. Use index 0 and skip data for unknown time steps.

Call stack:
[0] performCrashLogging at ResInsight/ApplicationExeCode/RiaMainTools.cpp:178
[1] manageSegFailureSA(int, siginfo_t*, void*) at ResInsight/ApplicationExeCode/RiaMainTools.cpp:310
[3] RimStimPlanFractureTemplate::setDefaultsBasedOnFile() at ResInsight/ApplicationLibCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.cpp:116
[4] RicMeshFractureTemplateHelper<RimStimPlanFractureTemplate>::createNewTemplatesFromFiles(std::vector<QString, std::allocator<QString> > const&, QString const&, bool) at ResInsight/ApplicationLibCode/Commands/FractureCommands/RicMeshFractureTemplateHelper.inl:150
[5] RicMeshFractureTemplateHelper<RimStimPlanFractureTemplate>::createNewTemplates(QString const&, QString const&, QString const&, QString const&) at ResInsight/ApplicationLibCode/Commands/FractureCommands/RicMeshFractureTemplateHelper.inl:89
[6] RicNewStimPlanFractureTemplateFeature::createNewTemplates() at ResInsight/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.cpp:58
[7] RicNewStimPlanFractureTemplateFeature::onActionTriggered(bool) at ResInsight/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.cpp:78
[8] caf::CmdFeature::actionTriggered(bool) at ResInsight/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp:176
[17] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1879
[23] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1879
[35] RiuMainWindow::customMenuRequested(QPoint const&) at ResInsight/ApplicationLibCode/UserInterface/RiuMainWindow.cpp:2094
[43] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1879
[48] RiaGuiApplication::notify(QObject*, QEvent*) at ResInsight/ApplicationLibCode/Application/RiaGuiApplication.cpp:1879
[59] main at ResInsight/ApplicationExeCode/RiaMain.cpp:267
[60] __libc_start_main at :0
2026-11-09 10:22:43 +01:00
Magne Sjaastad 9a5de272ec #15130: Export SICD valves as WSEGSICD in MSW export
SICD valves fell through to the ICV path and were exported as WSEGVALV since the legacy MSW export path was removed. Handle SICD together with AICD and copy the template values into the WSEGSICD row through applySicdTemplateValues.
2026-11-06 18:46:46 +01:00
Kristian Bendiksen bc23681847 #15130 MSW: Export AICD phase density and viscosity exponents
WSEGAICD items 16-21 (A1-A3, B1-B3) were always exported as defaults since
the legacy MSW export path was removed. Copy all AICD template values into
the WSEGAICD row through a shared helper, applyAicdTemplateValues.
2026-11-06 18:46:46 +01:00
Magne Sjaastad 42d066d1cd #15129: Use along-well-path D-factor for azimuth fractures with perforation length
Azimuth fractures with a user-defined perforation length now use the along-well-path D-factor calculation (well radius from perforation length and 1.2 correction factor), consistent with the transmissibility calculation.
2026-11-06 15:37:58 +01:00
Magne Sjaastad b367a65062 #15110: Parallelize duplicate grid node removal
Insert nodes concurrently into a lock-free hash table keeping the lowest index per coordinate, then number unique nodes per fixed block, so the result is independent of thread count. Reduces removal time from 1.8 s to about 0.45 s for 78.4M nodes. Add a disabled performance test and docs/remove-duplicate-grid-nodes.md describing the algorithm.
2026-11-05 18:33:07 +01:00
Magne Sjaastad 7590a925d5 #15110: Add disabled performance test for importing a large synthetic grid 2026-11-05 18:33:07 +01:00
Magne Sjaastad 1e071247d8 #15110: Remove duplicate nodes from RigMainGrid node table
Merge identical nodes when grid geometry is finalized and remap cell corner indices. Partial shared node indices in the quad overlap calculation are now resolved geometrically, keeping fault and NNC geometry unchanged. Log the node count reduction with thousand grouping and the removed share of nodes.
2026-11-05 18:33:07 +01:00
Magne Sjaastad 11d8b926bb #15110: Add node table API to RigMainGrid
Encapsulate the node table of RigMainGrid behind nodes() and modifiableNodes() returning spans, allocateNodes() and clearNodes(). Readers and LGR builders fill the node table in place through allocateNodes() instead of building a temporary vector, which reduces peak import memory by about 1.6 GiB for a 9.8M cell grid. The radial grid conversion and map axes transform update nodes in place.
2026-11-05 18:33:07 +01:00
Kristian Bendiksen fc7d5c0594 #15008 Test that the added folder matches subCollectionClassKeyword()
The Python generator declares the add_folder() return type from
subCollectionClassKeyword(), while the folder is created by
createSubCollection(). Nothing tied the two together, so overriding only
one of them would give wrong type hints without any failing test.

ResInsight-tests: the folder added to a polygon collection, a surface
collection and an ensemble surface has the class named by
subCollectionClassKeyword(), and a polygon file declares and creates no
folder.
2026-11-05 14:40:52 +01:00
Stefan Crooijmans ece73a749c #15008 Python: Return the displayed folder name from collection_name()
collection_name() returned the stored m_collectionName, which is empty
for a RimPolygonFile or RimPolygonCloudAddress without a name. Both
classes fall back to the file name or a default ("Polygon File", "Sumo
Polygon Address") in name().

PdmNestedCollectionBase::displayName() is a virtual that defaults to
collectionName(); RimPolygonFile and RimPolygonCloudAddress override it
with name(), and CollectionNameInternal returns displayName().
collectionName() itself is unchanged, since findSubCollectionByName()
and the name conflict policy compare stored names.

ResInsight-tests: RimcNestedCollectionBase-Test covers a polygon
collection, a polygon file (default, base name, file name fallback) and
a cloud polygon address.
2026-11-05 08:50:36 +01:00
Stefan Crooijmans 6be8efb752 #15088 Well Log Extractor: Keep pairs in depth order and add pairing tests
A cell pair that encloses a pair already written is now discarded, as the
pairing did before this PR. Sorting the pairs by entering depth was the other
option, but it keeps both cells: the inner interval is still counted twice and
the depths still go back at the end of the outer cell. Discarding the outer
pair is a single comparison and gives the old result for nested cells.

The pairing is moved to the static pairCellEnterLeavePoints() so it can be
tested with synthetic point sequences, and the limit of 4 points between an
entering and a leaving point is a named constant with a note on why.
2026-11-05 08:46:45 +01:00
Stefan Crooijmans 577b4e770e #15088 Well Log Extractor: Use parametric tolerance for well path cell intersections 2026-11-05 08:46:45 +01:00
Magne Sjaastad a8805f1b9f Use QTimeZone::utc() for compatibility with Qt < 6.5 2026-11-05 07:45:12 +01:00
Magne Sjaastad acb2214446 #15114: Show gas-water capillary pressure in relperm viewer 2026-11-05 07:44:34 +01:00
Kristian Bendiksen ec59629930 #15094 Workflows: Add vertical graph layout option
Add a per-workflow Vertical Layout toggle to the workflow editor toolbar
and canvas context menu. In vertical mode ranks are stacked top to bottom,
task inputs sit on the top edge and outputs on the bottom edge, config
boxes are placed above their task and control edges run between the sides.
2026-11-04 17:26:39 +01:00
Magne Sjaastad 3e4c1e1e25 #15104: Add production network graph filtering and tree layout 2026-11-04 16:50:57 +01:00
Magne Sjaastad 3e5a98e4aa #15104: Bind production network nodes to summary vectors 2026-11-04 16:50:57 +01:00
Magne Sjaastad d4cbd49b9d #15104: Read production network trees from deck 2026-11-04 16:50:57 +01:00
Kristian Bendiksen add80526fa #14869 Workflow UI: Open nested workflows in tabs
Double-click a nested workflow task (or use Open Nested Workflow) to show
the inner workflow read-only in a tab of its own. The inner workflow is
described by the new taskmaestro_helper describe-nested command, for YAML
workflow entries and installed workflows. Workflows with workflow entries
now load.
2026-11-04 15:17:05 +01:00
Kristian Bendiksen 12bcd5b857 #15044 Workflows: Add option to collapse tasks to their title
Collapse a task with the chevron in its title, a double-click on the title, or
the context menus. A collapsed task shows its title, state and issue count, and
its connections meet in one dot on each side. Ports and config values are shown
in the tooltip. The collapsed set is stored per workflow.
2026-11-04 15:17:05 +01:00
Kristian Bendiksen b2b0e8e6f4 #14869 Workflows: Add option to hide tasks in the graph
Hidden tasks are removed from the canvas and the ports they feed are marked
with the hidden task name. Hidden tasks are shown again while they have failed
or have validation errors. The hidden set is stored per workflow.
2026-11-04 15:17:05 +01:00
JJ 7579569578 Batch Scheduler support update (#15077)
* Add batch job monitoring service, to be shared between monitor view and running jobs to minimize cluster polling traffic
* Add support for monitoring job status using batch monitor service
2026-10-30 19:08:35 +01:00
Kristian Bendiksen 8baad6f878 Workflow UI: Support collect flattening
Allow list and dict outputs, including mapped task outputs, to be
collected into list inputs, and dicts to be merged into dict inputs,
matching taskmaestro's collect flattening. Label flattened members in
the graph and document the rules.
2026-10-30 16:17:03 +01:00
Kristian Bendiksen bb0acbed56 Workflow UI: Support conditional branches
Support taskmaestro conditional branches in the workflow editor:
- Read and write `when` guards and `first_of` alternatives in workflow definitions
- Validate guards, switch branch coverage and alternative types
- Draw switch tasks as diamonds, guards as control edges and skipped tasks greyed out
- Edit guards with Run When..., add alternatives when dropping on a connected input
- Report skipped tasks from the run helper
2026-10-30 16:17:03 +01:00
Magne Sjaastad 93b85f9e52 #15078: Add I/J/K connection labels to well allocation plot
Add option to label connections by connection number, cell I/J/K, or both, and an option to show a tick label for every connection. Ticks on the connection number axis are placed at integer values only.
2026-10-30 15:45:41 +01:00
Magne Sjaastad ec9d022b50 Make summary table row ordering deterministic
Rows with equal first and last time step kept the incoming address order, which depends on string pool indices and varies between sessions. Break ties on category name.
2026-10-29 15:40:41 +01:00
Magne Sjaastad 07fa3a8326 #15061: Share filename outlier detection between import dialogs and add tests 2026-10-28 15:26:39 +01:00
Magne Sjaastad e8846e35b2 #15066: Recreate polygon in view targets when reading project file 2026-10-28 14:20:05 +01:00
Magne Sjaastad d1a47b8fdc #15049: Rework curve style rules and saved curve appearance 2026-10-27 14:13:13 +01:00
Magne Sjaastad 5e4496a1c7 Fix unity build name clashes in unit tests
Unity builds compile several test files in one translation unit, so
helpers with the same name in anonymous namespaces collided. Give the
helpers file-specific names:
- RimWorkflowDefinition-Test: taskByName -> definitionTaskByName
- RimSummaryCalculationCollection-Test: createFieldCalculation ->
  createCollectionFieldCalculation
- RigPorvSoilSgasResultCalculator-Test: MockCase/createMockCase ->
  PorvMockCase/createPorvMockCase
2026-10-27 10:05:02 +01:00
Magne Sjaastad a6c2b1b911 #15021: Add unit tests for completion export and non-Darcy D-factor 2026-10-24 20:30:43 +02:00
Kristian Bendiksen 917e8552df VTK GeoMech: read element nodal results without changing reader state
Look up POR and the tensor components with find(), and POR only for S.
Reading E on a model without node pressure no longer made S and the
derived results available. Use per-element node offsets instead of
assuming eight nodes per element, clear the element nodes when the parts
are read again, require the complete stress tensor for derived results,
and document the Biot coefficient of 1.
2026-10-24 13:59:38 +02:00
Kristian Bendiksen cdf4e0fa64 VTK: read only scalar point data arrays as node properties
Vector arrays such as "disp" are read by readDisplacements and were
parsed again only to be discarded by readNodalData.
2026-10-24 13:59:38 +02:00
Kristian Bendiksen 5fa48d6e60 VTK GeoMech: handle partial stress/strain tensor rows
List only the S_VTK/E_VTK components that have data, and require the
complete tensor for the derived S/E results. Guard against too few
values in the tensor rows. Add tests for strain and partial data.
2026-10-24 13:59:38 +02:00
hnilandClaude Opus 5.5 d7b3e60520 VTK GeoMech: pore pressure from node data, derived results
Read the VTK point data, not only "disp" (now found by name, not
position). "pressure" becomes the nodal pore pressure POR, other scalar
point arrays keep their name. OPM Flow writes them with
--vtk-write-geo-mech-nodal, recovered from its cell values.

Stress and strain are cell values in the simulator, so S and E at
element-nodal (and integration-point) position give every element corner
its cell's value. S is effective stress, tension positive, while OPM
writes total stress, compression positive: S = POR * I - stress at each
corner, so ST = -S + POR returns the simulator's stress exactly.

With S present, populateDerivedResultNames() returns true, so SE, ST,
principal stresses, SFI, DSM, FOS, NE etc. are available.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 13:59:38 +02:00
hnilandClaude Opus 5.5 03eff53507 VTK GeoMech: read stress/strain as the rows of a 3x3 tensor
OPM Flow writes each symmetric tensor as three cell arrays
"stress[0]", "stress[1]", "stress[2]", the rows (Si1, Si2, Si3). The
reader took "stress[0]" as (S11, S22, S33) and "stress[1]" as
(S12, S13, S23), so S22, S33 and S13 held the wrong components and
"stress[2]" was ignored. Read the upper triangle from the three rows.

Coordinates are imported with z negated; S13/S23 and E13/E23 now
change sign with it, as U3 already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:27:23 +02:00
Kristian Bendiksen e6dc62a160 Workflows: Add interactive editor for taskmaestro workflows
Build, copy and edit taskmaestro workflows in ResInsight and save them as
standard workflow.yaml + input.yaml.

- Python helper: catalog, load, save and export-registered subcommands,
  and run --registered for installed workflows
- C++ definition model with pure edit operations, port type checks,
  config field derivation, static validation and undo/redo
- Installed folder listing registered workflows (read-only, runnable,
  can be duplicated)
- Graph editor dock with task palette, drag-to-connect, context menus,
  automatic layout and debounced live validation
- New/Duplicate/Save/Save As/Rescan commands; unsaved edits run from a
  temporary folder and prompt before being discarded
- Update the design document and the user README
2026-10-23 20:23:54 +02:00
Kristian Bendiksen 9feace91ee Split NNC, aquifer and connection code out of RigSimulationInputTool (#15001)
Move EDITNNC, AQU* and COMPDAT/COMPSEGS processing into RigSimulationInput{Nnc,Aquifer,Connection}Tools, and move their tests into matching test files.
2026-10-23 12:32:17 +02:00
Magne Sjaastad 7ed51e1fd5 #14891: Add option to use a common legend across summary sub plots 2026-10-22 13:39:05 +02:00
Magne Sjaastad 7b580694ed #13430: Exclude zero values from ensemble statistics for derived vectors
Add m_includeZeroValues option to RimEnsembleStatistics (default on, preserving existing behavior). When disabled, exact zero values (e.g. from shut-in wells/groups) are excluded from the mean, P10/P50/P90 and custom percentile calculations in RimEnsembleStatisticsCase::calculate(). This is useful for derived vectors such as WCT, GOR and PI, where zeros caused by a shut well/group should not skew the statistical curves.

Exact equality (not an epsilon) is used, since shut-in values are reported as exact 0.0 by the simulator and non-accumulated vectors use STEP_RIGHT interpolation, which does not introduce floating-point noise.
2026-10-22 13:34:34 +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