Additional refactoring for POR-Bar result handling

* Always use element-nodal for POR calculations
* Add RigFemAddressDefines
Add special handling for "POR-Bar" result, always use element_nodal

* 9362 Show unit text "sg" when normalized by hydrostatic pressure
This commit is contained in:
Magne Sjaastad
2023-08-23 13:29:54 +02:00
committed by GitHub
parent 4b12f82583
commit bb293539d5
25 changed files with 203 additions and 88 deletions

View File

@@ -18,6 +18,7 @@
#include "RigFemPartResultCalculatorBarConverted.h"
#include "RigFemAddressDefines.h"
#include "RigFemPart.h"
#include "RigFemPartCollection.h"
#include "RigFemPartResultsCollection.h"
@@ -63,9 +64,9 @@ bool RigFemPartResultCalculatorBarConverted::isMatching( const RigFemResultAddre
}
// TODO: split in multiple classes??
if ( m_fieldName == "POR-Bar" )
if ( m_fieldName == RigFemAddressDefines::porBar() )
{
return ( ( resVarAddr.fieldName == "POR-Bar" ) && ( resVarAddr.resultPosType == RIG_NODAL ) &&
return ( ( resVarAddr.fieldName == RigFemAddressDefines::porBar() ) && ( resVarAddr.resultPosType == RIG_NODAL ) &&
!( resVarAddr.componentName == "X" || resVarAddr.componentName == "Y" || resVarAddr.componentName == "Z" ) );
}
else