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

@@ -32,6 +32,7 @@
#include "RimRegularLegendConfig.h"
#include "RimTernaryLegendConfig.h"
#include "RigFemAddressDefines.h"
#include "RigFemPartCollection.h"
#include "RigFemPartResultsCollection.h"
#include "RigFemResultAddress.h"
@@ -223,12 +224,8 @@ void RivIntersectionResultsColoringTools::updateGeoMechCellResultColors( const R
cvf::Part* intersectionFacesPart,
cvf::Vec2fArray* intersectionFacesTextureCoords )
{
RigGeoMechCaseData* caseData = nullptr;
RigFemResultAddress resVarAddress;
{
caseData = geomResultDef->ownerCaseData();
resVarAddress = geomResultDef->resultAddress();
}
RigGeoMechCaseData* caseData = geomResultDef->ownerCaseData();
RigFemResultAddress resVarAddress = RigFemAddressDefines::getResultLookupAddress( geomResultDef->resultAddress() );
if ( !caseData ) return;
@@ -291,12 +288,6 @@ void RivIntersectionResultsColoringTools::updateGeoMechCellResultColors( const R
}
else
{
// Do a "Hack" to show elm nodal and not nodal POR results
if ( resVarAddress.resultPosType == RIG_NODAL && resVarAddress.fieldName == "POR-Bar" )
{
resVarAddress.resultPosType = RIG_ELEMENT_NODAL;
}
bool isElementNodalResult = !( resVarAddress.resultPosType == RIG_NODAL );
if ( caseData->femPartResults()->partCount() == 1 )