mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-20 11:48:35 -06:00
#5470 Add GUI for GeoMech normalization
This commit is contained in:
parent
ada9507b8a
commit
91a7a94dda
@ -99,6 +99,15 @@ RimGeoMechResultDefinition::RimGeoMechResultDefinition( void )
|
||||
m_resultVariableUiField.uiCapability()->setUiEditorTypeName( caf::PdmUiListEditor::uiEditorTypeName() );
|
||||
m_resultVariableUiField.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
|
||||
CAF_PDM_InitField( &m_normalizeByHydrostaticPressure,
|
||||
"NormalizeByHSP",
|
||||
false,
|
||||
"Normalize by Hydrostatic Pressure",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
CAF_PDM_InitField( &m_normalizationRkbDiff, "NormalizationRkbDiff", -1.0, "Air Gap", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_compactionRefLayerUiField,
|
||||
"CompactionRefLayerUi",
|
||||
RigFemResultAddress::noCompactionValue(),
|
||||
@ -138,6 +147,13 @@ void RimGeoMechResultDefinition::defineUiOrdering( QString uiConfigName, caf::Pd
|
||||
}
|
||||
m_resultVariableUiField.uiCapability()->setUiName( valueLabel );
|
||||
|
||||
if ( normalizableResultSelected() )
|
||||
{
|
||||
caf::PdmUiGroup* normalizationGroup = uiOrdering.addNewGroup( "Result Normalization" );
|
||||
normalizationGroup->add( &m_normalizeByHydrostaticPressure );
|
||||
normalizationGroup->add( &m_normalizationRkbDiff );
|
||||
}
|
||||
|
||||
if ( m_resultPositionTypeUiField() != RIG_FORMATION_NAMES )
|
||||
{
|
||||
caf::PdmUiGroup* timeLapseGr = uiOrdering.addNewGroup( "Difference Options" );
|
||||
@ -733,6 +749,25 @@ QString RimGeoMechResultDefinition::convertToUiResultFieldName( QString resultFi
|
||||
return newName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimGeoMechResultDefinition::normalizableResultSelected() const
|
||||
{
|
||||
if ( m_resultPositionType == RIG_NODAL )
|
||||
{
|
||||
return m_resultFieldName == "POR-Bar";
|
||||
}
|
||||
else if ( m_resultPositionType == RIG_ELEMENT_NODAL && ( m_resultFieldName == "ST" || m_resultFieldName == "SE" ) )
|
||||
{
|
||||
static const std::set<QString> validComponents =
|
||||
{"S11", "S22", "S33", "S12", "S13", "S23", "S1", "S2", "S3", "Q", "STM", "SEM"};
|
||||
return validComponents.count( m_resultComponentName );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -106,6 +106,8 @@ private:
|
||||
|
||||
static QString convertToUiResultFieldName( QString resultFieldName );
|
||||
|
||||
bool normalizableResultSelected() const;
|
||||
|
||||
// Data Fields
|
||||
|
||||
caf::PdmField<caf::AppEnum<RigFemResultPosEnum>> m_resultPositionType;
|
||||
@ -113,6 +115,8 @@ private:
|
||||
caf::PdmField<QString> m_resultComponentName;
|
||||
caf::PdmField<int> m_timeLapseBaseTimestep;
|
||||
caf::PdmField<int> m_compactionRefLayer;
|
||||
caf::PdmField<bool> m_normalizeByHydrostaticPressure;
|
||||
caf::PdmField<double> m_normalizationRkbDiff;
|
||||
|
||||
// UI Fields only
|
||||
friend class RimGeoMechPropertyFilter; // Property filter needs the ui fields
|
||||
|
Loading…
Reference in New Issue
Block a user