Commit Graph
124 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
Kristian Bendiksen b274641e0c #14198 Exclude ResInsight-generated faults from default fault distance selection
When a new Fault Distance defaults to all faults, the ResInsight-generated
undefined grid faults were ticked by default. Add RimFaultInView::isGeneratedFault
and filter these faults out of the default selection in both the UI feature and
the Python command. An explicit fault selection is still honored.
2026-06-10 13:11:16 +02:00
Kristian Bendiksen 5b6658f099 #14198 Remove generated cell result entry when fault distance is deleted
When a fault distance object is deleted or renamed, the generated cell
result was only emptied via clearScalarResult, leaving its name in the
GENERATED result-variable dropdown. Follow the RimGridCalculation
deletion pattern: reset any view displaying the result to None and tag
the result entry as REMOVED so it disappears from the dropdown.
2026-06-10 13:11:16 +02:00
Magne Sjaastad 093ee4f765 Faults: Always show faults against inactive cells by default 2026-06-09 09:38:00 +02:00
Kristian Bendiksen a90e7bb26a #14101 Make Fault Distance objects deletable
Enable the standard tree Delete action on RimFaultDistance via
setDeletable( true ). On deletion, remove the generated FAULTDIST result
from the case in the destructor; the object is still attached to the
project tree while the destructor body runs, so the owner case is
reachable.
2026-06-08 21:42:19 +02:00
Kristian Bendiksen 6681ba566f #14101 Show case-level Data Analytics folder when first Fault Distance is created
The Data Analytics folder is built in RimEclipseCase::defineUiTreeOrdering and
is hidden while the fault distance collection is empty. Adding the first result
only refreshed the view (or the collection itself), not the case, so the case
tree ordering was never re-run and the folder stayed hidden until an unrelated
event rebuilt the tree.

Refresh the owner case from the collection whenever items change, mirroring the
RimDataFilterCollection precedent. onItemsChanged adds the folder when the first
result appears, and onChildDeleted removes it when the last result is deleted.
2026-06-08 21:42:19 +02:00
Kristian Bendiksen c2b4f83643 #14101 Rename RimFaultDistanceResult/Collection classes and files to RimFaultDistance/RimFaultDistanceCollection
Carries the "Fault Distance" rename through to the C++ class names, file
names, PDM/scriptable keywords and the Python API (add_fault_distance,
class FaultDistance). The RicNewFaultDistanceResultFeature command class
keeps its name.
2026-06-08 21:42:19 +02:00
Kristian Bendiksen e2d1591edf #14101 Add Generate button for Fault Distance and stop auto-recompute on selection change 2026-06-08 21:42:19 +02:00
Kristian Bendiksen 74c507a5fa #14101 Move Fault Distance to a case-level Data Analytics folder above the first view 2026-06-08 21:42:19 +02:00
Kristian Bendiksen 2fc99a8ecb #14101 Rename Fault Distance Result object and collection to "Fault Distance" 2026-06-08 21:42:19 +02:00
Kristian Bendiksen 187addb1d0 #13890 Faults: Provide FAULTDIST menu via appendMenuItems() 2026-06-01 11:28:46 +02:00
Kristian Bendiksen 31c1271034 #13890 Faults: Move fault distance results collection to the view
Reparent RimFaultDistanceResultCollection so it is owned directly by
RimEclipseView instead of RimFaultInViewCollection, and show it as a
top-level node next to the Faults node in the project tree.

RimFaultDistanceResult::calculateValueOptions now reaches the fault list
through the view (the fault collection is a sibling rather than an
ancestor after the move). RicNewFaultDistanceResultFeature resolves the
view from the selection and takes both the distance collection and the
all-faults fallback from it.

The scriptable API moves with the collection: add_fault_distance_result
is now exposed on RimEclipseView (view.add_fault_distance_result(...))
via the new RimcEclipseView, replacing RimcFaultInViewCollection.
2026-06-01 11:28:46 +02:00
Kristian Bendiksen b78ef0d0a1 #13890 Python: Add scriptable API for selected-fault FAULTDIST
Expose the new RimFaultDistanceResult facility to Python by marking the
relevant PDM classes and fields scriptable. RimEclipseView's
m_faultCollection, RimFaultInViewCollection, RimFaultInView,
RimFaultDistanceResult, and RimFaultDistanceResultCollection are now
scriptable, so faults can be enumerated from Python via
view.fault_collection().faults().

A new Rimc method add_fault_distance_result on RimFaultInViewCollection
takes a name and a list of fault objects, creates the result
(auto-numbered FAULTDIST<n> when the name is empty), and returns the
new RimFaultDistanceResult. An empty fault list falls back to every
fault in the view, matching the static-native FAULTDIST behaviour.

Add a Python test exercising both a subset call and a parity check
that asserts the all-faults result matches the existing static-native
FAULTDIST cell-for-cell.
2026-06-01 11:28:46 +02:00
Kristian Bendiksen b51dc28854 #13890 Faults: Add FAULTDIST result for a user-selected subset of faults
The existing FAULTDIST result always considered every fault in the main
grid. Users with many faults need to compute distance fields against a
named subset, so this adds a Fault Distance Results collection under
each view's Faults node. Each entry holds a multiselect of faults and a
name (FAULTDIST1, FAULTDIST2, ...) and publishes the result into the
Generated cell-result category.

The per-cell BVH-based distance loop was extracted from
RigFaultDistanceResultCalculator into a reusable utility that accepts
the subset of faults to include; the original all-faults entry point
delegates to the same utility and keeps the static-native FAULTDIST
behavior unchanged.
2026-06-01 11:28:46 +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
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
Magne Sjaastad 405a32e2da Removes QIntValidator and uses setRange
Replaces the usage of `QIntValidator` with the `setRange` function available in the PDM framework for limiting integer input in UI fields.
This approach provides a more direct and maintainable way to specify value ranges for UI elements.

This change simplifies the code and reduces dependencies.
2025-12-22 10:17:00 +01:00
Kristian Bendiksen da69eef72b #1584 Replace cvf::vec3d[8] with std::array<cvf::vec3d, 8> 2025-09-03 14:21:19 +02:00
Magne Sjaastad 37041ad0a6 clang-19-tidy and clang-19-format fixes 2025-05-19 14:31:30 +02:00
jonjenssen 5ff9b42c0d Fix: Set the folder browse flag for work dir browser button (#12195) 2025-03-03 07:17:31 +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
Magne Sjaastad bc9db44fe0 Use 1 as default size for fault mesh lines 2024-08-23 17:07:48 +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 ea17b1ec07 #11482 Add fault mesh line thickness option 2024-06-07 11:13:10 +02:00
Kristian Bendiksen 03e1d4e762 #11405 Fault reactivation: fix unexpected temperature change outside reservoir.
No change in temperature is expected outside of reservoir between
first (geostatic) and other time steps when exporting reactivation model.
I.e. the temperature gradient and "top of reservoir" temperature from the
geostatic step should be used on all time steps.

Fixes #11405.
2024-05-02 11:54:21 +02:00
Kristian Bendiksen c074033dc2 Refactor: Fix misspelling of "synchronize". 2024-04-05 13:55:09 +02:00
Jon Jenssen 406cd087e9 Use local coordinates in generated model by default 2024-03-05 11:47:16 +01:00
jonjenssen 86c33c1b46 Fault activation: node adjustments along fault (#11235)
Make sure same thickness vectors and fault lines are used for both parts.
2024-02-27 17:05:48 +01:00
jonjenssen 09151ec6af Use S5 for top, fault and base surfaces.
Add expansion material parameter (requires updated XML)
2024-02-24 02:53:14 +01:00
Jon Jenssen 5162ae467c Fix data access crash when no temp is available
Change element node order
2024-02-15 17:54:08 +01:00
Kristian Bendiksen d8b1e643e0 Fault Reactivation: Improve temperature data access.
New approach: find the top reservoir and compute gradient of temperature change
from sea bed. Values from Eclipse grid is used when in reservoir.
2024-02-14 15:16:47 +01:00
jonjenssen 0fd4ec6d0d Add option to flip node order for both parts
Use data node coordinates to decide element sets
2024-02-13 02:29:29 +01:00
Kristian Bendiksen 5a3894b804 Fault reactivation: Improve POR-Bar extraction. 2024-02-09 12:39:43 +01:00
Kristian Bendiksen 5037473f5c Fault Reactivation: Use computed pore pressure for over and underburden. 2024-02-09 12:39:43 +01:00
Magne Sjaastad ce513be638 Remove all use of .uiCapability()->setUiTreeHidden( true ); 2024-02-05 10:15:36 +01:00
Kristian Bendiksen e8e376ddb9 Fault reactivation: use values from Eclipse grid for stress.
No longer snapping to the fake well path along the border between the parts.
2024-02-02 08:22:05 +01:00
Kristian Bendiksen 89f90ee9a9 Fault reactivation: use values from GeoMech grid for stress.
No longer snapping to the fake well path along the border between the parts.
2024-02-02 08:22:05 +01:00
Kristian Bendiksen 9fea0853fd Fault reactivation: Fix temperature extraction. 2024-02-02 08:22:05 +01:00
jonjenssen 2c0ebfdbfe Add node set for fault zone boundary nodes 2024-01-27 00:38:48 +01:00
jonjenssen 2864ac7466 Extend reservoir element set to active cells in under/overburden
Fix fault extension if both sides start or end at same depth
2024-01-27 00:38:48 +01:00
jonjenssen cd0a56c924 Fault Reactivation: grid improvements (#11105)
Grid generator cleanup
2024-01-24 18:28:32 +01:00
jonjenssen 8831a8dcc7 Update stress source selection
Clean up UI a bit
2024-01-22 20:39:07 +01:00
magnesj f864ab0ba1 Fixes by clang-tidy 2024-01-20 08:39:07 +01:00
jonjenssen 251952e6ef Fault reactivation updates (#11079)
* Allow extending cell intersection lines outside cell
* Update default values, and clean up some things
* Populate fault zone element set
* Update to latest openzgy to fix typo
2024-01-19 08:39:10 +01:00
Kristian Bendiksen a48faeb6d0 #11034 Use water density from model. 2024-01-18 09:56:23 +01:00
Kristian Bendiksen 926a9ac850 Fault Reactivation: Export stress with negative sign.
Expected by Abaqus.
2024-01-18 09:56:23 +01:00
Kristian Bendiksen bd085617e4 #11034 Fault Reactivation: integrate vertical stress from eclipse grid. 2024-01-18 09:56:23 +01:00
Kristian Bendiksen defde0f4e4 Fault Reactivation: Add 'None' as GeoMech model option. 2024-01-18 09:56:23 +01:00