Commit Graph
679 Commits
Author SHA1 Message Date
Jon Jenssen 967975828c Use global event handler for tracking active plot window 2026-06-17 13:55:32 +02:00
jonjenssen ff4a54121f Clean up main window ids 2026-06-17 13:55:32 +02:00
jonjenssen 797d9ac2db Work in progress 2026-06-17 13:55:32 +02:00
Jon Jenssen 7fd55a0b91 Active view tracking for 3d window 2026-06-17 13:55:32 +02:00
jonjenssen ff40662366 Work in progress 2026-06-17 13:55:32 +02:00
Jon Jenssen d2d7c6ac61 First non-MDI version. Still some missing links and features. 2026-06-17 13:55:32 +02:00
Magne Sjaastad 0a33c49020 Block re-entrant progress event processing in notify 2026-06-11 16:29:04 +02:00
Magne Sjaastad a1c4b06237 #14150 Fix crash in replaceTemplateTextWithValues with data-derived values
The template name resolution built a regular expression per key and used
QString::replace(QRegularExpression, value) to insert the value. When a value
inserted by one key contained an invalid UTF-16 sequence (e.g. a lone
surrogate from a data-derived case or well name), a subsequent key's global
match ran the regex engine over the malformed subject, causing an
out-of-bounds read and a segmentation fault inside PCRE2.

Replace the regex based substitution with a literal indexOf/replace loop that
preserves the existing word-boundary behavior, so values are never fed through
the regex engine. Empty keys are skipped.
2026-06-08 16:02:02 +02:00
Kristian Bendiksen 5e2156fca1 #14127 Add static Completion Type result for grid-only cases
The Completion Type result was registered only as a dynamic result, which
requires simulation time steps. Loading only grid geometry (e.g. a ROFF grid)
therefore made the result unavailable, since there are no time steps to compute
it for.

Register and compute a STATIC_NATIVE variant of Completion Type in addition to
the existing DYNAMIC_NATIVE one, computed as a single time-step-independent
frame. The shared per-frame computation is factored out of
computeCompletionTypeForTimeStep so both variants reuse it. The virtual
perforation transmissibilities already handle the no-restart case by clamping to
a single frame, so the static result can be computed at calc time step 0.

The legend/category predicates and the completion-type result clearing are
broadened to recognise the static variant so it renders with the same discrete
named-category legend as the dynamic one.
2026-06-08 15:35:31 +02:00
Magne Sjaastad 8606fa002e #14104 Remember user-defined size of property and preferences dialogs
Persist the geometry of PdmUiPropertyViewDialog and RiuPropertyViewTabWidget to the application settings on close and restore it on the next show. Restoring is done in showEvent rather than the constructor so it is applied reliably for a modal dialog. The settings key includes the bound object class keyword so distinct dialogs that share a window title do not collide.

This behaviour is gated behind a new "Remember Dialog Size" experimental feature, disabled by default. PdmUiPropertyViewDialog cannot access RiaPreferencesSystem, so the application pushes the current setting via the static enableGeometryPersistence(), following the existing pattern used for class-name display. RiuPropertyViewTabWidget queries the feature directly.
2026-06-04 21:06:38 +02:00
Kristian Bendiksen 80e7d64332 #14099 Move export dock layout action back to developer features
Revert 380b471. The 'Export Layout to Clipboard' window menu action is a developer-only utility, not an experimental feature. Gate it behind RiaApplication::enableDevelopmentFeatures() again and drop the 'export-dock-layout' experimental feature registration.
2026-06-03 14:04:27 +02:00
Kristian Bendiksen c1ea8261aa #14081 Move experimental feature selection to its own Preferences tab
Promote the experimental feature checkboxes out of the development-only System tab into a dedicated, always-visible Experimental tab so end users can opt into experimental features without enabling development features.

The m_enabledFeatures field stays owned by RiaPreferencesSystem, so its keyword, value options and legacy-keyword migration are unchanged.
2026-06-01 16:41:00 +02:00
Kristian Bendiksen 054dbdb255 Move oil volume result to experimental features and demote ROFF logs to debug
Gate the derived oil volume cell result behind the new 'oil-volume-result'
experimental feature instead of RiaApplication::enableDevelopmentFeatures().

In the ROFF file reader, drop the enableDevelopmentFeatures() gates around the
grid dimension, timing and array diagnostics and log them at debug level instead,
so the output is available without RESINSIGHT_DEVEL but stays quiet in normal
runs.
2026-06-01 16:41:00 +02:00
Kristian Bendiksen 380b471bb5 Move export dock layout action to experimental features
Gate the 'Export Layout to Clipboard' window menu action behind the experimental
features registry instead of RiaApplication::enableDevelopmentFeatures(). Register
the 'export-dock-layout' feature and drop the now-unused RiaApplication include.
2026-06-01 16:41:00 +02:00
Kristian Bendiksen a0e502f75e Move OSDU well logs and undo/redo view to experimental features
Gate the OSDU well log import menu item and the command undo/redo history view
behind the discoverable experimental features registry instead of
RiaApplication::enableDevelopmentFeatures(), so they can be toggled from
Preferences -> System without setting the RESINSIGHT_DEVEL environment variable.

Register the 'osdu-well-logs' and 'undo-redo-view' features in
RiaExperimentalFeatures and gate the code paths via
RiaPreferencesSystem::isFeatureEnabled().
2026-06-01 16:41:00 +02:00
Kristian Bendiksen 5434873984 #14081 Register experimental features and show them as checkboxes
Replace the free-text experimental-feature keyword box with a discoverable
registry and a checkbox list in Preferences -> System.

Add RiaExperimentalFeatures as a single, discoverable list of available
experimental features (keyword, display name, description). RiaPreferencesSystem
now stores the enabled features in a tree-selection (checkbox) field populated
from this registry, and isFeatureEnabled() checks that selection. The legacy
semicolon-separated keyword string is migrated in initAfterRead(), preserving
existing preference files and the 'enable-all' keyword.
2026-06-01 16:41:00 +02:00
Magne Sjaastad 022d77bef8 macOS: Initial Apple Silicon and x86_64 build support
* Refactor: add MACOSX_BUNDLE option to qt_add_executable in multiple CMakeLists.txt files
* #14045 macOS: Guard std::stacktrace usage and skip ucontext on Apple platforms
* #14045 macOS: Guard std::ispanstream with std::istringstream fallback
* #14045 macOS: Add vcpkg overlay triplets for osx and exclude grpc on osx
* #14045 macOS: CMake macOS build support and openzgy OpenMP-disable patch
* #14045 CI: Add macOS build workflow
* #14045 macOS: Use feature-test macros to detect <stacktrace> and <spanstream>
* #14045 macOS: Make MAX_STIMPLAN_LAYERS constexpr to fix arm64 link error
* #14045 CI: Ship README-macOS.txt with artifact to document Gatekeeper workaround
* #14045 CI: Pin macOS runner to macos-14 and set deployment target to 14.0
* #14045 CI: Move macOS runner to macos-15 and fix README step on configure failure
2026-06-01 12:38:55 +02:00
Magne Sjaastad 2cd036c988 #14054 Telemetry: Store SHA-256 hash of username instead of cleartext, send user.hash on crash reports 2026-05-26 15:59:24 +02:00
Magne Sjaastad 071d6cc19e #14050 CMake: Remove dead variable definitions and references
* CMake: Remove dead CODE_HEADER_FILES variable
* CMake: Remove dead COMMAND_CODE_HEADER_FILES and COMMAND_MOC_SOURCE_FILES
* CMake: Remove dead MOC_SOURCE_FILES and FORM_FILES_CPP references
* CMake: Remove dead HEADER_FILES reference
* CMake: Delete unused CustomPCH.cmake superseded by target_precompile_headers
2026-05-26 13:10:20 +02:00
Kristian Bendiksen e21a32a180 #14001 Python: Use AppEnum fields for property_data_type arguments
Replace QString + setFromText parsing with typed
caf::PdmField<caf::AppEnum<...>> for m_propertyType and m_porosityModel
on RimcEclipseCase_propertyDataType. The script keywords stay
"PropertyType" / "PorosityModel" so the Python parameter names are
unchanged (property_type, porosity_model), and the auto-generated
StrEnum classes are now PropertyType and PorosityModelType (typed
annotations on the call site).

Register caf::AppEnum<RiaDefines::PorosityModelType> -> "PorosityModelType"
alongside the existing ResultCatType override so PorosityModelType's
auto-generated class name is stable regardless of which field the
generator visits first.

executeEnum() drops the setFromText parsing and the "Invalid property
type / porosity model" branches — the values now flow through typed
already, so an invalid enum text cannot reach the method body.
2026-05-26 08:23:28 +02:00
Kristian Bendiksen 01ceb57323 #14001 Python: Drop hand-written PropertyType, use auto-generated PropertyType
Consolidate the hand-written PropertyType / NNCPropertyType enums in
enums.py into the auto-generated StrEnum classes that already exist in
generated_classes.py. enums.py and all its imports are removed.

The auto-generated class for caf::AppEnum<RiaDefines::ResultCatType>
was named "ResultType" because the existing scriptable m_resultType
fields used keyword "ResultType". Switch those fields to
CAF_PDM_InitScriptableFieldWithScriptKeywordNoDefault, keeping the XML
keyword "ResultType" (so project files still load) but exposing the
script keyword as "PropertyType". The generator now emits a single
PropertyType StrEnum that:

- matches the proto PropertyType for setters (FLOAT/INTEGER aside, the
  members callers actually use are identical),
- gains ALLAN_DIAGRAMS that the C++ side already knew about,
- loses the proto-only REMOVED/UNDEFINED sentinels (unused in any
  Python caller).

rips.NNCPropertyType was exported but unreferenced anywhere — dropped.

Updated Python callers:
- rips.ResultType.X -> rips.PropertyType.X across examples and tests.
- result_type= kwarg / .result_type attribute -> property_type /
  .property_type (the script keyword change renamed those everywhere
  the affected PdmObject fields are accessed from Python).
- view.apply_cell_result's hand-written wrapper now takes property_type
  instead of result_type and forwards via cell_result.property_type.

All 271 Python tests pass, ruff and clang-format clean.
2026-05-26 08:23:28 +02:00
Jørgen Herje 291fb48b10 Adjust elastic search 2026-05-21 16:06:56 +02:00
Magne Sjaastad 5691333c61 MSW Export: Add preference for improved MSW data structures and rename extraction methods 2026-05-21 10:12:49 +02:00
Jørgen Herje 182ea91e2e Fix cloud auth and sumo connection (#14026)
Ensure configured cloud services before RiaCloudConnector is constructed
2026-05-21 08:10:37 +02:00
Kristian Bendiksen 5ffcb69acc #13126 RiaLogging: Use std::string_view instead of QString for logging 2026-05-08 10:11:09 +02:00
Kristian Bendiksen 4957bf5a8b #13126 RiaLogging: Take std::string_view for logElapsedTime message
Switch the message parameter from const QString& to std::string_view so
callers with std::string in hand no longer need a QString::fromStdString
wrapper. The internal duration formatting still uses QString::arg, fed
from a single QString::fromUtf8 conversion.

Callers passing QString locals are updated with .toStdString() at the
call site.
2026-05-08 10:11:09 +02:00
Kristian Bendiksen bb0afbf962 #13126 RiaLogging: Extract errorInMessageBox to RiuMessageDialog
Move the QMessageBox-displaying helper out of the logging utility into a
dedicated UI class. RiaLogging.h no longer pulls QMessageBox/QWidget into
the ~270 files that include it. Behavior is preserved: showError displays
the dialog when running interactively (and not under regression tests),
then forwards the text to RiaLogging::error.
2026-05-08 10:11:09 +02:00
Kristian Bendiksen eb39583a7c Apply clang-format to .pvd loading changes 2026-05-04 16:03:23 +02:00
Vegard Kippe 4fdb301695 Ensure .pvd files are loaded when cases are opened from history or command line 2026-05-04 15:18:02 +02:00
JJ f1923333af Job improvements (#13895)
* Add job wait/queued state
* Add support for limiting number of jobs running
* Add job queue for jobs waiting to run
2026-04-17 19:55:50 +02:00
Magne Sjaastad ab97381d94 Add ADL-based field traits, migrate all call sites, remove cafInternalPdmValueFieldSpecializations.h
Introduce cafPdmFieldTraits.h with ADL-based pdmToVariant/pdmFromVariant/pdmVariantEqual
as a replacement for PdmValueFieldSpecialization. Migrate all types (AppEnum, FilePath,
PdmPointer, cvf types) and all call sites (PdmDataValueField, PdmProxyValueField, UI
framework, ApplicationLibCode). Delete cafInternalPdmValueFieldSpecializations.h.
Add cafPdmFieldTraits unit tests and fix std::optional support.
2026-04-08 12:37:36 +02:00
Kristian Bendiksen 394bc6c3df #12489 Improve robustness of mean calculators
Replace asserts with early-return guards so zero or negative weights
are silently skipped instead of crashing. Add unit tests for zero-weight
and zero-value edge cases in all three calculator classes.

Fixes #12489.
2026-03-31 08:46:20 +02:00
Kristian Bendiksen 06f985b1ed #12957 Sector Model Export: add non-uniform cell refinement
Add a new "Non-Uniform" refinement mode that coexists with the existing
uniform refinement. Users can specify a cell range, direction, and
fractional subdivision widths to create variable-resolution grids.

Core infrastructure:
- RigNonUniformRefinement: per-dimension refinement with cumulative
  fractions and offset tables for O(1)/O(log n) lookups
- RiaCellDividingTools: non-uniform createHexCornerCoords overload
- RigGridExportAdapter: non-uniform constructor, mapping, and
  coordinate transformation overloads

Pipeline integration:
- RigSimulationInputSettings: non-uniform refinement storage
- RigSimulationInputTool: non-uniform paths for grid construction,
  data cropping, BOX context, well keywords, and WELLDIMS
- RifEclipseInputFileTools: non-uniform extractKeywordData overload

UI:
- RicExportSectorModelUi: Uniform/Non-Uniform mode selector with
  direction, cell range, and fractional widths fields
2026-03-30 11:24:56 +02:00
Magne Sjaastad 8df24c5bd3 Crash: use SA_SIGINFO on Linux for enhanced crash diagnostics
Switch signal handler registration from signal() to sigaction(SA_SIGINFO)
on Linux to capture fault address, signal code description, and program
counter at crash time. These are logged to the file logger and included
in OpenTelemetry crash reports.
2026-03-23 10:30:14 +01:00
Magne Sjaastad 04ca172893 PdmObjectHandle: Add createDerivedObjectsRecursively() lifecycle hook
Add createDerivedObjectsRecursively() which traverses the object tree using
direct recursion and calls the virtual createDerivedObjects() on each node.
Called between the two resolveReferencesRecursively() passes in RiaApplication,
allowing objects to create child objects based on already-resolved ptr fields.
The second resolve pass then handles references in the newly created children.
2026-03-19 15:10:26 +01:00
Magne Sjaastad bd7f7cd7e3 EnsembleImport: Add recent files support, file pattern field, and UX improvements
- Store imported ensemble root directory in recently used files list
- Auto-reimport from recent files without dialog using persisted parameters
- Add file pattern field to filter filenames within matched folders
- Gray out and untick create-grid/summary checkboxes when no files of that type are found
- Disable OK button when both checkboxes are unticked
- Show all ensembles collapsed when multiple are detected
- Default-select only the first ensemble when multiple are detected
2026-03-19 15:10:26 +01:00
Magne Sjaastad 6ff75e3700 SummaryMultiPlot: Improve sub-plot stepping and duplicate plot handling 2026-03-18 13:54:06 +01:00
Magne Sjaastad 83f667cdf8 Replace RimTools::wellPathCollection() with RimWellPathCollection::instance()
Remove the redundant wrapper function and update all call sites to use RimWellPathCollection::instance() directly.
Remove unused #include "RimTools.h" from files using RimWellPathCollection::instance() directly
2026-03-18 13:41:27 +01:00
Magne Sjaastad f12c9f74a6 Remove redundant explicit delete of parented QObjects in RiaApplication
m_osduConnector and m_sumoConnector are created with RiuMainWindow as
parent, so Qt deletes them when the main window is destroyed. The
explicit delete calls were no-ops (QPointer was already null) but
misleading.
2026-03-17 14:03:11 +01:00
Magne Sjaastad 4dd0068605 RicHelpAboutFeature: Display active gRPC port in About dialog
Retrieve the active gRPC port number from the application instance and display it within the version information section of the About dialog.
2026-03-13 15:30:22 +01:00
Magne Sjaastad 5d65057d6f RiuRecentFileActionProvider: Track last used project file via recent file list
Remove lastUsedProjectFileName from RiaPreferences and store it via the
existing recentFileList QSettings key. loadProject and saveProjectAs now
call addToRecentFiles instead of writing to preferences. A new static
method lastUsedProjectFileName() on RiuRecentFileActionProvider returns
the most recent .rsp entry from the list.
2026-03-11 12:46:43 +01:00
Magne Sjaastad ef7943feaa RiaRegressionTestRunner: Support hierarchical preference configuration
Update the preference lookup to search upward up to three levels from the test directory, allowing for shared configuration in nested folder structures. Also, ensure each test runs from a consistent baseline by saving the initial state once and restoring it after every test execution.
2026-03-11 12:46:43 +01:00
Magne Sjaastad 1fdd493bfb #13728 Telemetry: Include OS info for all events
Add OS info (os.type, os.version, os.name) to all non-crash events in
reportEventAsync. Consolidate OS info and hashUsername into an anonymous
namespace with a shared addOsInfo helper function.
2026-03-11 12:46:32 +01:00
Magne Sjaastad c13eed4544 RiaOpenTelemetryManager: Ensure crash reports are sent before exit
- Track pending network replies using an atomic counter
- Pump the event loop in `reportCrash` to allow asynchronous telemetry requests to complete before the process terminates
- Use a timeout to prevent the crash handler from hanging indefinitely if the network is unresponsive
2026-03-09 15:34:39 +01:00
kriben a85b49f86f Fixes by clang-format 2026-03-06 12:32:05 +01:00
Kristian Bendiksen 079372ea85 #13484 Auto-import PVD surfaces for command line and replace case
Extract auto-import logic into public static method
importPvdSurfacesForGridFiles() and call it from:
- Command line case loading (--case argument)
- Replace case menu action
2026-03-06 12:32:05 +01:00
Magne Sjaastad c354819e5a RigActiveCellInfo: Fix debug build error in setCellResultIndex 2026-03-04 11:27:51 +01:00
Magne Sjaastad 50009ac4d2 Use cafPdmUiButton instead of bool PdmField in multiple classes
Replace PdmField<bool> push button pattern with addNewButton() lambdas
in RiaPreferences, RiaPreferencesSummary, RicUserDefinedCalculatorUi,
RimUserDefinedPolylinesAnnotation, RimPolygonFilter, RimFractureTemplate,
RimEllipseFractureTemplate, RimMeshFractureTemplate, and
RicSummaryPlotEditorWidgetCreator.
2026-03-04 09:52:17 +01:00
Magne Sjaastad 9f30c981bc Remove unused cafPdmUiPushButtonEditor.h includes
Follow-up cleanup after switching from bool PdmField push buttons to cafPdmUiButton.
2026-03-04 09:52:17 +01:00
magnesj 530b8c8a1a Fixes by clang-tidy 2026-03-04 03:42:23 +00:00