mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 15:10:22 -05:00
Allow setting well group for new well in job, with list of existing groups
This commit is contained in:
1 parent
e91ec80f89
commit
a6da2ab30c
4 files changed
+88
-4
No files matched your search
@@ -533,6 +533,30 @@ bool RifOpmFlowDeckFile::isRestartFile()
|
||||
return pos.has_value();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<std::string> RifOpmFlowDeckFile::wellGroupsInFile()
|
||||
{
|
||||
std::set<std::string> values;
|
||||
|
||||
if ( m_fileDeck.get() == nullptr ) return values;
|
||||
|
||||
for ( auto it = m_fileDeck->start(); it != m_fileDeck->stop(); it++ )
|
||||
{
|
||||
auto& kw = m_fileDeck->operator[]( it );
|
||||
if ( kw.name() == Opm::ParserKeywords::WELSPECS::keywordName )
|
||||
{
|
||||
for ( int i = 0; i < (int)kw.size(); i++ )
|
||||
{
|
||||
auto& item = kw.getRecord( i ).getItem( Opm::ParserKeywords::WELSPECS::GROUP::itemName );
|
||||
values.insert( item.get<std::string>( 0 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <ctime>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -61,6 +62,8 @@ public:
|
||||
std::vector<std::string> dateStrings();
|
||||
std::vector<std::time_t> dates();
|
||||
|
||||
std::set<std::string> wellGroupsInFile();
|
||||
|
||||
std::vector<int> welldims();
|
||||
bool setWelldims( int maxWells, int maxConnections, int maxGroups, int maxWellsInGroup );
|
||||
|
||||
|
||||
Reference in new issue
Block a user