Commit Graph
26 Commits
Author SHA1 Message Date
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 87518f2f2f #14365 Nested hybrid grid: import as a reconstructed LGR hierarchy 2026-07-27 15:24:25 +02:00
Kristian Bendiksen 816aef2f2c Grid: Add utility method for cell index from VecIjk0. 2026-01-12 09:58:55 +01:00
Magne Sjaastad a28dfa29af Compute correct minimum IJ cell size
Fix bug introduced in 5c48383d71
2025-11-25 12:41:33 +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
Kristian Bendiksen 38c691d9a4 Refactor: Update usage of caf::VecIjk. 2025-11-14 14:44:21 +01:00
Kristian Bendiksen 5c48383d71 Refactor: Improve interface for characteristicCellSize() 2025-10-06 09:10:58 +02:00
Magne Sjaastad 6b7d93e2da Refactor import of radial grid
* Add radial display mode to preferences
* Adds isRadial to grid
* Improve mesh lines for radial cells
For temporary radial LGRs, show mesh outline based on the aggregated geometry of all LGRs of the parent cell clicked on.
* Improve warning message
* Modify cell selection in pick event handler
2025-09-29 11:46:28 +02:00
Jon Jenssen 4c0d4b3d1d Support generating border result based on current visibility 2025-09-19 15:22:17 +02:00
Kristian Bendiksen 5133ae620b Refactor: simplify API for configuring cell counts in IJK.
The old API was based on "grid points", but it was always used to
specify number of cells in each direction.
2025-09-18 11:46:57 +02:00
Kristian Bendiksen 10182e99a7 Refactor: Change RigGridBase::cellCornerVertices to return std::array
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.
2025-09-03 14:21:19 +02: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 860588d755 #12008 Improve display of curves from selected cells in 3D view
* 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
2025-02-14 09:35:28 +01:00
Magne Sjaastad 26a30ffa50 Make sure fault geometry always is visible
The check for fault was removed in 4cf6a26083

This causes wrong visualization when a range filter is active and a fault is present along the filter.

There is some performance issues seen when profiling this code, needs more investigation.
2024-11-27 12:29:12 +01:00
Magne Sjaastad 4cf6a26083 Improve draw performance for active cell grid
* Show timing for geoBuilder.generateSurface()
* Check state of element vector result before geometry is created

* Improve performance for isFaceVisible
Avoid calling costly function cell() when possible
Remove check on fault geometry as this does not affect the visualization

* Performance: Avoid traversal of all cells when computing visibility
When we have an active cell grid, we can skip checking for inactive and invalid state.
Use the list of active grid cells when looping through cells.
2024-11-03 13:38:03 +01:00
Jon Jenssen 8a2a1c218b Some performance updates 2024-10-29 18:17:31 +01:00
jonjenssen f21d1545f8 Some cleanup 2024-10-29 18:17:31 +01:00
jonjenssen 88118ee4e1 Privatize grid cell array 2024-10-29 18:17:31 +01:00
jonjenssen 0572069511 Support for loading only active cell geometry (#11624)
* Only load active cells for main grid, skip LGRs for now
* Handle wells with inactive cells
* Validate mapaxes transform before using it.
* Add log message
* Additional guarding when trying to find the geometrical location of a simulation cell
* Add extra safeguarding for init/restart file access in opm common. Only support unified restart files.
2024-08-28 18:22:57 +02:00
Magne Sjaastad a090992f5a Refactor use of grid dimensions 2024-01-22 14:52:49 +01:00
Magne Sjaastad 833a0e8584 Performance: Cellcount functions are used in many loops, and must be as fast as possible
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.
2024-01-22 14:52:49 +01:00
Magne Sjaastad 9e65eb3be9 Add helper functions to convert from cellIndex to cafVecIjk 2023-11-13 11:08:36 +01:00
Kristian Bendiksen 5bf2c2a89d #10367 Janitor: Remove unneccessary 'this' pointers 2023-08-07 13:38:27 +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 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
Gaute Lindkvist 81699db187 Rename ApplicationCode to ApplicationLibCode 2021-01-11 15:27:45 +01:00