mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-01 08:38:00 -06:00
Refactor: move opm-flow deck keyword generation to factory.
This commit is contained in:
1 parent
04dfa4ecba
commit
4e736a8cc0
7 files changed
+216
-227
No files matched your search
@@ -471,10 +471,13 @@ std::expected<void, QString> RicExportEclipseSectorModelFeature::addBorderBounda
|
||||
|
||||
if ( !borderCellFaces.empty() )
|
||||
{
|
||||
// Add BCCON keyword
|
||||
if ( !deckFile.addBcconKeyword( "GRID", borderCellFaces ) )
|
||||
// Create BCCON keyword using the factory
|
||||
Opm::DeckKeyword bcconKw = RimKeywordFactory::bcconKeyword( borderCellFaces );
|
||||
|
||||
// Replace BCCON keyword in GRID section
|
||||
if ( !deckFile.replaceKeyword( "GRID", bcconKw ) )
|
||||
{
|
||||
return std::unexpected( "Failed to add BCCON keyword to deck file" );
|
||||
return std::unexpected( "Failed to replace BCCON keyword in deck file" );
|
||||
}
|
||||
|
||||
// Build BCPROP records from the UI configuration
|
||||
@@ -489,10 +492,13 @@ std::expected<void, QString> RicExportEclipseSectorModelFeature::addBorderBounda
|
||||
}
|
||||
}
|
||||
|
||||
// Add BCPROP keyword
|
||||
if ( !deckFile.addBcpropKeyword( "GRID", borderCellFaces, bcpropRecords ) )
|
||||
// Create BCPROP keyword using the factory
|
||||
Opm::DeckKeyword bcpropKw = RimKeywordFactory::bcpropKeyword( borderCellFaces, bcpropRecords );
|
||||
|
||||
// Replace BCPROP keyword in GRID section
|
||||
if ( !deckFile.replaceKeyword( "GRID", bcpropKw ) )
|
||||
{
|
||||
return std::unexpected( "Failed to add BCPROP keyword to deck file" );
|
||||
return std::unexpected( "Failed to replace BCPROP keyword in deck file" );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user