mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixes #6718.
Also made function for historyIdentifier and made it and differenceIdentifier public.
This commit is contained in:
parent
3c5c37e5a8
commit
77b2b71282
@ -440,8 +440,9 @@ bool RifReaderEclipseSummary::values( const RifEclipseSummaryAddress& resultAddr
|
||||
{
|
||||
if ( m_differenceAddresses.count( resultAddress ) )
|
||||
{
|
||||
std::string quantityName = resultAddress.quantityName();
|
||||
auto historyQuantity = quantityName.substr( 0, quantityName.size() - differenceIdentifier().size() );
|
||||
std::string quantityName = resultAddress.quantityName();
|
||||
auto historyQuantity = quantityName.substr( 0, quantityName.size() - differenceIdentifier().size() ) +
|
||||
historyIdentifier();
|
||||
|
||||
RifEclipseSummaryAddress nativeAdrNoHistory = resultAddress;
|
||||
nativeAdrNoHistory.setQuantityName( historyQuantity );
|
||||
@ -549,8 +550,6 @@ void RifReaderEclipseSummary::buildMetaData()
|
||||
bool addDifferenceVectors = true;
|
||||
if ( addDifferenceVectors )
|
||||
{
|
||||
const std::string historyIdentifier( "H" );
|
||||
|
||||
for ( const auto& adr : m_allResultAddresses )
|
||||
{
|
||||
RifEclipseSummaryAddress adrWithHistory;
|
||||
@ -558,7 +557,7 @@ void RifReaderEclipseSummary::buildMetaData()
|
||||
|
||||
{
|
||||
std::string s = adr.quantityName();
|
||||
if ( RiaStdStringTools::endsWith( s, historyIdentifier ) )
|
||||
if ( RiaStdStringTools::endsWith( s, historyIdentifier() ) )
|
||||
{
|
||||
RifEclipseSummaryAddress candidate = adr;
|
||||
|
||||
@ -573,7 +572,7 @@ void RifReaderEclipseSummary::buildMetaData()
|
||||
else
|
||||
{
|
||||
RifEclipseSummaryAddress candidate = adr;
|
||||
candidate.setQuantityName( s + historyIdentifier );
|
||||
candidate.setQuantityName( s + historyIdentifier() );
|
||||
if ( m_allResultAddresses.count( candidate ) )
|
||||
{
|
||||
adrWithHistory = candidate;
|
||||
|
@ -80,14 +80,15 @@ public:
|
||||
|
||||
void markForCachePurge( const RifEclipseSummaryAddress& address ) override;
|
||||
|
||||
static std::string differenceIdentifier() { return "_DIFF"; }
|
||||
static const std::string historyIdentifier() { return "H"; }
|
||||
|
||||
private:
|
||||
int timeStepCount() const;
|
||||
int indexFromAddress( const RifEclipseSummaryAddress& resultAddress ) const;
|
||||
void buildMetaData();
|
||||
RifRestartFileInfo getRestartFile( const QString& headerFileName );
|
||||
|
||||
static std::string differenceIdentifier() { return "_DIFF"; }
|
||||
|
||||
private:
|
||||
// Taken from ecl_sum.h
|
||||
typedef struct ecl_sum_struct ecl_sum_type;
|
||||
|
Loading…
Reference in New Issue
Block a user