mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Support pausing before running abaqus script to allow input file modifications.
Add option in preferences to enable/disable pause.
This commit is contained in:
parent
ff0b09d1c2
commit
8c27a0f656
@ -72,14 +72,14 @@ RiaPreferencesGeoMech::RiaPreferencesGeoMech()
|
||||
m_geomechWIACommand.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
m_geomechWIACommand.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
|
||||
CAF_PDM_InitField( &m_keepTemporaryFiles,
|
||||
"keepTemporaryFile",
|
||||
false,
|
||||
"Keep temporary parameter files (for debugging)",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
CAF_PDM_InitField( &m_keepTemporaryFiles, "keepTemporaryFile", false, "Keep temporary parameter files (for debugging)" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_keepTemporaryFiles );
|
||||
|
||||
CAF_PDM_InitField( &m_waitForInputFileEdit,
|
||||
"waitForInputFileEdit",
|
||||
true,
|
||||
"Pause to allow modification of input files before running modeling." );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_waitForInputFileEdit );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -109,6 +109,7 @@ void RiaPreferencesGeoMech::appendItems( caf::PdmUiOrdering& uiOrdering ) const
|
||||
caf::PdmUiGroup* wellIAGroup = uiOrdering.addNewGroup( "Well Integrity Analysis" );
|
||||
wellIAGroup->add( &m_geomechWIACommand );
|
||||
wellIAGroup->add( &m_geomechWIADefaultXML );
|
||||
wellIAGroup->add( &m_waitForInputFileEdit );
|
||||
|
||||
caf::PdmUiGroup* commonGroup = uiOrdering.addNewGroup( "Common Settings" );
|
||||
commonGroup->add( &m_keepTemporaryFiles );
|
||||
@ -185,6 +186,14 @@ bool RiaPreferencesGeoMech::keepTemporaryFiles() const
|
||||
return m_keepTemporaryFiles;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaPreferencesGeoMech::waitBeforeRunWIA() const
|
||||
{
|
||||
return m_waitForInputFileEdit;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -48,6 +48,7 @@ public:
|
||||
|
||||
QString geomechWIADefaultXML() const;
|
||||
QString geomechWIACommand() const;
|
||||
bool waitBeforeRunWIA() const;
|
||||
|
||||
bool keepTemporaryFiles() const;
|
||||
|
||||
@ -65,6 +66,7 @@ private:
|
||||
|
||||
caf::PdmField<QString> m_geomechWIADefaultXML;
|
||||
caf::PdmField<QString> m_geomechWIACommand;
|
||||
caf::PdmField<bool> m_waitForInputFileEdit;
|
||||
|
||||
caf::PdmField<bool> m_keepTemporaryFiles;
|
||||
};
|
||||
|
@ -87,6 +87,19 @@ void RicRunWellIntegrityAnalysisFeature::onActionTriggered( bool isChecked )
|
||||
return;
|
||||
}
|
||||
|
||||
if ( RiaPreferencesGeoMech::current()->waitBeforeRunWIA() )
|
||||
{
|
||||
runProgress.setProgressDescription( "Waiting for input file modifications." );
|
||||
|
||||
QString infoText = "Input parameter files can now be found in the working folder:";
|
||||
infoText += " \"" + modelSettings->outputBaseDirectory() + "\"\n";
|
||||
infoText += "\nClick OK to start the Abaqus modeling or Cancel to stop.";
|
||||
|
||||
auto reply = QMessageBox::information( nullptr, wiaTitle, infoText, QMessageBox::Ok | QMessageBox::Cancel );
|
||||
|
||||
if ( reply != QMessageBox::Ok ) return;
|
||||
}
|
||||
|
||||
runProgress.incrementProgress();
|
||||
runProgress.setProgressDescription( "Running Abaqus modeling." );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user