Commit Graph
10 Commits
Author SHA1 Message Date
hnilandClaude Opus 5.5 03eff53507 VTK GeoMech: read stress/strain as the rows of a 3x3 tensor
OPM Flow writes each symmetric tensor as three cell arrays
"stress[0]", "stress[1]", "stress[2]", the rows (Si1, Si2, Si3). The
reader took "stress[0]" as (S11, S22, S33) and "stress[1]" as
(S12, S13, S23), so S22, S33 and S13 held the wrong components and
"stress[2]" was ignored. Read the upper triangle from the three rows.

Coordinates are imported with z negated; S13/S23 and E13/E23 now
change sign with it, as U3 already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:27:23 +02:00
Magne Sjaastad ab96c520bd #14895: Improve stability when importing malformed input files
* #14895: Fix null grid dereference when importing mismatching GRDECL
* #14895: Fix out-of-bounds read in perforation interval import
* #14895: Validate connectivity indices in VTK import
* #14895: Fix heap overflow for odd PORV count in dual porosity cases
* #14895: Update roffcpp to validate array lengths when parsing ROFF files
2026-10-12 09:40:23 +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 5ffcb69acc #13126 RiaLogging: Use std::string_view instead of QString for logging 2026-05-08 10:11:09 +02:00
Magne Sjaastad c5af814ba1 #12572 VTK: Display stress/strain as folder with component sub-items
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.
2026-04-16 17:09:43 +02:00
Magne Sjaastad e3d5b05125 VTK: Read geometry only on first timestep, log displacements per timestep
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.
2026-04-14 14:56:43 +02:00
Magne Sjaastad fb6a0624c8 VTK: Invert IJK indices to match ResInsight convention
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.
2026-04-14 14:56:43 +02:00
Magne Sjaastad 1f0c47fb5f VTK: Add displacement field U with components U1/U2/U3 in RifVtkReader 2026-04-14 14:56:43 +02:00
Magne Sjaastad c204593f08 Fix type conversion issues 2025-06-17 14:43:47 +02:00
Kristian Bendiksen fe9cac4fba #12414 GeoMech: import geomech data from VTK. 2025-05-30 08:38:51 +02:00