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 authored and GitHub committed 2023-08-23 13:29:54 +02:00
1 parent 4b12f82583
commit bb293539d5
25 files changed
+203 -88

No files matched your search

@@ -26,6 +26,7 @@
#include "RicfCommandObject.h"
#include "RifOdbReader.h"
#include "RigFemAddressDefines.h"
#include "RigFemPart.h"
#include "RigFemPartCollection.h"
#include "RigFemPartGrid.h"
@@ -503,8 +504,8 @@ cvf::BoundingBox RimGeoMechCase::reservoirBoundingBox()
RigFemPart* femPart = rigCaseData->femParts()->part( p );
const RigFemPartGrid* femPartGrid = femPart->getOrCreateStructGrid();
RigFemResultAddress porBarAddr( RigFemResultPosEnum::RIG_ELEMENT_NODAL, "POR-Bar", "" );
const std::vector<float>& resultValues = rigCaseData->femPartResults()->resultValues( porBarAddr, p, 0, 0 );
const std::vector<float>& resultValues =
rigCaseData->femPartResults()->resultValues( RigFemAddressDefines::elementNodalPorBarAddress(), p, 0, 0 );
for ( int i = 0; i < femPart->elementCount(); ++i )
{