WBS-plot: Add optional support for maximum curve interval for UCS parameter curve (#10118)

* WBS-plot: Add optional support for maximum curve interval for UCS parameter curve
* GeoMech: Guard out-of-bound access to Pore pressure data
This commit is contained in:
Magne Sjaastad
2023-04-19 07:16:13 +02:00
committed by GitHub
parent b7f8d0e0f1
commit d4f11e0f8f
5 changed files with 44 additions and 7 deletions

View File

@@ -105,14 +105,17 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorNormalST::calculate( int par
{
for ( int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx )
{
size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
const size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
const int nodeIdx = femPart->nodeIdxFromElementNodeResultIdx( elmNodResIdx );
float por = 0.0f;
if ( nodeIdx < srcPORFrameData.size() )
{
por = srcPORFrameData[nodeIdx];
if ( por == inf ) por = 0.0f;
}
if ( elmNodResIdx < srcSFrameData.size() )
{
int nodeIdx = femPart->nodeIdxFromElementNodeResultIdx( elmNodResIdx );
float por = srcPORFrameData[nodeIdx];
if ( por == inf ) por = 0.0f;
// ST = SE_abacus + porePressure
// porePressure is POR-Bar.
double SE_abacus = -srcSFrameData[elmNodResIdx];