Merge pull request #8791 from OPM/8790-rename-to-group

Rename summary references to "Group"
This commit is contained in:
Magne Sjaastad
2022-04-07 21:06:40 +02:00
committed by GitHub
parent f099a8c89f
commit 93614ef272
42 changed files with 631 additions and 642 deletions

View File

@@ -111,7 +111,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu
std::string quantityName;
int regionNumber( -1 );
int regionNumber2( -1 );
std::string wellGroupName;
std::string groupName;
std::string wellName;
int wellSegmentNumber( -1 );
std::string lgrName;
@@ -151,8 +151,8 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu
break;
case ECL_SMSPEC_GROUP_VAR:
{
sumCategory = RifEclipseSummaryAddress::SUMMARY_WELL_GROUP;
wellGroupName = stringFromPointer( ertSumVarNode.get_wgname() );
sumCategory = RifEclipseSummaryAddress::SUMMARY_GROUP;
groupName = stringFromPointer( ertSumVarNode.get_wgname() );
}
break;
case ECL_SMSPEC_BLOCK_VAR:
@@ -239,7 +239,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu
quantityName,
regionNumber,
regionNumber2,
wellGroupName,
groupName,
wellName,
wellSegmentNumber,
lgrName,

View File

@@ -55,8 +55,8 @@ RifEclipseSummaryAddress::RifEclipseSummaryAddress( SummaryVarCategory
m_regionNumber = reg2regPair.first;
m_regionNumber2 = reg2regPair.second;
break;
case SUMMARY_WELL_GROUP:
m_wellGroupName = identifiers[INPUT_WELL_GROUP_NAME];
case SUMMARY_GROUP:
m_groupName = identifiers[INPUT_GROUP_NAME];
break;
case SUMMARY_WELL:
m_wellName = identifiers[INPUT_WELL_NAME];
@@ -251,13 +251,13 @@ RifEclipseSummaryAddress
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RifEclipseSummaryAddress RifEclipseSummaryAddress::wellGroupAddress( const std::string& quantityName,
const std::string& wellGroupName )
RifEclipseSummaryAddress RifEclipseSummaryAddress::groupAddress( const std::string& quantityName,
const std::string& groupName )
{
RifEclipseSummaryAddress addr;
addr.m_variableCategory = SUMMARY_WELL_GROUP;
addr.m_variableCategory = SUMMARY_GROUP;
addr.m_quantityName = quantityName;
addr.m_wellGroupName = wellGroupName;
addr.m_groupName = groupName;
return addr;
}
@@ -509,9 +509,9 @@ std::string RifEclipseSummaryAddress::itemUiText() const
text += formatUiTextRegionToRegion();
}
break;
case SUMMARY_WELL_GROUP:
case SUMMARY_GROUP:
{
text += this->wellGroupName();
text += this->groupName();
}
break;
case SUMMARY_WELL:
@@ -584,8 +584,8 @@ std::string
return formatUiTextRegionToRegion();
case INPUT_WELL_NAME:
return wellName();
case INPUT_WELL_GROUP_NAME:
return wellGroupName();
case INPUT_GROUP_NAME:
return groupName();
case INPUT_CELL_IJK:
return blockAsString();
case INPUT_LGR_NAME:
@@ -643,8 +643,8 @@ bool RifEclipseSummaryAddress::isValid() const
if ( m_regionNumber2 == -1 ) return false;
return true;
case SUMMARY_WELL_GROUP:
if ( m_wellGroupName.size() == 0 ) return false;
case SUMMARY_GROUP:
if ( m_groupName.size() == 0 ) return false;
return true;
case SUMMARY_WELL:
@@ -789,8 +789,8 @@ RifEclipseSummaryAddress RifEclipseSummaryAddress::fromTokens( const std::vector
}
break;
case SUMMARY_WELL_GROUP:
if ( !token1.empty() ) return wellGroupAddress( quantityName, token1 );
case SUMMARY_GROUP:
if ( !token1.empty() ) return groupAddress( quantityName, token1 );
break;
case SUMMARY_WELL:
@@ -889,7 +889,7 @@ bool RifEclipseSummaryAddress::isValidEclipseCategory() const
case SUMMARY_MISC:
case SUMMARY_REGION:
case SUMMARY_REGION_2_REGION:
case SUMMARY_WELL_GROUP:
case SUMMARY_GROUP:
case SUMMARY_WELL:
case SUMMARY_WELL_COMPLETION:
case SUMMARY_WELL_LGR:
@@ -985,9 +985,9 @@ bool operator==( const RifEclipseSummaryAddress& first, const RifEclipseSummaryA
if ( first.regionNumber2() != second.regionNumber2() ) return false;
}
break;
case RifEclipseSummaryAddress::SUMMARY_WELL_GROUP:
case RifEclipseSummaryAddress::SUMMARY_GROUP:
{
if ( first.wellGroupName() != second.wellGroupName() ) return false;
if ( first.groupName() != second.groupName() ) return false;
}
break;
case RifEclipseSummaryAddress::SUMMARY_WELL:
@@ -1083,10 +1083,9 @@ bool operator<( const RifEclipseSummaryAddress& first, const RifEclipseSummaryAd
return first.regionNumber2() < second.regionNumber2();
}
break;
case RifEclipseSummaryAddress::SUMMARY_WELL_GROUP:
case RifEclipseSummaryAddress::SUMMARY_GROUP:
{
if ( first.wellGroupName() != second.wellGroupName() )
return first.wellGroupName() < second.wellGroupName();
if ( first.groupName() != second.groupName() ) return first.groupName() < second.groupName();
}
break;
case RifEclipseSummaryAddress::SUMMARY_WELL:

View File

@@ -47,7 +47,7 @@ public:
SUMMARY_MISC,
SUMMARY_REGION,
SUMMARY_REGION_2_REGION,
SUMMARY_WELL_GROUP,
SUMMARY_GROUP,
SUMMARY_WELL,
SUMMARY_WELL_COMPLETION,
SUMMARY_WELL_LGR,
@@ -65,7 +65,7 @@ public:
INPUT_REGION_NUMBER,
INPUT_REGION_2_REGION,
INPUT_WELL_NAME,
INPUT_WELL_GROUP_NAME,
INPUT_GROUP_NAME,
INPUT_CELL_IJK,
INPUT_LGR_NAME,
INPUT_SEGMENT_NUMBER,
@@ -93,7 +93,7 @@ public:
const std::string& quantityName,
int16_t regionNumber,
int16_t regionNumber2,
const std::string& wellGroupName,
const std::string& groupName,
const std::string& wellName,
int16_t wellSegmentNumber,
const std::string& lgrName,
@@ -107,7 +107,7 @@ public:
, m_quantityName( quantityName )
, m_regionNumber( regionNumber )
, m_regionNumber2( regionNumber2 )
, m_wellGroupName( wellGroupName )
, m_groupName( groupName )
, m_wellName( wellName )
, m_wellSegmentNumber( wellSegmentNumber )
, m_lgrName( lgrName )
@@ -136,7 +136,7 @@ public:
static RifEclipseSummaryAddress regionAddress( const std::string& quantityName, int regionNumber );
static RifEclipseSummaryAddress
regionToRegionAddress( const std::string& quantityName, int regionNumber, int region2Number );
static RifEclipseSummaryAddress wellGroupAddress( const std::string& quantityName, const std::string& wellGroupName );
static RifEclipseSummaryAddress groupAddress( const std::string& quantityName, const std::string& groupName );
static RifEclipseSummaryAddress wellAddress( const std::string& quantityName, const std::string& wellName );
static RifEclipseSummaryAddress
wellCompletionAddress( const std::string& quantityName, const std::string& wellName, int i, int j, int k );
@@ -172,7 +172,7 @@ public:
int regionNumber() const { return m_regionNumber; }
int regionNumber2() const { return m_regionNumber2; }
const std::string& wellGroupName() const { return m_wellGroupName; }
const std::string& groupName() const { return m_groupName; }
const std::string& wellName() const { return m_wellName; }
int wellSegmentNumber() const { return m_wellSegmentNumber; }
const std::string& lgrName() const { return m_lgrName; }
@@ -195,7 +195,7 @@ public:
bool isValid() const;
void setQuantityName( const std::string& quantity ) { m_quantityName = quantity; }
void setWellName( const std::string& wellName ) { m_wellName = wellName; }
void setWellGroupName( const std::string& wellGroupName ) { m_wellGroupName = wellGroupName; }
void setGroupName( const std::string& groupName ) { m_groupName = groupName; }
void setRegion( int region ) { m_regionNumber = (int16_t)region; }
void setAquiferNumber( int aquiferNumber ) { m_aquiferNumber = (int16_t)aquiferNumber; }
void setCellIjk( const std::string& uiText );
@@ -219,7 +219,7 @@ private:
std::pair<int16_t, int16_t> regionToRegionPairFromUiText( const std::string& s );
std::string m_quantityName;
std::string m_wellGroupName;
std::string m_groupName;
std::string m_wellName;
std::string m_lgrName;
int32_t m_cellI;

View File

@@ -152,7 +152,7 @@ void RifEclipseSummaryTools::dumpMetaData( RifSummaryReaderInterface* readerEcli
for ( const auto& catAddresse : catAddresses )
{
std::cout << catAddresse.quantityName() << " " << catAddresse.regionNumber() << " "
<< catAddresse.regionNumber2() << " " << catAddresse.wellGroupName() << " "
<< catAddresse.regionNumber2() << " " << catAddresse.groupName() << " "
<< catAddresse.wellName() << " " << catAddresse.wellSegmentNumber() << " "
<< catAddresse.lgrName() << " " << catAddresse.cellI() << " " << catAddresse.cellJ() << " "
<< catAddresse.cellK() << std::endl;

View File

@@ -173,7 +173,7 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con
int regionNumber = -1;
int regionNumber2 = -1;
std::string wellGroupName = "";
std::string groupName = "";
std::string wellName = "";
int wellSegmentNumber = -1;
std::string lgrName = "";
@@ -210,11 +210,11 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con
}
case RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION:
break;
case RifEclipseSummaryAddress::SUMMARY_WELL_GROUP:
case RifEclipseSummaryAddress::SUMMARY_GROUP:
{
if ( columnHeaderText.size() > 0 )
{
wellGroupName = columnHeaderText[0];
groupName = columnHeaderText[0];
}
break;
}
@@ -284,7 +284,7 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con
quantityName,
regionNumber,
regionNumber2,
wellGroupName,
groupName,
wellName,
wellSegmentNumber,
lgrName,

View File

@@ -292,7 +292,7 @@ RifEclipseSummaryAddress RifOpmCommonSummaryTools::createAddressFromSummaryNode(
return RifEclipseSummaryAddress::wellAddress( summaryNode.keyword, summaryNode.wgname );
break;
case Opm::EclIO::SummaryNode::Category::Group:
return RifEclipseSummaryAddress::wellGroupAddress( summaryNode.keyword, summaryNode.wgname );
return RifEclipseSummaryAddress::groupAddress( summaryNode.keyword, summaryNode.wgname );
break;
case Opm::EclIO::SummaryNode::Category::Field:
return RifEclipseSummaryAddress::fieldAddress( summaryNode.keyword );
@@ -328,7 +328,7 @@ RifEclipseSummaryAddress RifOpmCommonSummaryTools::createAddressFromSummaryNode(
// The vector "GPR" is defined as Node
// The behavior in libecl is to use the category Group
// https://github.com/OPM/ResInsight/issues/7838
return RifEclipseSummaryAddress::wellGroupAddress( summaryNode.keyword, summaryNode.wgname );
return RifEclipseSummaryAddress::groupAddress( summaryNode.keyword, summaryNode.wgname );
break;
case Opm::EclIO::SummaryNode::Category::Network:
return RifEclipseSummaryAddress::networkAddress( summaryNode.keyword );

View File

@@ -161,7 +161,7 @@ RifEclipseSummaryAddress RifReaderObservedData::address( const QString&
std::string quantityName = quantity.toStdString();
int regionNumber( -1 );
int regionNumber2( -1 );
std::string wellGroupName;
std::string groupName;
std::string wellName;
int wellSegmentNumber( -1 );
std::string lgrName;
@@ -174,8 +174,8 @@ RifEclipseSummaryAddress RifReaderObservedData::address( const QString&
switch ( summaryCategory )
{
case RifEclipseSummaryAddress::SUMMARY_WELL_GROUP:
wellGroupName = identifierName.toStdString();
case RifEclipseSummaryAddress::SUMMARY_GROUP:
groupName = identifierName.toStdString();
break;
case RifEclipseSummaryAddress::SUMMARY_WELL:
wellName = identifierName.toStdString();
@@ -191,7 +191,7 @@ RifEclipseSummaryAddress RifReaderObservedData::address( const QString&
quantityName,
regionNumber,
regionNumber2,
wellGroupName,
groupName,
wellName,
wellSegmentNumber,
lgrName,