mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 18:32:10 -05:00
Improve fault reactivation file names (#11005)
Use model name in exported file name. Add model name to include file names.
This commit is contained in:
1 parent
544e6974e7
commit
daae1e6e05
9 files changed
+107
-104
No files matched your search
@@ -48,13 +48,13 @@ void RicExportInpFileFeature::onActionTriggered( bool isChecked )
|
||||
auto faultReactivationModel = caf::SelectionManager::instance()->selectedItemOfType<RimFaultReactivationModel>();
|
||||
if ( faultReactivationModel )
|
||||
{
|
||||
QString exportFile = faultReactivationModel->baseDir() + "/faultreactivation.inp";
|
||||
auto [isOk, errorMessage] = RifFaultReactivationModelExporter::exportToFile( exportFile.toStdString(), *faultReactivationModel );
|
||||
auto [isOk, errorMessage] = RifFaultReactivationModelExporter::exportToFile( *faultReactivationModel );
|
||||
if ( !isOk )
|
||||
{
|
||||
const QString frmTitle( "Fault Reactivation Modeling" );
|
||||
QString outErrorText =
|
||||
QString( "Failed to export INP model to file %1.\n\n%2" ).arg( exportFile ).arg( QString::fromStdString( errorMessage ) );
|
||||
QString outErrorText = QString( "Failed to export INP model to file %1.\n\n%2" )
|
||||
.arg( QString::fromStdString( faultReactivationModel->inputFilename() ) )
|
||||
.arg( QString::fromStdString( errorMessage ) );
|
||||
QMessageBox::critical( nullptr, frmTitle, outErrorText );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,13 +62,13 @@ void RicRunFaultReactModelingFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
runProgress.setProgressDescription( "Writing input files." );
|
||||
|
||||
QString exportFile = model->inputFilename();
|
||||
auto [result, errText] = RifFaultReactivationModelExporter::exportToFile( exportFile.toStdString(), *model );
|
||||
auto [result, errText] = RifFaultReactivationModelExporter::exportToFile( *model );
|
||||
|
||||
if ( !result )
|
||||
{
|
||||
QString outErrorText =
|
||||
QString( "Failed to export INP model to file %1.\n\n%2" ).arg( exportFile ).arg( QString::fromStdString( errText ) );
|
||||
QString outErrorText = QString( "Failed to export INP model to file %1.\n\n%2" )
|
||||
.arg( QString::fromStdString( model->inputFilename() ) )
|
||||
.arg( QString::fromStdString( errText ) );
|
||||
QMessageBox::critical( nullptr, frmTitle, outErrorText );
|
||||
return;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ void RicRunFaultReactModelingFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
for ( auto gCase : RimProject::current()->geoMechCases() )
|
||||
{
|
||||
if ( model->outputOdbFilename() == gCase->gridFileName() )
|
||||
if ( QString::fromStdString( model->outputOdbFilename() ) == gCase->gridFileName() )
|
||||
{
|
||||
gCase->reloadDataAndUpdate();
|
||||
auto& views = gCase->geoMechViews();
|
||||
@@ -124,11 +124,11 @@ void RicRunFaultReactModelingFeature::onActionTriggered( bool isChecked )
|
||||
}
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
if ( !app->openOdbCaseFromFile( model->outputOdbFilename() ) )
|
||||
if ( !app->openOdbCaseFromFile( QString::fromStdString( model->outputOdbFilename() ) ) )
|
||||
{
|
||||
QMessageBox::critical( nullptr,
|
||||
frmTitle,
|
||||
"Failed to load modeling results from file \"" + model->outputOdbFilename() +
|
||||
"Failed to load modeling results from file \"" + QString::fromStdString( model->outputOdbFilename() ) +
|
||||
"\". Check log window for additional information." );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,9 +54,9 @@ void RicShowFaultReactModelFeature::onActionTriggered( bool isChecked )
|
||||
if ( model == nullptr ) return;
|
||||
|
||||
const QString frmTitle( "Fault Reactivation Modeling" );
|
||||
const QString exportFile = model->inputFilename();
|
||||
|
||||
auto [result, errText] = RifFaultReactivationModelExporter::exportToFile( exportFile.toStdString(), *model );
|
||||
auto exportFile = QString::fromStdString( model->inputFilename() );
|
||||
auto [result, errText] = RifFaultReactivationModelExporter::exportToFile( *model );
|
||||
if ( !result )
|
||||
{
|
||||
QString outErrorText =
|
||||
|
||||
Reference in new issue
Block a user