From ec9713212e13198aa22bd16eda688010b5473b9c Mon Sep 17 00:00:00 2001 From: jonjenssen Date: Wed, 26 May 2021 14:41:12 +0200 Subject: [PATCH] Smoothing is default on Fix timestep and odb case name issues. --- .../Faults/RimFaultRAPreprocSettings.cpp | 2 +- .../Faults/RimFaultRASettings.cpp | 21 ++++++++++++++----- .../Faults/RimFaultRASettings.h | 1 + 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultRAPreprocSettings.cpp b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultRAPreprocSettings.cpp index 862a4874e5..737ad1820c 100644 --- a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultRAPreprocSettings.cpp +++ b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultRAPreprocSettings.cpp @@ -61,7 +61,7 @@ RimFaultRAPreprocSettings::RimFaultRAPreprocSettings() m_baseDir.uiCapability()->setUiReadOnly( true ); CAF_PDM_InitField( &m_cleanBaseDir, "CleanBaseDir", false, "Clean Output Directory", "", "", "" ); - CAF_PDM_InitField( &m_smoothEclipseData, "SmoothEclipseData", false, "Smooth Eclipse Data", "", "", "" ); + CAF_PDM_InitField( &m_smoothEclipseData, "SmoothEclipseData", true, "Smooth Eclipse Data", "", "", "" ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultRASettings.cpp b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultRASettings.cpp index 2d7322ca93..5de512b049 100644 --- a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultRASettings.cpp +++ b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultRASettings.cpp @@ -40,6 +40,8 @@ #include "cafPdmUiComboBoxEditor.h" #include "cafPdmUiTableViewEditor.h" +#include + CAF_PDM_SOURCE_INIT( RimFaultRASettings, "RimFaultRASettings" ); //-------------------------------------------------------------------------------------------------- @@ -190,6 +192,15 @@ QString RimFaultRASettings::geomechCaseFilename() const return ""; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimFaultRASettings::geomechCaseName() const +{ + QFileInfo fi( geomechCaseFilename() ); + return fi.baseName(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -319,7 +330,7 @@ QString RimFaultRASettings::startTimeStepGeoMech() const if ( m_geomechCase() ) { if ( ( m_startTimestepGeoMech >= 0 ) && ( m_startTimestepGeoMech <= m_geomechCase->timeStepStrings().size() ) ) - return m_geomechCase->timeStepStrings()[m_startTimestepEclipse]; + return m_geomechCase->timeStepStrings()[m_startTimestepGeoMech]; } return ""; } @@ -394,8 +405,8 @@ std::list RimFaultRASettings::basicParameters( int faultID //-------------------------------------------------------------------------------------------------- std::list RimFaultRASettings::advancedParameters( int faultID ) { - m_advancedParametersRI->setParameterValue( "eclipse_loadstep_start", startTimeStepEclipse() ); - m_advancedParametersRI->setParameterValue( "eclipse_loadstep_end", m_endTimestepEclipse() ); + m_advancedParametersRI->setParameterValue( "eclipse_loadstep_start", loadStepStart() ); + m_advancedParametersRI->setParameterValue( "eclipse_loadstep_end", loadStepEnd() ); m_advancedParametersRI->setParameterValue( "faultid_calibration", faultID ); m_advancedParametersRI->setParameterValue( "abaqus_elastic_properties", elasticPropertiesFilename() ); m_advancedParametersRI->setParameterValue( "abaqus_stress_start", stressStartFilename() ); @@ -452,7 +463,7 @@ QString RimFaultRASettings::elasticPropertiesFilename() const //-------------------------------------------------------------------------------------------------- QString RimFaultRASettings::stressStartFilename() const { - QString filename = QString( "/%1/%2_%3_stress.rpt" ).arg( "Abaqus", geomechCase()->uiName(), startTimeStepGeoMech() ); + QString filename = QString( "/%1/%2_%3_stress.rpt" ).arg( "Abaqus", geomechCaseName(), startTimeStepGeoMech() ); return m_baseDir + filename; } @@ -461,7 +472,7 @@ QString RimFaultRASettings::stressStartFilename() const //-------------------------------------------------------------------------------------------------- QString RimFaultRASettings::stressEndFilename() const { - QString filename = QString( "/%1/%2_%3_stress.rpt" ).arg( "Abaqus", geomechCase()->uiName(), endTimeStepGeoMech() ); + QString filename = QString( "/%1/%2_%3_stress.rpt" ).arg( "Abaqus", geomechCaseName(), endTimeStepGeoMech() ); return m_baseDir + filename; } diff --git a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultRASettings.h b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultRASettings.h index de85b71cdb..ea40d44560 100644 --- a/ApplicationLibCode/ProjectDataModel/Faults/RimFaultRASettings.h +++ b/ApplicationLibCode/ProjectDataModel/Faults/RimFaultRASettings.h @@ -45,6 +45,7 @@ public: void setGeoMechCase( RimGeoMechCase* geomechCase ); RimGeoMechCase* geomechCase() const; QString geomechCaseFilename() const; + QString geomechCaseName() const; RimEclipseInputCase* eclipseFRAGeneratedCase() const; RimEclipseCase* eclipseCase() const;