mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 17:10:19 -05:00
Sector Export: dump with "INLINE" to workaround strange inserts.
This commit is contained in:
1 parent
c3286d9a7e
commit
2bba6afe10
3 files changed
+15
-1
No files matched your search
@@ -367,7 +367,7 @@ std::expected<void, QString> RicExportEclipseSectorModelFeature::exportSimulatio
|
||||
deckFile.removeKeywords( "SPECGRID" );
|
||||
|
||||
// Save the modified deck file to the export directory
|
||||
if ( !deckFile.saveDeck( outputFolder.toStdString(), outputFile.toStdString() ) )
|
||||
if ( !deckFile.saveDeckInline( outputFolder.toStdString(), outputFile.toStdString() ) )
|
||||
{
|
||||
return std::unexpected( QString( "Failed to save modified deck file to '%1/%2'" ).arg( outputFolder ).arg( outputFile ) );
|
||||
}
|
||||
|
||||
@@ -317,6 +317,19 @@ bool RifOpmFlowDeckFile::saveDeck( std::string folder, std::string filename )
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifOpmFlowDeckFile::saveDeckInline( std::string folder, std::string filename )
|
||||
{
|
||||
if ( m_fileDeck.get() != nullptr )
|
||||
{
|
||||
m_fileDeck->dump( folder, filename, Opm::FileDeck::OutputMode::INLINE );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Returns updated position due to new inserts if successful, < 0 if failure
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -47,6 +47,7 @@ public:
|
||||
|
||||
bool loadDeck( std::string filename );
|
||||
bool saveDeck( std::string folder, std::string filename );
|
||||
bool saveDeckInline( std::string folder, std::string filename );
|
||||
|
||||
int mergeKeywordAtPosition( int deckPosition, const Opm::DeckKeyword& keyword );
|
||||
bool mergeKeywordAtTimeStep( int timeStep, const Opm::DeckKeyword& keyword, std::string insertAfterKeyword = "" );
|
||||
|
||||
Reference in new issue
Block a user