mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05:00
#5131 Update calculation curves when summary case is replaced.
This commit is contained in:
1 parent
8e540efa37
commit
35df3cc9d3
22 files changed
+218
-38
No files matched your search
@@ -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;
|
||||
|
||||
@@ -71,6 +71,7 @@ public:
|
||||
INPUT_SEGMENT_NUMBER,
|
||||
INPUT_AQUIFER_NUMBER,
|
||||
INPUT_VECTOR_NAME,
|
||||
INPUT_ID
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -84,6 +85,7 @@ public:
|
||||
, m_cellK( -1 )
|
||||
, m_aquiferNumber( -1 )
|
||||
, m_isErrorResult( false )
|
||||
, m_id( -1 )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -99,7 +101,8 @@ public:
|
||||
int32_t cellJ,
|
||||
int32_t cellK,
|
||||
int16_t aquiferNumber,
|
||||
bool isErrorResult )
|
||||
bool isErrorResult,
|
||||
int32_t id )
|
||||
: m_variableCategory( category )
|
||||
, m_quantityName( quantityName )
|
||||
, m_regionNumber( regionNumber )
|
||||
@@ -113,6 +116,7 @@ public:
|
||||
, m_cellK( cellK )
|
||||
, m_aquiferNumber( aquiferNumber )
|
||||
, m_isErrorResult( isErrorResult )
|
||||
, m_id( id )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -147,7 +151,7 @@ public:
|
||||
static RifEclipseSummaryAddress blockAddress( const std::string& quantityName, int i, int j, int k );
|
||||
static RifEclipseSummaryAddress
|
||||
blockLgrAddress( const std::string& quantityName, const std::string& lgrName, int i, int j, int k );
|
||||
static RifEclipseSummaryAddress calculatedAddress( const std::string& quantityName );
|
||||
static RifEclipseSummaryAddress calculatedAddress( const std::string& quantityName, int id );
|
||||
static RifEclipseSummaryAddress importedAddress( const std::string& quantityName );
|
||||
static RifEclipseSummaryAddress ensembleStatisticsAddress( const std::string& quantityName,
|
||||
const std::string& dataQuantityName );
|
||||
@@ -207,6 +211,10 @@ public:
|
||||
{
|
||||
return m_aquiferNumber;
|
||||
}
|
||||
int id() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
std::string blockAsString() const;
|
||||
|
||||
const std::string ensembleStatisticsQuantityName() const;
|
||||
@@ -252,6 +260,12 @@ public:
|
||||
{
|
||||
return m_isErrorResult;
|
||||
}
|
||||
|
||||
void setId( int id )
|
||||
{
|
||||
m_id = id;
|
||||
}
|
||||
|
||||
bool hasAccumulatedData() const;
|
||||
|
||||
private:
|
||||
@@ -274,6 +288,7 @@ private:
|
||||
int16_t m_aquiferNumber;
|
||||
SummaryVarCategory m_variableCategory;
|
||||
bool m_isErrorResult;
|
||||
int32_t m_id;
|
||||
};
|
||||
|
||||
bool operator==( const RifEclipseSummaryAddress& first, const RifEclipseSummaryAddress& second );
|
||||
|
||||
@@ -183,6 +183,7 @@ RifEclipseSummaryAddress
|
||||
int cellK = -1;
|
||||
int aquiferNumber = -1;
|
||||
bool isErrorResult = false;
|
||||
int id = -1;
|
||||
|
||||
switch ( category )
|
||||
{
|
||||
@@ -292,7 +293,8 @@ RifEclipseSummaryAddress
|
||||
cellJ,
|
||||
cellK,
|
||||
aquiferNumber,
|
||||
isErrorResult );
|
||||
isErrorResult,
|
||||
id );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -168,7 +168,8 @@ bool RifKeywordVectorUserData::parse( const QString& data, const QString& custom
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
false );
|
||||
false,
|
||||
-1 );
|
||||
|
||||
m_allResultAddresses.insert( addr );
|
||||
|
||||
|
||||
@@ -288,6 +288,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu
|
||||
int cellK( -1 );
|
||||
int aquiferNumber( -1 );
|
||||
bool isErrorResult( false );
|
||||
int id( -1 );
|
||||
|
||||
quantityName = stringFromPointer( ertSumVarNode.get_keyword() );
|
||||
|
||||
@@ -414,7 +415,8 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu
|
||||
cellJ,
|
||||
cellK,
|
||||
aquiferNumber,
|
||||
isErrorResult );
|
||||
isErrorResult,
|
||||
id );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -164,6 +164,7 @@ RifEclipseSummaryAddress RifReaderObservedData::address( const QString&
|
||||
int cellK( -1 );
|
||||
int aquiferNumber( -1 );
|
||||
bool isErrorResult( false );
|
||||
int id( -1 );
|
||||
|
||||
switch ( summaryCategory )
|
||||
{
|
||||
@@ -192,7 +193,8 @@ RifEclipseSummaryAddress RifReaderObservedData::address( const QString&
|
||||
cellJ,
|
||||
cellK,
|
||||
aquiferNumber,
|
||||
isErrorResult );
|
||||
isErrorResult,
|
||||
id );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user