Add NULL stream guards in fortio_ftell and fortio_fseek__ to prevent SIGSEGV when fortio->stream is NULL during ecl_file_scan. This mirrors
the defensive fix applied to ESmry::loadData for UNSMRY files.
Update custom-opm-common submodule with guards against crashes in ESmry::loadData(vectList) when ensemble summary files are incomplete or inaccessible during project load.
evaluate() and expandIfStatementsAndEvaluate() now return std::expected<void, QString>: the error message is always part of the return value rather than an optional out-parameter, making it impossible for callers to silently discard errors.
Update RimGridCalculation and RimSummaryCalculation to use evaluateResult.error() instead of a separate errorText variable.
When aggregating functions (min, max, sum, avg) are applied to a single vector variable, they compute a scalar result over the whole vector. These must be pre-computed before the element-wise for loop, otherwise the variable gets replaced with its indexed version (e.g. min(b) -> min(b[i])) which changes the semantics: min(b[i]) returns b[i], not min of all b.
Add check for pattern: c := agg_func(if(condition, true_expr, false_expr)). Computes a scalar aggregate of the element-wise if-result and assigns it as a constant to all elements of c.
* Add support for custom validation callbacks on fields
Introduce setCustomValidationCallback to PdmFieldHandle, allowing custom validation logic via user-provided lambdas or functions. The validate() method now invokes this callback if set, in addition to built-in checks. Includes comprehensive unit tests for custom and combined validation scenarios. Backward compatible: default behavior unchanged if no callback is set.
The RMS well parser now correctly handles well names containing spaces.
Previously, ReadNext<std::string>() stopped at the first whitespace,
causing parsing failures. The fix reads line 3 as a whole and parses
coordinates from the end, treating remaining tokens as the well name.
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>
Use improved opm-common reader with less throws.
Add reload selected cases button
Add timer for auto-reload of cases
Add include in auto update option for cases and ensembles
Do not enable auto reload option for cases in an ensemble
* Deletes the copy of the code in ThirdPary folder
* Replace code with opm-flowdiagnostics-applications as submodule
* Refactors ECL data handling for flow diagnostics
Updates flow diagnostics to utilize ECL init data consistently.
This change streamlines the passing and usage of initialization
data within the flow diagnostics routines, enhancing code
clarity and maintainability. Removes redundant passing of grid
data, simplifying function signatures.
Documents the procedure for updating the generated C++ code for Eclipse keywords from JSON definition files in the opm-common library.
This procedure is necessary when updating to a newer version of opm-common, when new keywords are added, or when existing keyword definitions change.
The function `well_state_add_MSW2` in `well_state.cpp` would allocate
an `ecl_rsthead_type` object but would not free it in the case where
the `RSEG_KW` keyword was not found in the restart file view.
This would lead to a memory leak.
This commit fixes the issue by freeing the allocated object before
returning from the function in the error case.
The file in question had a "empty" line with CR/LF line ending at
the end of the file.
When reading this on linux (using getline) you get a non-empty string
containing the CR token. For these cases GetRecord returns true
with a empty record vector, and this expected in the calling code.
Crash happens when accessing the first (non-existing) element of the
empty vector when trying to provide error message.
Fixed by having GetRecord return false when vector is empty.
Fixes#12654.
* Add surfio as submodule and create importer with tests
* Update compile fix when mio.h is included in multiple compile units
* Move file tools into RifFileTools
* 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.
Avoid pixel size for easier config across multiple environments
Set default font size for plots to 10 points
Use Small instead of XSmall for default font in plot
Remove pt postfix to indicate point size
The cache on GitHub is limited to 10 GB. Recent versions of vcpkg includes debug symbols in Windows release builds, and creates really huge binary libraries.
To make sure the binaries fit into the cache, the debug symbols are removed from both debug and release builds.
* 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
* Update vcpkg to 2024.02.14 Release
A blank install of vcpkg did not work anymore due to changes in upstream repos. Had to update vcpkg.exe to latest to ensure download of libraries works as expected.
Had to update baseline to 2024.02.14 to be able to compile on VS 17.12. A bug related to naming of boost was fixed in boost 1.84
https://github.com/microsoft/vcpkg/issues/38980
* Bump to a more recent vcpkg due to a build error in arrow
https://github.com/apache/arrow/issues/42027
* Avoid fmt 11 due to a bug for MSVC
https://github.com/gabime/spdlog/issues/3251#issue-2648376977
* Remove obsolete GRPC config in top-level CMake
* Avoid pinning of Protobuf