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.
This commit is contained in:
Magne Sjaastad committed 2026-04-14 14:56:43 +02:00
1 parent 1f0c47fb5f
commit fb6a0624c8
5 files changed
+34 -6

No files matched your search

@@ -191,6 +191,10 @@ bool RifVtkReader::readFemParts( RigFemPartCollection* femParts )
femPart->addElementSet( setName, elementSet );
}
// VTK coordinates are negated to match ResInsight internal convention (z positive downward),
// which flips the IJK directions. Invert all so IJK=0 is at the correct corner.
femPart->setInvertIJKInStructGrid( true );
femPart->setElementPartId( femParts->partCount() );
femParts->addFemPart( femPart );