Guard zero-length keywords in ecl_kw_max_min, increase grdecl buffer to 256 and bound sscanf widths, and validate dimensions and keyword sizes (COORD, ZCORN, MAPAXES, CORSNUM, ACTNUM) when loading GRDECL grids.
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.