Merge branch 'main' into dev

This commit is contained in:
Magne Sjaastad
2024-04-25 09:34:11 +02:00
12 changed files with 125 additions and 40 deletions

View File

@@ -1617,11 +1617,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig
size_t scalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T ) return cvf::UNDEFINED_SIZE_T;
if ( type == RiaDefines::ResultCatType::GENERATED )
{
return cvf::UNDEFINED_SIZE_T;
}
if ( type == RiaDefines::ResultCatType::GENERATED ) return scalarResultIndex;
if ( m_readerInterface.notNull() )
{

View File

@@ -737,6 +737,28 @@ std::vector<RigFlowDiagSolverInterface::RelPermCurve> RigFlowDiagSolverInterface
return retCurveArr;
}
// For unknown reasons, the ECLSaturationFunc returns a KROG curve when there is no gas in the system.
// Remove invalid KROG curve if no KRG curve is present
// https://github.com/OPM/ResInsight/issues/11396
bool hasKRG = false;
for ( const RelPermCurve& curve : retCurveArr )
{
if ( curve.ident == RelPermCurve::KRG )
{
hasKRG = true;
break;
}
}
if ( !hasKRG )
{
retCurveArr.erase( std::remove_if( retCurveArr.begin(),
retCurveArr.end(),
[]( const RelPermCurve& curve ) { return curve.ident == RelPermCurve::KROG; } ),
retCurveArr.end() );
}
return retCurveArr;
}