mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7293 Wrong unit in legend for stress directions and stress anisotropy
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "RigFemPartCollection.h"
|
||||
#include "RigFemPartGrid.h"
|
||||
#include "RigFemPartResultCalculatorStressAnisotropy.h"
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
#include "RigFemResultAddress.h"
|
||||
#include "RigFormationNames.h"
|
||||
@@ -819,9 +820,22 @@ QString RimGeoMechResultDefinition::resultVariableName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimGeoMechResultDefinition::currentResultUnits() const
|
||||
{
|
||||
RigFemResultAddress rigFemResultAddress = this->resultAddress();
|
||||
|
||||
if ( RigFemPartResultCalculatorStressAnisotropy::isAnisotropyResult( rigFemResultAddress ) )
|
||||
{
|
||||
return RiaWellLogUnitTools<double>::noUnitString();
|
||||
}
|
||||
|
||||
if ( this->resultFieldName() == "SE" || this->resultFieldName() == "ST" || this->resultFieldName() == "POR-Bar" ||
|
||||
this->resultFieldName() == "SM" || this->resultFieldName() == "SEM" || this->resultFieldName() == "Q" )
|
||||
{
|
||||
auto componentName = this->resultComponentName();
|
||||
if ( componentName.endsWith( "azi" ) || componentName.endsWith( "inc" ) )
|
||||
{
|
||||
return "Deg";
|
||||
}
|
||||
|
||||
return "Bar";
|
||||
}
|
||||
else if ( this->resultFieldName() == "MODULUS" )
|
||||
|
||||
Reference in New Issue
Block a user