From 41d55e747b2d7f0e1919bb45e1e8cd254219175b Mon Sep 17 00:00:00 2001 From: Jon Jenssen Date: Wed, 18 Oct 2023 17:00:30 +0200 Subject: [PATCH] Add selection of global model --- .../Faults/RimFaultReactivationModel.cpp | 18 +++++++++++++++--- .../Faults/RimFaultReactivationModel.h | 3 +++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.cpp b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.cpp index e808411d5d..a451d88e62 100644 --- a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.cpp +++ b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.cpp @@ -45,6 +45,7 @@ #include "RimFaultInViewCollection.h" #include "RimFaultReactivationDataAccess.h" #include "RimFaultReactivationTools.h" +#include "RimGeoMechCase.h" #include "RimParameterGroup.h" #include "RimPolylineTarget.h" #include "RimTimeStepFilter.h" @@ -73,11 +74,9 @@ RimFaultReactivationModel::RimFaultReactivationModel() CAF_PDM_InitObject( "Fault Reactivation Model", ":/fault_react_24x24.png" ); CAF_PDM_InitField( &m_userDescription, "UserDescription", QString( "Model" ), "Name" ); - + CAF_PDM_InitFieldNoDefault( &m_geomechCase, "GeoMechCase", "Global GeoMech Model" ); CAF_PDM_InitFieldNoDefault( &m_baseDir, "BaseDirectory", "Working folder" ); - CAF_PDM_InitField( &m_modelThickness, "ModelThickness", 100.0, "Model Cell Thickness" ); - CAF_PDM_InitField( &m_extentHorizontal, "HorizontalExtent", 1000.0, "Horizontal Extent" ); CAF_PDM_InitField( &m_extentVerticalAbove, "VerticalExtentAbove", 200.0, "Vertical Extent Above Anchor" ); m_extentVerticalAbove.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); @@ -383,6 +382,10 @@ QList RimFaultReactivationModel::calculateValueOptions( { RimTimeStepFilter::timeStepOptions( options, &m_selectedTimeSteps, m_availableTimeSteps, m_selectedTimeSteps, m_timeStepFilter() ); } + else if ( fieldNeedingOptions == &m_geomechCase ) + { + RimTools::geoMechCaseOptionItems( &options ); + } return options; } @@ -456,6 +459,7 @@ void RimFaultReactivationModel::defineUiOrdering( QString uiConfigName, caf::Pdm genGrp->add( &m_userDescription ); genGrp->add( &m_fault ); genGrp->add( &m_baseDir ); + genGrp->add( &m_geomechCase ); auto faultGrp = uiOrdering.addNewGroup( "Fault Plane" ); @@ -564,6 +568,14 @@ RimEclipseCase* RimFaultReactivationModel::eclipseCase() return eCase; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimGeoMechCase* RimFaultReactivationModel::geoMechCase() +{ + return m_geomechCase(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.h b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.h index bca610e1d6..7c54e70fc9 100644 --- a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.h +++ b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationModel.h @@ -42,6 +42,7 @@ class RicPolylineTargetsPickEventHandler; class RimEclipseCase; +class RimGeoMechCase; class RimFaultInView; class RimParameterGroup; class RimPolylineTarget; @@ -127,6 +128,7 @@ class RimFaultReactivationModel : public RimCheckableNamedObject, public RimPoly void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; RimEclipseCase* eclipseCase(); + RimGeoMechCase* geoMechCase(); void initAfterRead() override; @@ -144,6 +146,7 @@ class RimFaultReactivationModel : public RimCheckableNamedObject, public RimPoly caf::PdmField m_userDescription; caf::PdmPtrField m_fault; + caf::PdmPtrField m_geomechCase; caf::PdmChildArrayField m_targets; caf::PdmField m_faultPlaneColor; caf::PdmField m_modelPart1Color;