Commit Graph
85 Commits
Author SHA1 Message Date
Kristian Bendiksen 5ee62c61e1 #14128 Use KD-tree (nanoflann) for fault distance nearest-face search
computeFaultDistances faked a nearest-point query with cvf::BoundingBoxTree,
which only supports box overlap: it grew a cell-sized box until it overlapped a
fault face. For cells far from any fault this did many full tree traversals and
then brute-forced the distance to a large, over-collected candidate set, and the
answer was only approximate. This was slow on grids with ~10 million cells.

The metric is the distance from each cell center to the nearest fault face
center, which is exactly a nearest-point search. Replace the bounding-box tree
and the grow-the-box loop with a nanoflann KD-tree built over the fault face
centers and a single nearest-neighbor query per active cell. A zero-copy adaptor
reads the existing std::vector<cvf::Vec3d> directly. The OpenMP loop is retained
since nanoflann queries are read-only. The result is O(F log F) build plus
O(N log F) queries, the full grid-node array copy is gone, and distances are now
exact rather than approximate.

Add nanoflann as a vcpkg dependency, wired in like Clipper2 as an imported
target.

Refs: https://github.com/OPM/ResInsight/issues/14128
2026-06-08 21:39:08 +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 a4dad97024 #13425 Add time-dependent well events and schedule data generation
Implement timeline-based event system for managing temporal changes in
well completions, perforations, valves, and production controls.

Features:
- Event timeline container with date-based querying
- Six event types: PERF, VALVE, TUBING, WSTATE, WTYPE, WCONTROL
- Schedule keyword generation (DATES, COMPDAT, WELSEGS, WCONPROD, WCONINJE)
- Multi-well schedule generation support
- Python GRPC API for event management
- YAML configuration file support
- Comprehensive test suite

Implementation:
- New directory: ApplicationLibCode/ProjectDataModel/WellEvents/
- Event classes inherit from RimWellEvent base class
- RimWellEventTimeline integrated into RimWellPath
- RicScheduleDataGenerator for multi-well schedule export
- Python API: event_timeline(), add_perf_event(), add_valve_event(), etc.
- Tests verify all event types and YAML config parsing

#13425 Add date tracking to valves and diameter/roughness intervals

Add creation date fields to RimWellPathValve and RimDiameterRoughnessInterval
to support filtering objects by date during completion data export.

- Add m_useCustomStartDate and m_startDate fields
- Add enableCustomStartDate(), setCustomStartDate(), isActiveOnDate() methods
- Set creation dates when applying valve and tubing events in RimWellEventTimeline

#13425 Add date-based filtering for schedule data export

Add optional export date parameter to MSW data collection functions to filter
valves and perforations based on their creation dates during schedule export.

- Add exportDate parameter to collectWsegvalvData, collectWsegAicdData,
  collectWsegSicdData, and collectCompsegData functions
- Filter valves by checking isActiveOnDate() on the associated RimWellPathValve
- Add RimPerforationInterval reference to RicMswPerforation for date filtering
- Pass export date from RicScheduleDataGenerator through the extraction chain

This ensures segment numbers reflect the full model while only including
objects active on the export date in output keywords.

Add test to prove compsegs changes over time.

#13425 Fix mypy type checking errors in well_events.py

- Add type annotations to all function parameters
- Fix generic type hints (dict -> Dict[str, Any])
- Import Any type for proper type safety
- Add type: ignore for method reassignment
- All 31 tests pass

#13425 Add schedule-level keyword events for non-well-specific keywords

Add a new event type called "Keyword Event" for schedule-level Eclipse
keywords (RPTRST, GRUPTREE, RPTSCHED, etc.) that are NOT tied to a
specific well path. This complements the existing RimWellEventKeyword
which operates at the well level.

- Add RimKeywordEvent class inheriting from RimWellEvent with null wellPath
- Add SCHEDULE_KEYWORD enum value to EventType
- Add addKeywordEvent() method to RimWellEventTimeline
- Add AddKeywordEvent Python API method to RimcWellEventTimeline
- Update RicScheduleDataGenerator to output global keywords after well sections
- Add Python wrapper add_keyword_event() with type inference
- Add tests and examples for RPTRST, GRUPTREE keywords
2026-02-12 08:15:22 +01:00
Magne Sjaastad 93bd0b9c9d Refactor well log track settings into modular classes
* Refactor well log track settings into modular classes

Major refactoring of RimWellLogTrack to delegate property axis, formation, region annotation, and well path attribute settings to dedicated settings classes. Introduces RimWellLogPropertyAxisSettings, RimWellLogFormationSettings, RimWellLogRegionAnnotationSettings, and RimWellLogWellPathAttributeSettings, each encapsulating related fields, UI logic, and option handling. Old fields are retained for migration and backward compatibility. Updates enums and signatures for consistency.
2026-02-09 15:33:18 +01:00
Kristian BendiksenandMagne Sjaastad d80ada607f #11807 Upgrade to Clipper2
Replaces the deprecated Clipper library with the actively maintained Clipper2 library.

Removes the local copy of the Clipper library and uses vcpkg to manage the dependency.

Fixes #11807

Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2026-01-07 16:07:09 +01:00
Magne Sjaastad 7f0ef8dbc4 Simplifies OpenTelemetry integration
Removes conditional compilation for OpenTelemetry, ensuring it is always included.

Reinitializes OpenTelemetry based on user preferences, ensuring that changes to telemetry settings are applied immediately.

Configures cloud services, including OpenTelemetry, after the logger is initialized, ensuring that telemetry data is properly captured and transmitted.

Retrieves system username for telemetry tracking.
2025-12-22 16:41:29 +01:00
Magne Sjaastad 6c11e53f21 Adds OpenTelemetry integration
Adds support for OpenTelemetry to enable telemetry and crash reporting.

This change introduces:
- New RiaPreferencesOpenTelemetry class for managing OpenTelemetry configuration.
- RiaOpenTelemetryManager class for handling the OpenTelemetry lifecycle,
  event processing, and error handling.
- Configuration options in preferences to enable, disable, and configure
  OpenTelemetry.
- Asynchronous event reporting.
- Crash reporting capabilities.
- Health monitoring features.
2025-12-18 08:40:30 +01:00
Magne Sjaastad 544e9eedd9 Improve spell checker using codespell
* Configures automated spell checking with codespell
Adds GitHub workflows and configuration files for automated spell checking using `codespell`.

This includes:
- A workflow for checking pull requests and preventing new typos
- A workflow for automatically fixing typos in the main codebase
- Configuration files for `codespell` to ignore specific terms and file types
- Documentation on how to use and configure the spell checking workflows.

* Corrects minor spelling and grammar errors.
2025-11-19 10:25:32 +01:00
Kristian Bendiksen c47e8ac76f Refactor: move simulation file/input code to separate class. 2025-11-17 15:48:12 +01:00
Magne Sjaastad 8b9d6aa42c Adds support for MSW completion data
Introduces structures and classes to represent and manage data from MSW completion tables (WELSEGS, COMPSEGS, WSEGVALV, WSEGAICD).
2025-10-31 08:11:19 +01:00
Jon Jenssen ede8655660 CMake fixes for open vds enable flag, make sure definition is set in all sub-projects where needed 2025-08-26 17:01:07 +02:00
JJ 79c2c792f4 Add cmake configuration option to disable/enable openvds support (#12805)
* Add cmake configuration option to disable/enable openvds support
2025-08-21 08:31:10 +02:00
Kristian Bendiksen ade8e1d7e6 Remove QT_CHARTS dependency. 2025-07-30 13:39:02 +02:00
Magne Sjaastad 15ce1f75aa #12604 Add appearance settings for ensemble curve sets
Introduces customizable appearance settings for curve sets in RFT plots, including color, line style, and symbols.
2025-07-24 09:54:02 +02:00
Kristian Bendiksen 923a44d75e Add new and more general histogram plots. 2025-06-26 08:25:34 +02:00
Magne Sjaastad 21bd5730f5 Move warnings as errors config and use in geomech libs 2025-06-17 14:43:47 +02:00
JJ bda598dd37 Run Opm Flow jobs from ResInsight (#12580) 2025-06-11 15:43:53 +02:00
Magne Sjaastad 118ecf941a Performance improvements ensemble curves
* Do not create ensemble in initAfterRead
* Check if filter is active before update
* Do not recompute statistics on every loadData
* Removes unnecessary resampling
* MSVC: Add support for dynamic deoptimalization
* Make sure RFT plots are initialized based on curves in project file
* Make sure the progress dialog is always on top
* Add more progress info when loading project file
* Make sure names in RFT plots are updated
2025-05-28 15:10:43 +02:00
Magne Sjaastad 25346e6cfe Move RigSurface classes into Surface folder 2025-05-21 18:09:22 +02:00
Kristian Bendiksen 1a55fa11c3 #12459 Add regular surface domain object. 2025-05-20 20:39:07 +02:00
Magne Sjaastad 84f9ad0dcd First prototype on ensemble file set summary ensembles 2025-05-15 18:16:27 +02:00
Magne Sjaastad a958912378 Update opm-common
* Update opm-common
Include fix for tNavigator summary import
* Build opm-common from source
* Remove binary caching of opm-common
The caching is no longer required as a clean build takes minutes. In a previous version the build time was up to an hour on some systems.
2025-05-14 06:57:25 +02:00
Magne Sjaastad 3c7e8ee120 Refactors summary case creation into a tool class
Moves the summary case creation logic from the `RicImportSummaryCasesFeature` class to a new `RiaEnsembleImportTools` class.
2025-05-12 13:04:10 +02:00
magnesj 649e96b10b Fixes by cmake-format 2025-05-12 09:48:15 +02:00
Magne Sjaastad 2d536724bf Add custom search path for stdc++exp
On older Linux distributions, the `libstdc++exp.a` is not part of the package system. This requires a local build of this library. Add a configuration option `RESINSIGHT_GCC_STDCPP_EXP_PATH` to be able to link with this custom library.
2025-05-12 07:57:37 +02:00
Magne 57017a166c Add minimum requirements for CMake, gcc and clang
On Linux, link with stdc++exp
Define requirements in README
2025-05-09 15:54:28 +02:00
Kristian Bendiksen 1bc9925954 Add key value store class. 2025-05-07 12:07:31 +02:00
jonjenssen 8567841b87 Add support for mobile oil/gas/hc columns (#12129)
* Add support for calculating mobile oil/gas/hc columns in contour maps
2025-02-07 07:24:54 +01:00
jonjenssen cbab1b256f Support filtering by formation/polygon when calculating statistics (#12086)
* Support loading formation names when importing an ensemble
* Enable support for formation filtering when calculating contour map
* Add option to limit calculation area to a selection of polygons
2025-01-29 01:36:29 +01:00
Magne Sjaastad ca0179d118 Remove obsolete CMake statements
When using modern CMake and Qt6 we can remove obsolete source_group() and QT_MOC_HEADERS
2025-01-28 07:01:42 +01:00
Magne Sjaastad 3f08901379 Use updated opm-common
* Update opm-common submodule and use branch development https://github.com/CeetronSolutions/opm-common/tree/development

* Add cmake-format of ThirdParty/custom-opm-common/CMakeLists.txt

* Add boost-test

* Update generated files and simplify CMake configuration

Add -D_USE_MATH_DEFINES to CMake to avoid multiple local defines
Introduce flag CREATE_OPM_COMMON_KEYWORDS used to generate C++ files JSON files. This enables use also in MSVC. Remove obsolete direct include of source files.

* Update generated ESMRY test file

There was a invalid extra : postfix for some keywords like NEWTON and other N* keywords. When creating ESRMY using updated opm-common fix this issue.

* Update URL for custom-opm-common
2025-01-22 08:34:46 +01:00
jonjenssen 15428304be Change how sampling resolution is specified in statistics contourmap ui 2025-01-16 12:55:05 +01:00
jonjenssen da683bed9e Move Rig well related things to subfolder and update include statements 2024-10-31 15:08:59 +01:00
Magne Sjaastad 2814b92055 Qt6: Adjustments (#11804)
* Qt6: Avoid insertWidget, use addWidget
In Qt6, the insertWidget function checks if the index parameter is valid based on current widgets present in the layout. This is error prone, and use addWidget to avoid manual counting of index.

* Disable use of Qt keyword foreach

* Replace use of QRegExp with QRegularExpression
Replace use of QRegExp with QRegularExpression
Remove dependency on qt5compat module
Simplify an expression based on review

* Remove Qt5 ifdefs

* Guard access out of bounds seen in debug build

* Avoid reuse of string variable

* Disconnect all signals from the QOpenGLContext
The call stack when this assert happens indicates that there are more signals to be disconnected from the object. Crash is fixed by disconnecting all signals.

Assert seen in debug build:

ASSERT failure in caf::Viewer: "Called object is not of the correct type (class destructor may have already run)", file C:\Qt\6.6.3\msvc2019_64\include\QtCore/qobjectdefs_impl.h, line 130

* Fix issue related to delete of a linked view
Guard null pointer use in view linker. Remove complicated cleanup in destructor in Rim3dVew.
2024-10-28 13:09:18 +01:00
Magne Sjaastad df091336e0 Move summary tools into separate folder 2024-10-22 07:28:43 +02:00
Magne Sjaastad 4ff5aaf381 Add quick access data model objects 2024-10-21 14:11:22 +02:00
Magne Sjaastad 4719090b5f Define long names for summary vectors in JSON files 2024-10-14 08:53:28 +02:00
Magne Sjaastad ca4a7b9000 Remove obsolete code related to Qt5
* Remove bundling of openssl1.1
* Remove obsolete compile flags
* Remove use of obsolete RimCommandObject
* Use QColor::isValidColorName
QColor::isValidColor is deprecated in Qt 6.6, QColor::isValidColorName was introduced in 6.4

* Make sure debug DLLs are copied when required
* Remove Qt5 from AppFwk
* Remove obsolete copy of Qt  DLLs
2024-10-07 10:16:48 +02:00
212f5bf5ae Add support for Qt6 and disable Qt5
Required changes to use Qt6 and disable support for Qt5. There are still some adjustments related to Qt6 to be done, but these changes are not required to make Qt6 compile on relevant systems.

* Build system changes Qt6
* Override enterEvent
* Update QKeySequence
* QtChart changes
* Use QScreen to instepct dotsPerInch
* Add app->quit()
* Required updates for code related to QString
* Use RiaQDateTimeTools
* Required changes related to regular expressions
* Support compile on Qt  < 6.5
When version < 6.5 is found, qt_generate_deploy_app_script() is disabled. Compilation of ResInsight will work, but the install target will be incomplete.
* Octave: add missing header.
* Qt Advanced Docking: force Qt6 where both Qt5 and Qt6 is available.

---------

Co-authored-by: magnesj <1793152+magnesj@users.noreply.github.com>
Co-authored-by: Kristian Bendiksen <kristian.bendiksen@gmail.com>
2024-09-30 11:21:17 +02:00
Magne Sjaastad 31d653bce7 Add Sumo summary ensemble and summary case
Add feature to create ensemble from a sumo data source
2024-07-05 12:47:54 +02:00
Magne Sjaastad ffc1687cc7 Add Sumo connector and related cloud tools
* Add cloud data icon
* Add Sumo connector and related helper tools
* Reorganize preferences and remove ssihub
* Use timeout defined for Sumo
2024-07-05 09:31:16 +02:00
Kristian Bendiksen ea2bf3887f Osdu: exclude arrow files from unity build 2024-06-14 17:31:22 +02:00
Magne Sjaastad 1e07b239d1 Simplify configuration and use of vcpkg
* Simplify configuration and use of vcpkg
* Use 22.04
* Set and use BUILD_TYPE = Release
* Use -DVCPKG_BUILD_TYPE=release
2024-05-31 08:56:29 +02:00
Magne Sjaastad 1b93347aea Fix unity build 2024-05-24 15:19:43 +02:00
Kristian Bendiksen 577ef1e154 Add support for well paths from OSDU. 2024-05-24 15:19:43 +02:00
Magne Sjaastad a55b53c725 Add parsing of *.DATA and add zoom to VFP plots
Parse *.DATA and create VFP plots for all tables
Add zoom in VFP plots
2024-05-03 14:39:39 +02:00
Magne Sjaastad 4617bcc673 11402 Save copy of project file to a backup database when saving project file 2024-05-01 09:46:22 +02:00
Magne Sjaastad 5fdf30d124 Add polygon classes 2024-02-16 15:51:19 +01:00
jonjenssen 5391179e16 Add separate target for unit tests for easier test access. Remove unit tests from ResInsight application. (#11184)
Clean up cmake configuration a bit, and pull down gtest when needed, no longer use a thirdparty subfolder
Add a ResInsight-tests target to run the unit tests
2024-02-11 20:04:04 +01:00
jonjenssen 50a766591b Enable INP support without ODB libraries (#10990)
Enable INP support without ODB libraries
2024-01-03 11:55:35 +01:00