- Remove unused SOURCE_GROUP_HEADER_FILES from GrpcInterface CMakeLists
- Scope the following defines to the files that need it ENABLE_GRPC, USE_ODB_API , USE_OPENVDS, USE_HDF5
- RifOdbReader.cpp copied an odb_InstanceRepository by value, which
fails to compile under MSVC's strict conformance mode due to an
ambiguous implicit copy constructor in the vendor headers (diamond
inheritance). Use a reference instead, since it was only ever read
from.
* Skip deleted plot widgets in RiuMultiPlotBook::visiblePlotWidgets
* Guard missing calculation in detectCyclicCalculation
* Guard invalid node index in RigFemPart node lookups
* Guard null well path in RimWellLogExtractionCurve::extractGeomData
* Guard unopened case in RimGridCalculation::removeDependentObjects
* Guard empty subset in createLateralAtMeasuredDepth
Remove 95 cvf include lines that the including file does not use. Found by
extracting the symbols declared by every VizFwk header, including symbols they
re-export, and flagging includes where none of those symbols appear anywhere in
the file. Each removal is verified by a full build.
Most of them are cvfVector3.h and cvfObject.h, left behind as the files they
were once needed by changed.
pch.h is left untouched. It includes cvfObject.h and cvfVector3.h on purpose, so
that the files using the precompiled header do not have to.
Note that a clean build after removing an include does not prove the include was
unnecessary, only that the declarations still arrive some other way. That path
can differ between platforms and with RESINSIGHT_ENABLE_UNITY_BUILD, so this
needs a CI round on Linux as well.
Migrate all assert macros in ApplicationLibCode to CAF_ASSERT and remove every
use of cvfAssert.h.
CVF_ASSERT is replaced one to one. CVF_TIGHT_ASSERT is also replaced by
CAF_ASSERT, which is semantically exact: CVF_ENABLE_TIGHT_ASSERTS is 1 only
under _DEBUG, and that is what CAF_ASSERT now does. The two CVF_FAIL_MSG sites
become CAF_ASSERT( false && "message" ), preserving the message with the idiom
already used elsewhere in the code base.
Counts before and after: CVF_ASSERT 1044 to 0, CVF_TIGHT_ASSERT 66 to 0,
CVF_FAIL_MSG 2 to 0, cvfAssert.h references 154 to 0.
Include handling: files that included cvfAssert.h directly now include
cafAssert.h instead, includes left dead by the migration are removed, and files
that were relying on cvfAssert.h transitively get an explicit cafAssert.h. Files
that reach cafAssert.h through another caf header are left unchanged; a missing
include here is a compile error, not a silently disabled assert.
ResultStatisticsCache links only LibCore and therefore had no path to
cafAssert.h. Add the cafPdmCore directory as a private include path rather than
linking the library, since cafAssert.h is header only.
Note that this stops these asserts from firing in Release and RelWithDebInfo,
where CVF_ASSERT was previously active.
cvfAssert.h tests CVF_ENABLE_ASSERTS but did not include cvfConfigCore.h, which
is where that macro gets its default value of 1. A translation unit processing
cvfAssert.h before cvfConfigCore.h evaluated the undefined identifier as 0 and
silently compiled every CVF_ASSERT, CVF_ASSERT_MSG and CVF_FAIL_MSG in that unit
into a no-op, without any warning and without evaluating the expressions.
Because the header uses pragma once, including cvfConfigCore.h later in the same
unit did not recover the macros. Alphabetical include sorting actively produces
the broken order, since cvfAssert.h sorts before cvfBase.h.
Include cvfConfigCore.h before the macro definitions. It only defines macros, has
pragma once and no dependencies, so this is immune to future include reordering.
This turns the asserts back on in the affected translation units, in both debug
and release builds, and immediately exposed one assert that had never compiled:
in RigFemPartResultCalculatorNormalized::calculate, isNormalizableResult was
called unqualified even though it is a static member of
RigFemPartResultsCollection. Qualify it, matching isMatching in the same file.
RigCaseCellResultsData and RigFemPartResultsCollection held a raw pointer to RigFormationNames owned by a unique_ptr in RimFormationNames. Reloading or deleting the formation names left the case data with a dangling pointer. Store a copy instead, as RigFormationNames is a small value type with no identity.
stepListIndexToTimeStepAndDataFrameIndex only guarded against negative indices, relying on a CVF_ASSERT for the upper bound. That assert is compiled out in release builds, so when a GeoMech case has no steps loaded (empty m_stepList) the clamped current time step of 0 caused an out-of-bounds read of m_stepList[0]. Extend the early-return guard to also cover indices past the end, returning the existing (stepIndex, -1) sentinel.
* 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
Use field name constants S_VTK/E_VTK with a shared separator constant to
derive internal storage keys, filter them from the flat result list, and
expose them as folders with S11-S23 / E11-E23 sub-items in the UI.
Move points and connectivity reading inside the isFirst guard to avoid redundant parsing on subsequent timesteps. Move displacements reading outside the guard so they are read for every timestep, and update the log message accordingly.
VTK coordinates are negated (z positive downward) to match ResInsight
internal convention, which flips the IJK directions relative to what the
structured grid algorithm expects. Add invertIJK flag to RigFemPartGrid
and RigFemPart so the inversion is applied during struct grid construction.
- Rename RifColorLegendData to RifFormationNamesReader to better reflect the
class purpose of reading formation names from .lyr files.
- Remove inheritance of cvf::Object
- Improve const correctness
Replaced all references to RiaStatisticsTools with RigStatisticsTools across the codebase, including header includes, static method calls, and test files. Updated CMake configuration to remove RiaStatisticsTools and add RigStatisticsTools. Renamed and updated related unit tests. No changes to logic or algorithms; this is a namespace and organizational refactor for consistency. Also added ApplicationLibCode include directories as PRIVATE to relevant targets.
* 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.
Refactored RigGridBase::cellCornerVertices to return std::array<cvf::Vec3d, 8> by value instead of taking a reference to std::array as an output parameter. This change improves code readability and leverages modern C++ return value optimizations.
Updated all call sites across the codebase to reflect the new function signature.
* Remove obsolete base class
* Add conversion between one/zero-based IJK
* Move code to RiaTextStringTools
* Add automatic update of grid cell curves when clicking in 3D view
* Fix missing conversion to QString
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
cellCountIJK was computed based on the value of griPointDimensions. These converstion turned up during profiling. Change implementation to have cellcount as a member variable instead of being computed every time.
Use correct result name for Void ratio
Enable porosity calculator for imported inp data
Add model validation check for export/show model
Fix last res. layer not being splitted into subelements
Add model validation check in file exporter
Bump version to dev.04
Support reading element type results
Automatically load properties from INP include files generated by Fault Reactivation Model exporter
Some refactoring of element and result types.