mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
#3284 Mohr's Circle: fix off-by-one in IJK display
Use caf::VecIjk0 in MohrsCirclesInfo and convert to VecIjk1 for display, matching the 1-based indexing used in the 3D view. Fixes #3284.
This commit is contained in:
1 parent
fd85ebf3b9
commit
2374301385
2 files changed
+16
-12
No files matched your search
@@ -233,11 +233,12 @@ void RiuMohrsCirclePlot::addOrUpdateMohrCircleCurves( const MohrsCirclesInfo& mo
|
||||
QString textBuilder;
|
||||
textBuilder.append( QString( "<b>FOS</b>: %1, " ).arg( QString::number( mohrsCirclesInfo.factorOfSafety, 'f', 2 ) ) );
|
||||
|
||||
auto ijk1 = mohrsCirclesInfo.ijk.toOneBased();
|
||||
textBuilder.append( QString( "<b>Element Id</b>: %1, <b>ijk</b>[%2, %3, %4]," )
|
||||
.arg( mohrsCirclesInfo.elmId )
|
||||
.arg( mohrsCirclesInfo.i )
|
||||
.arg( mohrsCirclesInfo.j )
|
||||
.arg( mohrsCirclesInfo.k ) );
|
||||
.arg( ijk1.x() )
|
||||
.arg( ijk1.y() )
|
||||
.arg( ijk1.z() ) );
|
||||
|
||||
textBuilder.append( QString( "<b>σ<sub>1</sub></b>: %1, " ).arg( principals[0] ) );
|
||||
textBuilder.append( QString( "<b>σ<sub>2</sub></b>: %1, " ).arg( principals[1] ) );
|
||||
@@ -408,8 +409,14 @@ bool RiuMohrsCirclePlot::addOrUpdateCurves( const RimGeoMechResultDefinition* ge
|
||||
{
|
||||
int elmId = femPart->elmId( elmIndex );
|
||||
|
||||
MohrsCirclesInfo
|
||||
mohrsCircle( principals, gridIndex, elmIndex, elmId, i, j, k, geomResDef, calculateFOS( principals, frictionAngleDeg, cohesion ), color );
|
||||
MohrsCirclesInfo mohrsCircle( principals,
|
||||
gridIndex,
|
||||
elmIndex,
|
||||
elmId,
|
||||
caf::VecIjk0( i, j, k ),
|
||||
geomResDef,
|
||||
calculateFOS( principals, frictionAngleDeg, cohesion ),
|
||||
color );
|
||||
|
||||
m_mohrsCiclesInfos.push_back( mohrsCircle );
|
||||
|
||||
|
||||
Reference in new issue
Block a user