Commit Graph
160 Commits
Author SHA1 Message Date
Magne Sjaastad 1c4c304064 #14476 ApplicationLibCode: Remove unused cvf includes
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.
2026-08-07 15:05:57 +02:00
Magne Sjaastad 56e98ba1c4 #14476 ApplicationLibCode: Replace CVF_ASSERT with CAF_ASSERT
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.
2026-08-07 15:05:57 +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 2fa7520b3a Refactor: forward-declare element type in collection headers
Move the element-type include from each migrated collection header into
its .cpp, leaving only a forward declaration in the header. Follows the
pattern from 9e4d79159 for RimJobCollection, made possible by the
constructor-time PdmObject base check.
2026-05-11 13:42:13 +02:00
Kristian Bendiksen 5e880ffc26 Refactor: migrate fourteen more collections to caf::PdmObjectCollection<T>
Migrated to the templated base, preserving each collection's existing XML
field keyword for project-file backward compatibility:

- RimEnsembleFractureStatisticsCollection
- RimEclipseInputPropertyCollection
- RimPlotDataFilterCollection
- RimGeoMechContourMapViewCollection
- RimIntersectionResultsDefinitionCollection
- RimCustomObjectiveFunctionCollection
- RimStimPlanModelTemplateCollection
- RimEnsembleWellLogsCollection
- RimEclipseContourMapViewCollection
- RimSeismicViewCollection
- RimGridInfoCollection
- RimEclipseStatisticsCaseCollection
- RimWellIASettingsCollection
- RimVfpDataCollection

External callers that accessed the old public/named array fields directly
(RimEclipseInputPropertyCollection::inputProperties,
RimEclipseStatisticsCaseCollection::cases) now use addItem/items() from
the base. RimCustomObjectiveFunction.h replaced its include of the
collection header with a forward declaration to break the new include
cycle introduced by the migration.
2026-05-11 13:42:13 +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 a0dbbf6cb1 Remove deprecated size_t overloads from RigActiveCellInfo
Migrate all callers to use type-safe ReservoirCellIndex and
ActiveCellIndex wrappers, then remove the deprecated isActive(size_t),
cellResultIndex(size_t), and setCellResultIndex(size_t, size_t) methods.
2026-03-31 12:32:05 +02:00
Kristian Bendiksen 5921c44be0 #4529 Remove nextValidId fields and calculate on the fly
Remove cached next-valid-ID member variables and compute them on demand
by scanning existing objects, following the pattern already used by
RimUserDefinedCalculationCollection. This eliminates unnecessary state
and potential corruption risks.

Fixes #4529.
2026-03-30 17:03:06 +02: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 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
Magne Sjaastad 71b734efec #13651 Fix formation dip sign issue when fracture normal is rotated 180 deg
Rename calculateFormationDip to calculateAngleFromVertical to better reflect what the function computes. Add calculateFormationDipFromHorizontal which applies the -90 deg adjustment and std::abs, fixing the wrong sign when the fracture direction normal is flipped.
2026-02-24 13:46:15 +01:00
Magne Sjaastad dbe08064ce Refactor double editor config to use attribute map
Remove custom editor attribute classes and migrate all double field validation and formatting (range, decimals, number format) to the attribute map system. Refactor PdmUiDoubleValueEditor to read settings from the field's attributes and always display formatted values. Remove redundant defineEditorAttribute overrides. Add tests for pair<bool, double> field validation. Centralize and simplify double field UI configuration for improved maintainability.
2026-02-16 16:54:22 +01:00
Magne Sjaastad 9851afc621 #2070 AppFwk : Disable default IO for proxy fields
Proxy fields usually reads and transforms data from other sources, usually other Pdm fields. This commit disables IO for proxy fields in the constructor. If XML serialization is required, this must be set on the proxy field, like this

field.xmlCapability()->setIOWritable(true)
field.xmlCapability()->setIOReadable(true)
2026-01-19 16:10:14 +01:00
Magne Sjaastad cfd634e206 Updates PDM UI label positioning
Updates the way UI label positions are set for PDM fields.
2026-01-08 21:44:58 +01:00
Kristian Bendiksen d62a6017bf Refactor RimElasticPropertyScalingCollection. 2026-01-05 13:15:47 +01:00
JJ 569d4dfc93 Fix build for Qt6.10.1 and add Windows build for Qt 6.10 2025-11-28 12:36:56 +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
Magne Sjaastad 4135a743fe Release preparations
* Adds a bounds check on the node index to prevent accessing invalid memory locations.
This prevents potential crashes caused by out-of-bounds access when retrieving summary variable values.
* Updates warning message for incomplete deltas
* Plot based on a single realization from a file set ensemble is not restored correctly on project load
* Populate result addresses if no addresses are present
* Adds CNV_ (convergence) result name
* Avoid include of RiaResultNames.h in header file
2025-08-27 14:22:11 +02:00
Magne Sjaastad 37041ad0a6 clang-19-tidy and clang-19-format fixes 2025-05-19 14:31:30 +02:00
Magne Sjaastad d76f67f3fb Use subset of enums
Use setEnumSubset instead of calculateValueOptions
2025-02-10 17:22:25 +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
jonjenssen da683bed9e Move Rig well related things to subfolder and update include statements 2024-10-31 15:08:59 +01:00
magnesj fc2106edb0 Fixes by clang-tidy 2024-09-02 15:26:44 +02:00
Magne Sjaastad 33ffa10ec9 Janitor: Remove obsolete deleteChildren
Remove obsolete deleteChildren() in destructors. deleteChildren() is called in the destructor of PdmChildArrayField
2024-07-25 13:58:31 +02:00
Magne Sjaastad 337584025c Add convenience function to set number format to fixed with two decimals 2024-07-24 15:42:25 +02:00
Kristian Bendiksen be3d06c549 Refactor: improve api for views and oil fields. 2024-04-04 10:24:21 +02:00
Magne Sjaastad ce513be638 Remove all use of .uiCapability()->setUiTreeHidden( true ); 2024-02-05 10:15:36 +01:00
Magne Sjaastad 678a368361 Refactor LayoutOptions to improve readability
* Make it possible to use designated initializer list
- remove default constructor
- move static member to outer scope

* Add helper function to add field on same row
2023-11-10 14:48:56 +01:00
Kristian Bendiksen 8df4dd42eb Refactor: rename RimWellLogFile to RimWellLogLasFile 2023-10-02 16:04:53 +02:00
Kristian Bendiksen 8007831e27 StimPlanModel: Make useEqlNumForPressureInterpolation scriptable. 2023-09-20 14:09:15 +02:00
Kristian Bendiksen 290d03df6c StimPlanModel: Fix log level failing pressure interp. message. 2023-09-20 14:09:15 +02:00
Kristian Bendiksen ec6a13e1da StimPlanModel: Extrapolate pressure table to cover extraction range. 2023-09-20 14:09:15 +02:00
Kristian Bendiksen 0ca609fdac StimPlanModel: Use default overburden facies for pressure depletion. 2023-09-19 09:03:56 +02:00
Kristian Bendiksen 1e2f8fadef StimPlanModel: Fix bug in pressure interpolation. 2023-09-19 09:03:56 +02:00
Kristian Bendiksen a36100e4fb StimPlan: Change default for Facies Pressure Settings.
Now set to be active and fraction values to be 1.0 for all facies.
2023-09-11 12:34:48 +02:00
Kristian Bendiksen 9c7f8b6f86 StimPlan: Add python api for enabling pressure table. 2023-09-11 12:34:48 +02:00
Kristian Bendiksen 5bf2c2a89d #10367 Janitor: Remove unneccessary 'this' pointers 2023-08-07 13:38:27 +02:00
Kristian Bendiksen dd05380039 StimPlan Model: handle missing default facies in elastic property calculator. 2023-06-19 21:21:25 +02:00
Kristian Bendiksen 3bdb57d637 StimPlan Model: fix crash when model has been deleted. 2023-06-19 21:21:25 +02:00
Kristian Bendiksen a3efc16615 StimPlan Model: Provide default value for facies 2023-05-26 12:32:43 +02:00
Magne Sjaastad 0c90f67dcc Change API for PdmObjectHandle and PdmFieldHandle
* Refactor interface to PdmObjectHandle and PdmFieldHandle
Return objects instead of passing in structures as parameters

* Add nodiscard to several functions
* Remove redundant this->
* Rename to ptrReferencedObjectsByType
2023-05-12 21:41:34 +02:00
Magne Sjaastad 5ee764af48 Refactor result definition 2023-05-11 08:37:58 +02:00
Kristian Bendiksen 02ec71955b StimPlan Model: Improve logging for facies value/name mismatch. 2023-05-10 15:22:55 +02:00
Magne Sjaastad 6f6dc80bc6 Added more clang-tidy checks
Improved GitHub Action to run clang-format as part of clang-tidy

* Simplify clang-tidy workflow
* Added modernize-use-using, modernize-redundant-void-arg, readability-static-accessed-through-instance
* Add nolint for libecl typedefs
2023-04-14 14:07:45 +02:00
Magne Sjaastad 952e766c2f Update clang-format.yml (#10068)
* Update to clang-format-15
Removed two custom .clang-format files in subfolders of AppFwk

* Fixes by clang-format
2023-04-13 07:05:53 +02:00
Magne Sjaastad f8c5cf389f clang-format: Set column width to 140
* Set column width to 140
* Use c++20
* Remove redundant virtual
2023-02-26 10:48:40 +01:00
Kristian Bendiksen e7ec977c13 #9413 Perforation: avoid overwriting diameter set when appending perforation
Fixes #9413.
2022-12-02 14:29:54 +01:00
Magne Sjaastad 6a859e0860 Fix update issues related to fracture calculations
* Make sure property filter is updated when completion type is cleared
* Clear geometry cache in views to make sure geometry is recreated
* Calculate required input parameters to completion type calculations
* Recompute values when depth changes
2022-11-18 12:50:04 +01:00
Kristian Bendiksen 3a77d77689 #9363 StimPlan: Incorrect extraction size when changing extraction offsets from python 2022-10-24 07:47:09 +02:00
Kristian Bendiksen f7a2acc3cf StimPlanModel: avoid crashing on incomplete projects. 2022-10-24 07:47:09 +02:00