mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user