mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5131 Update calculation curves when summary case is replaced.
This commit is contained in:
@@ -41,6 +41,7 @@ RifEclipseSummaryAddress::RifEclipseSummaryAddress( SummaryVarCategory
|
||||
, m_cellK( -1 )
|
||||
, m_aquiferNumber( -1 )
|
||||
, m_isErrorResult( false )
|
||||
, m_id( -1 )
|
||||
{
|
||||
std::tuple<int32_t, int32_t, int32_t> ijkTuple;
|
||||
std::pair<int16_t, int16_t> reg2regPair;
|
||||
@@ -98,6 +99,9 @@ RifEclipseSummaryAddress::RifEclipseSummaryAddress( SummaryVarCategory
|
||||
case SUMMARY_AQUIFER:
|
||||
m_aquiferNumber = RiaStdStringTools::toInt( identifiers[INPUT_AQUIFER_NUMBER] );
|
||||
break;
|
||||
case SUMMARY_CALCULATED:
|
||||
m_id = RiaStdStringTools::toInt( identifiers[INPUT_ID] );
|
||||
break;
|
||||
}
|
||||
|
||||
// Set quantity for all categories
|
||||
@@ -252,7 +256,7 @@ RifEclipseSummaryAddress RifEclipseSummaryAddress::fromEclipseTextAddress( const
|
||||
break;
|
||||
|
||||
case SUMMARY_CALCULATED:
|
||||
address = calculatedAddress( quantityName );
|
||||
address = calculatedAddress( quantityName, RiaStdStringTools::toInt( names[0].toStdString() ) );
|
||||
break;
|
||||
|
||||
case SUMMARY_IMPORTED:
|
||||
@@ -503,11 +507,12 @@ RifEclipseSummaryAddress RifEclipseSummaryAddress::blockLgrAddress( const std::s
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseSummaryAddress RifEclipseSummaryAddress::calculatedAddress( const std::string& quantityName )
|
||||
RifEclipseSummaryAddress RifEclipseSummaryAddress::calculatedAddress( const std::string& quantityName, int id )
|
||||
{
|
||||
RifEclipseSummaryAddress addr;
|
||||
addr.m_variableCategory = SUMMARY_CALCULATED;
|
||||
addr.m_quantityName = quantityName;
|
||||
addr.m_id = id;
|
||||
return addr;
|
||||
}
|
||||
|
||||
@@ -646,6 +651,11 @@ std::string RifEclipseSummaryAddress::uiText() const
|
||||
text += ":" + std::to_string( this->aquiferNumber() );
|
||||
}
|
||||
break;
|
||||
case SUMMARY_CALCULATED:
|
||||
{
|
||||
text += ":" + std::to_string( this->id() );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return text;
|
||||
@@ -676,6 +686,8 @@ std::string RifEclipseSummaryAddress::uiText( RifEclipseSummaryAddress::SummaryI
|
||||
return std::to_string( aquiferNumber() );
|
||||
case INPUT_VECTOR_NAME:
|
||||
return quantityName();
|
||||
case INPUT_ID:
|
||||
return std::to_string( id() );
|
||||
}
|
||||
return "";
|
||||
}
|
||||
@@ -967,6 +979,11 @@ bool operator==( const RifEclipseSummaryAddress& first, const RifEclipseSummaryA
|
||||
if ( first.aquiferNumber() != second.aquiferNumber() ) return false;
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_CALCULATED:
|
||||
{
|
||||
if ( first.id() != second.id() ) return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ( first.isErrorResult() != second.isErrorResult() ) return false;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user