mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#9507 Fix normalize by Hydrostatic Pressure for pore pressure
This commit is contained in:
parent
3030e9f4af
commit
1b886c1a1e
@ -52,6 +52,16 @@ RigFemPartResultCalculatorBarConverted::~RigFemPartResultCalculatorBarConverted(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigFemPartResultCalculatorBarConverted::isMatching( const RigFemResultAddress& resVarAddr ) const
|
||||
{
|
||||
if ( resVarAddr.normalizeByHydrostaticPressure() )
|
||||
{
|
||||
// Normalize by hydrostatic pressure is done in RigFemPartResultCalculatorNormalized
|
||||
// Return false here to avoid double normalization
|
||||
//
|
||||
// https: // github.com/OPM/ResInsight/issues/9507
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: split in multiple classes??
|
||||
if ( m_fieldName == "POR-Bar" )
|
||||
{
|
||||
|
@ -115,7 +115,7 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorNormalized::calculate( int p
|
||||
size_t resultCount = srcFrameData.size();
|
||||
dstFrameData.resize( resultCount );
|
||||
|
||||
if ( unscaledResult.resultPosType == RIG_ELEMENT_NODAL )
|
||||
if ( unscaledResult.resultPosType == RIG_ELEMENT_NODAL || unscaledResult.resultPosType == RIG_NODAL )
|
||||
{
|
||||
#pragma omp parallel for schedule( dynamic )
|
||||
for ( int elmIdx = 0; elmIdx < femPart->elementCount(); ++elmIdx )
|
||||
|
@ -850,7 +850,10 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult( i
|
||||
{
|
||||
for ( const auto& calculator : m_resultCalculators )
|
||||
{
|
||||
if ( calculator->isMatching( resVarAddr ) ) return calculator->calculate( partIndex, resVarAddr );
|
||||
if ( calculator->isMatching( resVarAddr ) )
|
||||
{
|
||||
return calculator->calculate( partIndex, resVarAddr );
|
||||
}
|
||||
}
|
||||
|
||||
if ( resVarAddr.fieldName == "ST" && resVarAddr.componentName.empty() )
|
||||
|
Loading…
Reference in New Issue
Block a user