mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Reduce memory use for summary address object
* Use one common variable for object name, use three ints * Move enums to separate file * Refactor use of enums * Move implementation to cpp * Refactor includes
This commit is contained in:
@@ -55,9 +55,9 @@ void RiaOptionItemFactory::appendOptionItemsForEnsembleCurveSets( QList<caf::Pdm
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmOptionItemInfo RiaOptionItemFactory::optionItemFromSummaryType( RifEclipseSummaryAddress::SummaryVarCategory summaryType )
|
||||
caf::PdmOptionItemInfo RiaOptionItemFactory::optionItemFromSummaryType( RifEclipseSummaryAddressDefines::SummaryVarCategory summaryType )
|
||||
{
|
||||
auto uiText = caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>::uiText( summaryType );
|
||||
auto uiText = caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryVarCategory>::uiText( summaryType );
|
||||
|
||||
// Use icons from https://github.com/equinor/webviz-subsurface-components
|
||||
|
||||
@@ -65,55 +65,55 @@ caf::PdmOptionItemInfo RiaOptionItemFactory::optionItemFromSummaryType( RifEclip
|
||||
|
||||
switch ( summaryType )
|
||||
{
|
||||
case RifEclipseSummaryAddress::SUMMARY_INVALID:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID:
|
||||
iconText = ":/summary/components/images/invalid.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_FIELD:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_FIELD:
|
||||
iconText = ":/summary/components/images/field.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_AQUIFER:
|
||||
iconText = ":/summary/components/images/aquifer.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_NETWORK:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_NETWORK:
|
||||
iconText = ":/summary/components/images/network.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_MISC:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_MISC:
|
||||
iconText = ":/summary/components/images/misc.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION:
|
||||
iconText = ":/summary/components/images/region.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION_2_REGION:
|
||||
iconText = ":/summary/components/images/region-region.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_GROUP:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP:
|
||||
iconText = ":/summary/components/images/group.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL:
|
||||
iconText = ":/summary/components/images/well.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION:
|
||||
iconText = ":/summary/components/images/well-completion.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_LGR:
|
||||
iconText = ":/summary/components/images/well.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR:
|
||||
iconText = ":/summary/components/images/well-completion.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_SEGMENT:
|
||||
iconText = ":/summary/components/images/segment.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK:
|
||||
iconText = ":/summary/components/images/block.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK_LGR:
|
||||
iconText = ":/summary/components/images/block.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_IMPORTED:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_IMPORTED:
|
||||
iconText = ":/summary/components/images/others.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_ENSEMBLE_STATISTICS:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
|
||||
#include "cafPdmUiItem.h"
|
||||
|
||||
@@ -31,5 +31,5 @@ class RiaOptionItemFactory
|
||||
public:
|
||||
static void appendOptionItemFromViewNameAndCaseName( Rim3dView* view, QList<caf::PdmOptionItemInfo>* optionItems );
|
||||
static void appendOptionItemsForEnsembleCurveSets( QList<caf::PdmOptionItemInfo>* options );
|
||||
static caf::PdmOptionItemInfo optionItemFromSummaryType( RifEclipseSummaryAddress::SummaryVarCategory summaryType );
|
||||
static caf::PdmOptionItemInfo optionItemFromSummaryType( RifEclipseSummaryAddressDefines::SummaryVarCategory summaryType );
|
||||
};
|
||||
|
@@ -26,6 +26,8 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
using namespace RifEclipseSummaryAddressDefines;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -203,7 +205,7 @@ std::set<int> RiaSummaryAddressAnalyzer::aquifers() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> RiaSummaryAddressAnalyzer::categories() const
|
||||
std::set<RifEclipseSummaryAddressDefines::SummaryVarCategory> RiaSummaryAddressAnalyzer::categories() const
|
||||
{
|
||||
return keysInMap( m_categories );
|
||||
}
|
||||
@@ -236,12 +238,12 @@ std::vector<std::vector<RifEclipseSummaryAddress>> RiaSummaryAddressAnalyzer::ad
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
const std::string& secondaryIdentifier ) const
|
||||
std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
const std::string& secondaryIdentifier ) const
|
||||
{
|
||||
std::vector<QString> identifierStrings;
|
||||
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_REGION )
|
||||
if ( category == SummaryVarCategory::SUMMARY_REGION )
|
||||
{
|
||||
auto keys = keysInMap( m_regionNumbers );
|
||||
for ( const auto& key : keys )
|
||||
@@ -249,7 +251,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::number( key ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_WELL )
|
||||
else if ( category == SummaryVarCategory::SUMMARY_WELL )
|
||||
{
|
||||
auto keys = keysInMap( m_wellNames );
|
||||
for ( const auto& key : keys )
|
||||
@@ -257,7 +259,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::fromStdString( key ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_GROUP )
|
||||
else if ( category == SummaryVarCategory::SUMMARY_GROUP )
|
||||
{
|
||||
auto keys = keysInMap( m_groupNames );
|
||||
for ( const auto& key : keys )
|
||||
@@ -265,7 +267,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::fromStdString( key ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_NETWORK )
|
||||
else if ( category == SummaryVarCategory::SUMMARY_NETWORK )
|
||||
{
|
||||
auto keys = keysInMap( m_networkNames );
|
||||
for ( const auto& key : keys )
|
||||
@@ -273,7 +275,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::fromStdString( key ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_BLOCK )
|
||||
else if ( category == SummaryVarCategory::SUMMARY_BLOCK )
|
||||
{
|
||||
auto keys = keysInMap( m_blocks );
|
||||
for ( const auto& key : keys )
|
||||
@@ -281,7 +283,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::fromStdString( key ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT )
|
||||
else if ( category == SummaryVarCategory::SUMMARY_WELL_SEGMENT )
|
||||
{
|
||||
auto segmentNumbers = wellSegmentNumbers( secondaryIdentifier );
|
||||
for ( const auto& segment : segmentNumbers )
|
||||
@@ -289,7 +291,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::number( segment ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION )
|
||||
else if ( category == SummaryVarCategory::SUMMARY_WELL_COMPLETION )
|
||||
{
|
||||
auto connections = wellCompletions( secondaryIdentifier );
|
||||
for ( const auto& conn : connections )
|
||||
@@ -297,7 +299,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::fromStdString( conn ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_AQUIFER )
|
||||
else if ( category == SummaryVarCategory::SUMMARY_AQUIFER )
|
||||
{
|
||||
auto keys = keysInMap( m_aquifers );
|
||||
for ( const auto& key : keys )
|
||||
@@ -312,8 +314,9 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RifEclipseSummaryAddress> RiaSummaryAddressAnalyzer::addressesForCategory( const std::set<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category )
|
||||
std::vector<RifEclipseSummaryAddress>
|
||||
RiaSummaryAddressAnalyzer::addressesForCategory( const std::set<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category )
|
||||
{
|
||||
std::vector<RifEclipseSummaryAddress> filteredAddresses;
|
||||
|
||||
@@ -347,7 +350,7 @@ std::string RiaSummaryAddressAnalyzer::correspondingHistorySummaryCurveName( con
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<std::string> RiaSummaryAddressAnalyzer::vectorNamesForCategory( RifEclipseSummaryAddress::SummaryVarCategory category )
|
||||
std::set<std::string> RiaSummaryAddressAnalyzer::vectorNamesForCategory( RifEclipseSummaryAddressDefines::SummaryVarCategory category )
|
||||
{
|
||||
auto it = m_categories.find( category );
|
||||
if ( it != m_categories.end() ) return it->second;
|
||||
@@ -454,32 +457,32 @@ void RiaSummaryAddressAnalyzer::analyzeSingleAddress( const RifEclipseSummaryAdd
|
||||
m_regionNumbers.insert( { address.regionNumber(), address } );
|
||||
}
|
||||
|
||||
if ( address.category() == RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION )
|
||||
if ( address.category() == SummaryVarCategory::SUMMARY_WELL_COMPLETION )
|
||||
{
|
||||
auto wellNameAndCompletion = std::make_pair( wellName, address.blockAsString() );
|
||||
m_wellCompletions.insert( wellNameAndCompletion );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT )
|
||||
else if ( address.category() == SummaryVarCategory::SUMMARY_WELL_SEGMENT )
|
||||
{
|
||||
auto wellNameAndSegment = std::make_pair( wellName, address.wellSegmentNumber() );
|
||||
m_wellSegmentNumbers.insert( wellNameAndSegment );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SUMMARY_BLOCK )
|
||||
else if ( address.category() == SummaryVarCategory::SUMMARY_BLOCK )
|
||||
{
|
||||
auto text = address.blockAsString();
|
||||
|
||||
m_blocks.insert( { text, address } );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SUMMARY_AQUIFER )
|
||||
else if ( address.category() == SummaryVarCategory::SUMMARY_AQUIFER )
|
||||
{
|
||||
m_aquifers.insert( { address.aquiferNumber(), address } );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SUMMARY_FIELD || address.category() == RifEclipseSummaryAddress::SUMMARY_MISC )
|
||||
else if ( address.category() == SummaryVarCategory::SUMMARY_FIELD || address.category() == SummaryVarCategory::SUMMARY_MISC )
|
||||
{
|
||||
m_otherCategory.push_back( address );
|
||||
}
|
||||
|
||||
if ( address.category() != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
if ( address.category() != SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
if ( m_categories.count( address.category() ) == 0 )
|
||||
{
|
||||
@@ -519,10 +522,10 @@ std::set<int> RiaSummaryAddressAnalyzer::keysInMap( const std::multimap<int, Rif
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory>
|
||||
RiaSummaryAddressAnalyzer::keysInMap( const std::map<RifEclipseSummaryAddress::SummaryVarCategory, std::set<std::string>>& map )
|
||||
std::set<RifEclipseSummaryAddressDefines::SummaryVarCategory>
|
||||
RiaSummaryAddressAnalyzer::keysInMap( const std::map<RifEclipseSummaryAddressDefines::SummaryVarCategory, std::set<std::string>>& map )
|
||||
{
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> keys;
|
||||
std::set<RifEclipseSummaryAddressDefines::SummaryVarCategory> keys;
|
||||
for ( const auto& [key, value] : map )
|
||||
{
|
||||
keys.insert( key );
|
||||
|
@@ -60,17 +60,18 @@ public:
|
||||
std::set<std::string> blocks() const;
|
||||
std::set<int> aquifers() const;
|
||||
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> categories() const;
|
||||
std::vector<std::vector<RifEclipseSummaryAddress>> addressesGroupedByObject() const;
|
||||
std::set<RifEclipseSummaryAddressDefines::SummaryVarCategory> categories() const;
|
||||
std::vector<std::vector<RifEclipseSummaryAddress>> addressesGroupedByObject() const;
|
||||
|
||||
std::vector<QString> identifierTexts( RifEclipseSummaryAddress::SummaryVarCategory category, const std::string& secondaryIdentifier ) const;
|
||||
std::vector<QString> identifierTexts( RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
const std::string& secondaryIdentifier ) const;
|
||||
|
||||
static std::vector<RifEclipseSummaryAddress> addressesForCategory( const std::set<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category );
|
||||
static std::vector<RifEclipseSummaryAddress> addressesForCategory( const std::set<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category );
|
||||
|
||||
static std::string correspondingHistorySummaryCurveName( const std::string& curveName );
|
||||
|
||||
std::set<std::string> vectorNamesForCategory( RifEclipseSummaryAddress::SummaryVarCategory category );
|
||||
std::set<std::string> vectorNamesForCategory( RifEclipseSummaryAddressDefines::SummaryVarCategory category );
|
||||
|
||||
private:
|
||||
void assignCategoryToQuantities() const;
|
||||
@@ -80,8 +81,8 @@ private:
|
||||
|
||||
static std::set<std::string> keysInMap( const std::multimap<std::string, RifEclipseSummaryAddress>& map );
|
||||
static std::set<int> keysInMap( const std::multimap<int, RifEclipseSummaryAddress>& map );
|
||||
static std::set<RifEclipseSummaryAddress::SummaryVarCategory>
|
||||
keysInMap( const std::map<RifEclipseSummaryAddress::SummaryVarCategory, std::set<std::string>>& map );
|
||||
static std::set<RifEclipseSummaryAddressDefines::SummaryVarCategory>
|
||||
keysInMap( const std::map<RifEclipseSummaryAddressDefines::SummaryVarCategory, std::set<std::string>>& map );
|
||||
|
||||
static std::vector<std::vector<RifEclipseSummaryAddress>> valuesInMap( const std::multimap<std::string, RifEclipseSummaryAddress>& map );
|
||||
|
||||
@@ -102,5 +103,5 @@ private:
|
||||
std::multimap<std::string, RifEclipseSummaryAddress> m_blocks;
|
||||
std::multimap<int, RifEclipseSummaryAddress> m_aquifers;
|
||||
|
||||
std::map<RifEclipseSummaryAddress::SummaryVarCategory, std::set<std::string>> m_categories;
|
||||
std::map<RifEclipseSummaryAddressDefines::SummaryVarCategory, std::set<std::string>> m_categories;
|
||||
};
|
||||
|
@@ -219,7 +219,7 @@ QString RicSaveMultiPlotTemplateFeature::createTextFromObject( RimSummaryMultiPl
|
||||
}
|
||||
|
||||
replaceStrings( sourceStrings,
|
||||
dummy.keywordForCategory( RifEclipseSummaryAddress::SUMMARY_WELL ),
|
||||
dummy.keywordForCategory( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL ),
|
||||
RicSummaryPlotTemplateTools::placeholderTextForWell(),
|
||||
objectAsText );
|
||||
}
|
||||
@@ -233,7 +233,7 @@ QString RicSaveMultiPlotTemplateFeature::createTextFromObject( RimSummaryMultiPl
|
||||
}
|
||||
|
||||
replaceStrings( sourceStrings,
|
||||
dummy.keywordForCategory( RifEclipseSummaryAddress::SUMMARY_GROUP ),
|
||||
dummy.keywordForCategory( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP ),
|
||||
RicSummaryPlotTemplateTools::placeholderTextForGroup(),
|
||||
objectAsText );
|
||||
}
|
||||
@@ -251,8 +251,8 @@ QString RicSaveMultiPlotTemplateFeature::createTextFromObject( RimSummaryMultiPl
|
||||
// Encode placeholder index. Use negative values below -1 to represent a placeholder index
|
||||
int index = -( i + 2 );
|
||||
|
||||
QString fieldKeyword = dummy.keywordForCategory( RifEclipseSummaryAddress::SUMMARY_REGION );
|
||||
QString sourceString = QString( "<%1>%2</%1>" ).arg( fieldKeyword ).arg( regionNumbers[i] );
|
||||
QString fieldKeyword = dummy.keywordForCategory( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION );
|
||||
QString sourceString = QString( "<%1>%2</%1>" ).arg( fieldKeyword ).arg( regionNumbers[i] );
|
||||
QString replacementTextWithIndex = QString( "<%1>%2</%1>" ).arg( fieldKeyword ).arg( index );
|
||||
|
||||
objectAsText.replace( sourceString, replacementTextWithIndex );
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
@@ -37,7 +37,8 @@ private:
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
private:
|
||||
const std::set<RifEclipseSummaryAddress::SummaryVarCategory> m_enabledCategories = { RifEclipseSummaryAddress::SUMMARY_WELL,
|
||||
RifEclipseSummaryAddress::SUMMARY_REGION,
|
||||
RifEclipseSummaryAddress::SUMMARY_GROUP };
|
||||
const std::set<RifEclipseSummaryAddressDefines::SummaryVarCategory> m_enabledCategories =
|
||||
{ RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP };
|
||||
};
|
||||
|
@@ -18,10 +18,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RimPlotCurve.h"
|
||||
|
||||
#include "RifCsvUserDataParser.h"
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmField.h"
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
: useCustomDateTimeFormat( false )
|
||||
, assumeNumericDataColumns( false )
|
||||
, curveSymbolSkipDistance( 0.0f )
|
||||
, defaultCategory( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_INVALID )
|
||||
, defaultCategory( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
QDateTime startDateTime;
|
||||
bool assumeNumericDataColumns;
|
||||
|
||||
RifEclipseSummaryAddress::SummaryVarCategory defaultCategory;
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory defaultCategory;
|
||||
|
||||
RiuQwtPlotCurveDefines::LineStyleEnum curveLineStyle;
|
||||
RiuPlotCurveSymbol::PointSymbolEnum curveSymbol;
|
||||
|
@@ -18,7 +18,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RimSummaryCurveAppearanceCalculator.h"
|
||||
#include "RiuSummaryVectorSelectionWidgetCreator.h"
|
||||
|
||||
|
@@ -17,13 +17,13 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
namespace caf
|
||||
{
|
||||
class PdmObject;
|
||||
@@ -49,7 +49,6 @@ public:
|
||||
};
|
||||
|
||||
static std::vector<RimSummaryCurve*> addDefaultCurvesToPlot( RimSummaryPlot* plot, RimSummaryCase* summaryCase );
|
||||
static caf::PdmObject* createDefaultSummaryPlot( RimSummaryCase* summaryCase );
|
||||
|
||||
static void createSummaryPlotsFromArgumentLine( const QStringList& arguments );
|
||||
|
||||
|
@@ -18,8 +18,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include <QPointer>
|
||||
#include <QString>
|
||||
|
||||
|
@@ -419,9 +419,9 @@ bool RifCsvUserDataParser::parseColumnInfo( QTextStream*
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( colName.toStdString() );
|
||||
|
||||
// Create address of a give category if provided
|
||||
if ( parseOptions.defaultCategory == RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL )
|
||||
if ( parseOptions.defaultCategory == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL )
|
||||
addr = RifEclipseSummaryAddress::wellAddress( colName.toStdString(), nameFromData.toStdString() );
|
||||
else if ( parseOptions.defaultCategory == RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_FIELD )
|
||||
else if ( parseOptions.defaultCategory == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_FIELD )
|
||||
addr = RifEclipseSummaryAddress::fieldAddress( colName.toStdString() );
|
||||
|
||||
double scaleFactor = 1.0;
|
||||
|
@@ -18,7 +18,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifEclipseUserDataParserTools.h"
|
||||
|
||||
#include <QDateTime>
|
||||
|
@@ -18,11 +18,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
||||
class RimDerivedSummaryCase;
|
||||
class RimSummaryCase;
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
|
@@ -107,21 +107,21 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu
|
||||
return RifEclipseSummaryAddress();
|
||||
}
|
||||
|
||||
RifEclipseSummaryAddress::SummaryVarCategory sumCategory( RifEclipseSummaryAddress::SUMMARY_INVALID );
|
||||
std::string quantityName;
|
||||
int regionNumber( -1 );
|
||||
int regionNumber2( -1 );
|
||||
std::string groupName;
|
||||
std::string networkName;
|
||||
std::string wellName;
|
||||
int wellSegmentNumber( -1 );
|
||||
std::string lgrName;
|
||||
int cellI( -1 );
|
||||
int cellJ( -1 );
|
||||
int cellK( -1 );
|
||||
int aquiferNumber( -1 );
|
||||
bool isErrorResult( false );
|
||||
int id( -1 );
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory sumCategory( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID );
|
||||
std::string quantityName;
|
||||
int regionNumber( -1 );
|
||||
int regionNumber2( -1 );
|
||||
std::string groupName;
|
||||
std::string networkName;
|
||||
std::string wellName;
|
||||
int wellSegmentNumber( -1 );
|
||||
std::string lgrName;
|
||||
int cellI( -1 );
|
||||
int cellJ( -1 );
|
||||
int cellK( -1 );
|
||||
int aquiferNumber( -1 );
|
||||
bool isErrorResult( false );
|
||||
int id( -1 );
|
||||
|
||||
quantityName = stringFromPointer( ertSumVarNode.get_keyword() );
|
||||
|
||||
@@ -129,36 +129,36 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu
|
||||
{
|
||||
case ECL_SMSPEC_AQUIFER_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_AQUIFER;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_AQUIFER;
|
||||
aquiferNumber = ertSumVarNode.get_num();
|
||||
}
|
||||
break;
|
||||
case ECL_SMSPEC_WELL_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_WELL;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL;
|
||||
wellName = stringFromPointer( ertSumVarNode.get_wgname() );
|
||||
}
|
||||
break;
|
||||
case ECL_SMSPEC_REGION_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_REGION;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION;
|
||||
regionNumber = ertSumVarNode.get_num();
|
||||
}
|
||||
break;
|
||||
case ECL_SMSPEC_FIELD_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_FIELD;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_FIELD;
|
||||
}
|
||||
break;
|
||||
case ECL_SMSPEC_GROUP_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_GROUP;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP;
|
||||
groupName = stringFromPointer( ertSumVarNode.get_wgname() );
|
||||
}
|
||||
break;
|
||||
case ECL_SMSPEC_BLOCK_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_BLOCK;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK;
|
||||
|
||||
auto ijk = ertSumVarNode.get_ijk();
|
||||
cellI = ijk[0];
|
||||
@@ -168,7 +168,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu
|
||||
break;
|
||||
case ECL_SMSPEC_COMPLETION_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION;
|
||||
wellName = stringFromPointer( ertSumVarNode.get_wgname() );
|
||||
|
||||
auto ijk = ertSumVarNode.get_ijk();
|
||||
@@ -179,7 +179,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu
|
||||
break;
|
||||
case ECL_SMSPEC_LOCAL_BLOCK_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK_LGR;
|
||||
lgrName = stringFromPointer( ertSumVarNode.get_lgr_name() );
|
||||
|
||||
auto ijk = ertSumVarNode.get_lgr_ijk();
|
||||
@@ -190,7 +190,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu
|
||||
break;
|
||||
case ECL_SMSPEC_LOCAL_COMPLETION_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR;
|
||||
wellName = stringFromPointer( ertSumVarNode.get_wgname() );
|
||||
lgrName = stringFromPointer( ertSumVarNode.get_lgr_name() );
|
||||
|
||||
@@ -202,33 +202,33 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode( const ecl::smspec_node& ertSu
|
||||
break;
|
||||
case ECL_SMSPEC_LOCAL_WELL_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_WELL_LGR;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_LGR;
|
||||
wellName = stringFromPointer( ertSumVarNode.get_wgname() );
|
||||
lgrName = stringFromPointer( ertSumVarNode.get_lgr_name() );
|
||||
}
|
||||
break;
|
||||
case ECL_SMSPEC_NETWORK_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_NETWORK;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_NETWORK;
|
||||
}
|
||||
break;
|
||||
case ECL_SMSPEC_REGION_2_REGION_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION_2_REGION;
|
||||
regionNumber = ertSumVarNode.get_R1();
|
||||
regionNumber2 = ertSumVarNode.get_R2();
|
||||
}
|
||||
break;
|
||||
case ECL_SMSPEC_SEGMENT_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_SEGMENT;
|
||||
wellName = stringFromPointer( ertSumVarNode.get_wgname() );
|
||||
wellSegmentNumber = ertSumVarNode.get_num();
|
||||
}
|
||||
break;
|
||||
case ECL_SMSPEC_MISC_VAR:
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_MISC;
|
||||
sumCategory = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_MISC;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -22,76 +22,36 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
using namespace RifEclipseSummaryAddressDefines;
|
||||
|
||||
class QTextStream;
|
||||
class QString;
|
||||
|
||||
#define ENSEMBLE_STAT_P10_QUANTITY_NAME "P10"
|
||||
#define ENSEMBLE_STAT_P50_QUANTITY_NAME "P50"
|
||||
#define ENSEMBLE_STAT_P90_QUANTITY_NAME "P90"
|
||||
#define ENSEMBLE_STAT_MEAN_QUANTITY_NAME "MEAN"
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
class RifEclipseSummaryAddress
|
||||
{
|
||||
public:
|
||||
// Based on list in ecl_smspec.c and list of types taken from Eclipse Reference Manual ecl_rm_2011.1.pdf
|
||||
enum SummaryVarCategory : int8_t
|
||||
{
|
||||
SUMMARY_INVALID,
|
||||
SUMMARY_FIELD,
|
||||
SUMMARY_AQUIFER,
|
||||
SUMMARY_NETWORK,
|
||||
SUMMARY_MISC,
|
||||
SUMMARY_REGION,
|
||||
SUMMARY_REGION_2_REGION,
|
||||
SUMMARY_GROUP,
|
||||
SUMMARY_WELL,
|
||||
SUMMARY_WELL_COMPLETION,
|
||||
SUMMARY_WELL_LGR,
|
||||
SUMMARY_WELL_COMPLETION_LGR,
|
||||
SUMMARY_WELL_SEGMENT,
|
||||
SUMMARY_BLOCK,
|
||||
SUMMARY_BLOCK_LGR,
|
||||
SUMMARY_IMPORTED,
|
||||
SUMMARY_ENSEMBLE_STATISTICS
|
||||
};
|
||||
|
||||
enum SummaryIdentifierType
|
||||
{
|
||||
INPUT_REGION_NUMBER,
|
||||
INPUT_REGION_2_REGION,
|
||||
INPUT_WELL_NAME,
|
||||
INPUT_GROUP_NAME,
|
||||
INPUT_NETWORK_NAME,
|
||||
INPUT_CELL_IJK,
|
||||
INPUT_LGR_NAME,
|
||||
INPUT_SEGMENT_NUMBER,
|
||||
INPUT_AQUIFER_NUMBER,
|
||||
INPUT_VECTOR_NAME,
|
||||
INPUT_ID
|
||||
};
|
||||
|
||||
public:
|
||||
RifEclipseSummaryAddress();
|
||||
|
||||
RifEclipseSummaryAddress( SummaryVarCategory category,
|
||||
const std::string& vectorName,
|
||||
int16_t regionNumber,
|
||||
int16_t regionNumber2,
|
||||
int regionNumber,
|
||||
int regionNumber2,
|
||||
const std::string& groupName,
|
||||
const std::string& networkName,
|
||||
const std::string& wellName,
|
||||
int16_t wellSegmentNumber,
|
||||
int wellSegmentNumber,
|
||||
const std::string& lgrName,
|
||||
int32_t cellI,
|
||||
int32_t cellJ,
|
||||
int32_t cellK,
|
||||
int16_t aquiferNumber,
|
||||
int cellI,
|
||||
int cellJ,
|
||||
int cellK,
|
||||
int aquiferNumber,
|
||||
bool isErrorResult,
|
||||
int32_t id );
|
||||
int id );
|
||||
|
||||
RifEclipseSummaryAddress( SummaryVarCategory category, std::map<SummaryIdentifierType, std::string>& identifiers );
|
||||
|
||||
@@ -132,53 +92,53 @@ public:
|
||||
static std::string generateStringFromAddresses( const std::vector<RifEclipseSummaryAddress>& addressVector,
|
||||
const std::string jointString = "; " );
|
||||
|
||||
static bool isDependentOnWellName( SummaryVarCategory category );
|
||||
static bool isDependentOnWellName( RifEclipseSummaryAddressDefines::SummaryVarCategory category );
|
||||
|
||||
// Access methods
|
||||
|
||||
SummaryVarCategory category() const { return m_variableCategory; }
|
||||
const std::string& vectorName() const { return m_vectorName; }
|
||||
SummaryVarCategory category() const;
|
||||
std::string vectorName() const;
|
||||
bool isHistoryVector() const;
|
||||
|
||||
int regionNumber() const { return m_regionNumber; }
|
||||
int regionNumber2() const { return m_regionNumber2; }
|
||||
int regionNumber() const;
|
||||
int regionNumber2() const;
|
||||
|
||||
const std::string& groupName() const { return m_groupName; }
|
||||
const std::string& networkName() const { return m_networkName; }
|
||||
const std::string& wellName() const { return m_wellName; }
|
||||
int wellSegmentNumber() const { return m_wellSegmentNumber; }
|
||||
const std::string& lgrName() const { return m_lgrName; }
|
||||
int cellI() const { return m_cellI; }
|
||||
int cellJ() const { return m_cellJ; }
|
||||
int cellK() const { return m_cellK; }
|
||||
int aquiferNumber() const { return m_aquiferNumber; }
|
||||
int id() const { return m_id; }
|
||||
std::string blockAsString() const;
|
||||
std::string groupName() const;
|
||||
std::string networkName() const;
|
||||
std::string wellName() const;
|
||||
int wellSegmentNumber() const;
|
||||
std::string lgrName() const;
|
||||
int cellI() const;
|
||||
int cellJ() const;
|
||||
int cellK() const;
|
||||
int aquiferNumber() const;
|
||||
int id() const;
|
||||
std::string blockAsString() const;
|
||||
|
||||
const std::string ensembleStatisticsVectorName() const;
|
||||
std::string ensembleStatisticsVectorName() const;
|
||||
|
||||
// Derived properties
|
||||
|
||||
std::string uiText() const;
|
||||
std::string itemUiText() const;
|
||||
std::string addressComponentUiText( RifEclipseSummaryAddress::SummaryIdentifierType itemTypeInput ) const;
|
||||
std::string addressComponentUiText( SummaryIdentifierType itemTypeInput ) const;
|
||||
bool isUiTextMatchingFilterText( const QString& filterString ) const;
|
||||
|
||||
bool isValid() const;
|
||||
void setVectorName( const std::string& vectorName ) { m_vectorName = vectorName; }
|
||||
void setWellName( const std::string& wellName ) { m_wellName = wellName; }
|
||||
void setGroupName( const std::string& groupName ) { m_groupName = groupName; }
|
||||
void setNetworkName( const std::string& networkName ) { m_networkName = networkName; }
|
||||
void setRegion( int region ) { m_regionNumber = (int16_t)region; }
|
||||
void setRegion2( int region2 ) { m_regionNumber2 = (int16_t)region2; }
|
||||
void setAquiferNumber( int aquiferNumber ) { m_aquiferNumber = (int16_t)aquiferNumber; }
|
||||
void setVectorName( const std::string& vectorName );
|
||||
void setWellName( const std::string& wellName );
|
||||
void setGroupName( const std::string& groupName );
|
||||
void setNetworkName( const std::string& networkName );
|
||||
void setRegion( int region );
|
||||
void setRegion2( int region2 );
|
||||
void setAquiferNumber( int aquiferNumber );
|
||||
void setCellIjk( const std::string& uiText );
|
||||
void setWellSegmentNumber( int segment ) { m_wellSegmentNumber = (int16_t)segment; }
|
||||
void setWellSegmentNumber( int segment );
|
||||
|
||||
void setAsErrorResult() { m_isErrorResult = true; }
|
||||
bool isErrorResult() const { return m_isErrorResult; }
|
||||
void setAsErrorResult();
|
||||
bool isErrorResult() const;
|
||||
|
||||
void setId( int id ) { m_id = id; }
|
||||
void setId( int id );
|
||||
|
||||
bool hasAccumulatedData() const;
|
||||
|
||||
@@ -188,14 +148,16 @@ public:
|
||||
|
||||
bool isCalculated() const;
|
||||
|
||||
std::string formatUiTextRegionToRegion() const;
|
||||
static std::pair<int16_t, int16_t> regionToRegionPairFromUiText( const std::string& s );
|
||||
std::string formatUiTextRegionToRegion() const;
|
||||
static std::pair<int, int> regionToRegionPairFromUiText( const std::string& s );
|
||||
|
||||
private:
|
||||
static RifEclipseSummaryAddress fromTokens( const std::vector<std::string>& tokens );
|
||||
|
||||
bool isValidEclipseCategory() const;
|
||||
static std::tuple<int32_t, int32_t, int32_t> ijkTupleFromUiText( const std::string& s );
|
||||
bool isValidEclipseCategory() const;
|
||||
static std::tuple<int, int, int> ijkTupleFromUiText( const std::string& s );
|
||||
void setCellIjk( std::tuple<int, int, int> ijk );
|
||||
void setCellIjk( int i, int j, int k );
|
||||
|
||||
private:
|
||||
// The ordering the variables are defined in defines how the objects get sorted. Members defined first will be
|
||||
@@ -203,21 +165,14 @@ private:
|
||||
|
||||
SummaryVarCategory m_variableCategory;
|
||||
std::string m_vectorName;
|
||||
std::string m_wellName;
|
||||
std::string m_groupName;
|
||||
std::string m_networkName;
|
||||
std::string m_name;
|
||||
std::string m_lgrName;
|
||||
int32_t m_cellK;
|
||||
int32_t m_cellJ;
|
||||
int32_t m_cellI;
|
||||
int16_t m_regionNumber;
|
||||
int16_t m_regionNumber2;
|
||||
int16_t m_wellSegmentNumber;
|
||||
int16_t m_aquiferNumber;
|
||||
int m_number0;
|
||||
int m_number1;
|
||||
int m_number2;
|
||||
bool m_isErrorResult;
|
||||
int32_t m_id;
|
||||
int m_id;
|
||||
};
|
||||
|
||||
QTextStream& operator<<( QTextStream& str, const RifEclipseSummaryAddress& sobj );
|
||||
|
||||
QTextStream& operator>>( QTextStream& str, RifEclipseSummaryAddress& sobj );
|
||||
|
@@ -0,0 +1,67 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#define ENSEMBLE_STAT_P10_QUANTITY_NAME "P10"
|
||||
#define ENSEMBLE_STAT_P50_QUANTITY_NAME "P50"
|
||||
#define ENSEMBLE_STAT_P90_QUANTITY_NAME "P90"
|
||||
#define ENSEMBLE_STAT_MEAN_QUANTITY_NAME "MEAN"
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
namespace RifEclipseSummaryAddressDefines
|
||||
{
|
||||
// Based on list in ecl_smspec.c and list of types taken from Eclipse Reference Manual ecl_rm_2011.1.pdf
|
||||
enum class SummaryVarCategory
|
||||
{
|
||||
SUMMARY_INVALID,
|
||||
SUMMARY_FIELD,
|
||||
SUMMARY_AQUIFER,
|
||||
SUMMARY_NETWORK,
|
||||
SUMMARY_MISC,
|
||||
SUMMARY_REGION,
|
||||
SUMMARY_REGION_2_REGION,
|
||||
SUMMARY_GROUP,
|
||||
SUMMARY_WELL,
|
||||
SUMMARY_WELL_COMPLETION,
|
||||
SUMMARY_WELL_LGR,
|
||||
SUMMARY_WELL_COMPLETION_LGR,
|
||||
SUMMARY_WELL_SEGMENT,
|
||||
SUMMARY_BLOCK,
|
||||
SUMMARY_BLOCK_LGR,
|
||||
SUMMARY_IMPORTED,
|
||||
SUMMARY_ENSEMBLE_STATISTICS
|
||||
};
|
||||
|
||||
enum class SummaryIdentifierType
|
||||
{
|
||||
INPUT_REGION_NUMBER,
|
||||
INPUT_REGION_2_REGION,
|
||||
INPUT_WELL_NAME,
|
||||
INPUT_GROUP_NAME,
|
||||
INPUT_NETWORK_NAME,
|
||||
INPUT_CELL_IJK,
|
||||
INPUT_LGR_NAME,
|
||||
INPUT_SEGMENT_NUMBER,
|
||||
INPUT_AQUIFER_NUMBER,
|
||||
INPUT_VECTOR_NAME,
|
||||
INPUT_ID
|
||||
};
|
||||
}; // namespace RifEclipseSummaryAddressDefines
|
@@ -134,30 +134,17 @@ QString RifEclipseSummaryTools::findGridCaseFileFromSummaryHeaderFile( const QSt
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEclipseSummaryTools::dumpMetaData( RifSummaryReaderInterface* readerEclipseSummary )
|
||||
{
|
||||
const std::set<RifEclipseSummaryAddress>& addresses = readerEclipseSummary->allResultAddresses();
|
||||
const auto addresses = readerEclipseSummary->allResultAddresses();
|
||||
|
||||
for ( int category = 0; category < RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR; category++ )
|
||||
for ( const auto& catAddresse : addresses )
|
||||
{
|
||||
RifEclipseSummaryAddress::SummaryVarCategory categoryEnum = RifEclipseSummaryAddress::SummaryVarCategory( category );
|
||||
|
||||
std::vector<RifEclipseSummaryAddress> catAddresses = RiaSummaryAddressAnalyzer::addressesForCategory( addresses, categoryEnum );
|
||||
|
||||
if ( !catAddresses.empty() )
|
||||
{
|
||||
std::cout << caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>::uiText( categoryEnum ).toStdString()
|
||||
<< " count : " << catAddresses.size() << std::endl;
|
||||
|
||||
for ( const auto& catAddresse : catAddresses )
|
||||
{
|
||||
std::cout << catAddresse.vectorName() << " " << catAddresse.regionNumber() << " " << catAddresse.regionNumber2() << " "
|
||||
<< catAddresse.groupName() << " " << catAddresse.wellName() << " " << catAddresse.wellSegmentNumber() << " "
|
||||
<< catAddresse.lgrName() << " " << catAddresse.cellI() << " " << catAddresse.cellJ() << " " << catAddresse.cellK()
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
std::cout << std::endl;
|
||||
}
|
||||
std::cout << catAddresse.vectorName() << " " << catAddresse.regionNumber() << " " << catAddresse.regionNumber2() << " "
|
||||
<< catAddresse.groupName() << " " << catAddresse.wellName() << " " << catAddresse.wellSegmentNumber() << " "
|
||||
<< catAddresse.lgrName() << " " << catAddresse.cellI() << " " << catAddresse.cellJ() << " " << catAddresse.cellK()
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "ert/ecl/ecl_sum.hpp"
|
||||
|
||||
|
@@ -166,9 +166,10 @@ bool RifEclipseUserDataKeywordTools::isYearX( const std::string& identifier )
|
||||
RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( const std::string quantityName,
|
||||
const std::vector<std::string>& columnHeaderText )
|
||||
{
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category = RiuSummaryQuantityNameInfoProvider::instance()->identifyCategory( quantityName );
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category =
|
||||
RiuSummaryQuantityNameInfoProvider::instance()->identifyCategory( quantityName );
|
||||
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
return RifEclipseSummaryAddress::importedAddress( quantityName );
|
||||
}
|
||||
@@ -189,9 +190,9 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con
|
||||
|
||||
switch ( category )
|
||||
{
|
||||
case RifEclipseSummaryAddress::SUMMARY_FIELD:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_FIELD:
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_AQUIFER:
|
||||
{
|
||||
if ( columnHeaderText.size() > 0 )
|
||||
{
|
||||
@@ -199,11 +200,11 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RifEclipseSummaryAddress::SUMMARY_NETWORK:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_NETWORK:
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_MISC:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_MISC:
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION:
|
||||
{
|
||||
if ( columnHeaderText.size() > 0 )
|
||||
{
|
||||
@@ -211,9 +212,9 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION_2_REGION:
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_GROUP:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP:
|
||||
{
|
||||
if ( columnHeaderText.size() > 0 )
|
||||
{
|
||||
@@ -221,7 +222,7 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL:
|
||||
{
|
||||
if ( columnHeaderText.size() > 0 )
|
||||
{
|
||||
@@ -229,7 +230,7 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION:
|
||||
{
|
||||
if ( columnHeaderText.size() > 1 )
|
||||
{
|
||||
@@ -240,14 +241,14 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_LGR:
|
||||
if ( columnHeaderText.size() > 1 )
|
||||
{
|
||||
wellName = columnHeaderText[0];
|
||||
lgrName = columnHeaderText[1];
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR:
|
||||
if ( columnHeaderText.size() > 2 )
|
||||
{
|
||||
wellName = columnHeaderText[0];
|
||||
@@ -256,20 +257,20 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress( con
|
||||
RifEclipseUserDataKeywordTools::extractThreeInts( &cellI, &cellJ, &cellK, columnHeaderText[2] );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_SEGMENT:
|
||||
if ( columnHeaderText.size() > 1 )
|
||||
{
|
||||
wellName = columnHeaderText[0];
|
||||
wellSegmentNumber = RiaStdStringTools::toInt( columnHeaderText[1] );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK:
|
||||
if ( columnHeaderText.size() > 0 )
|
||||
{
|
||||
RifEclipseUserDataKeywordTools::extractThreeInts( &cellI, &cellJ, &cellK, columnHeaderText[0] );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK_LGR:
|
||||
if ( columnHeaderText.size() > 1 )
|
||||
{
|
||||
lgrName = columnHeaderText[0];
|
||||
|
@@ -111,5 +111,6 @@ RiaDefines::EclipseUnitSystem RifEnsembleStatisticsReader::unitSystem() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEnsembleStatisticsReader::validateAddress( const RifEclipseSummaryAddress& address ) const
|
||||
{
|
||||
return address.category() == RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS && !address.vectorName().empty();
|
||||
return address.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_ENSEMBLE_STATISTICS &&
|
||||
!address.vectorName().empty();
|
||||
}
|
||||
|
@@ -18,10 +18,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
||||
class RimEnsembleStatisticsCase;
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
|
@@ -45,9 +45,9 @@ RifReaderObservedData::~RifReaderObservedData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderObservedData::open( const QString& headerFileName,
|
||||
const QString& identifierName,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory summaryCategory )
|
||||
bool RifReaderObservedData::open( const QString& headerFileName,
|
||||
const QString& identifierName,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory summaryCategory )
|
||||
{
|
||||
AsciiDataParseOptions parseOptions;
|
||||
parseOptions.dateFormat = "yyyy-MM-dd";
|
||||
@@ -154,9 +154,9 @@ std::vector<time_t> RifReaderObservedData::timeSteps( const RifEclipseSummaryAdd
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseSummaryAddress RifReaderObservedData::address( const QString& vectorName,
|
||||
const QString& identifierName,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory summaryCategory )
|
||||
RifEclipseSummaryAddress RifReaderObservedData::address( const QString& vectorName,
|
||||
const QString& identifierName,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory summaryCategory )
|
||||
{
|
||||
std::string stdVectorName = vectorName.toStdString();
|
||||
int regionNumber( -1 );
|
||||
@@ -175,13 +175,13 @@ RifEclipseSummaryAddress RifReaderObservedData::address( const QString&
|
||||
|
||||
switch ( summaryCategory )
|
||||
{
|
||||
case RifEclipseSummaryAddress::SUMMARY_GROUP:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP:
|
||||
groupName = identifierName.toStdString();
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL:
|
||||
wellName = identifierName.toStdString();
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_LGR:
|
||||
lgrName = identifierName.toStdString();
|
||||
break;
|
||||
default:
|
||||
|
@@ -41,7 +41,7 @@ public:
|
||||
RifReaderObservedData();
|
||||
~RifReaderObservedData() override;
|
||||
|
||||
bool open( const QString& headerFileName, const QString& identifierName, RifEclipseSummaryAddress::SummaryVarCategory summaryCategory );
|
||||
bool open( const QString& headerFileName, const QString& identifierName, RifEclipseSummaryAddressDefines::SummaryVarCategory summaryCategory );
|
||||
|
||||
std::vector<time_t> timeSteps( const RifEclipseSummaryAddress& resultAddress ) const override;
|
||||
|
||||
@@ -52,8 +52,9 @@ public:
|
||||
RiaDefines::EclipseUnitSystem unitSystem() const override;
|
||||
|
||||
private:
|
||||
RifEclipseSummaryAddress
|
||||
address( const QString& vectorName, const QString& identifierName, RifEclipseSummaryAddress::SummaryVarCategory summaryCategory );
|
||||
RifEclipseSummaryAddress address( const QString& vectorName,
|
||||
const QString& identifierName,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory summaryCategory );
|
||||
|
||||
private:
|
||||
std::unique_ptr<RifCsvUserDataParser> m_asciiParser;
|
||||
|
@@ -52,7 +52,9 @@ RifRevealCsvSectionSummaryReader::~RifRevealCsvSectionSummaryReader()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifRevealCsvSectionSummaryReader::parse( const QString& text, RifEclipseSummaryAddress::SummaryVarCategory defaultCategory, QString* errorText )
|
||||
bool RifRevealCsvSectionSummaryReader::parse( const QString& text,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory defaultCategory,
|
||||
QString* errorText )
|
||||
{
|
||||
m_allResultAddresses.clear();
|
||||
m_mapFromAddressToResultIndex.clear();
|
||||
@@ -80,7 +82,7 @@ bool RifRevealCsvSectionSummaryReader::parse( const QString& text, RifEclipseSum
|
||||
{ "1000Sm3/d", { "SM3/DAY", 1000.0 } },
|
||||
{ "MSm3", { "SM3", 1000000.0 } } };
|
||||
|
||||
QString prefix = defaultCategory == RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_FIELD ? "F" : "W";
|
||||
QString prefix = defaultCategory == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_FIELD ? "F" : "W";
|
||||
|
||||
std::map<QString, QString> nameMapping = { { "WaterCut", prefix + "WCT" }, { "GOR", prefix + "GOR" },
|
||||
{ "BottomHolePressure", prefix + "BHP" }, { "CumLiquidInjected", prefix + "LIT" },
|
||||
|
@@ -35,5 +35,5 @@ public:
|
||||
RifRevealCsvSectionSummaryReader();
|
||||
~RifRevealCsvSectionSummaryReader() override;
|
||||
|
||||
bool parse( const QString& fileName, RifEclipseSummaryAddress::SummaryVarCategory defaultCategory, QString* errorText = nullptr );
|
||||
bool parse( const QString& fileName, RifEclipseSummaryAddressDefines::SummaryVarCategory defaultCategory, QString* errorText = nullptr );
|
||||
};
|
||||
|
@@ -66,8 +66,8 @@ std::pair<bool, QString> RifRevealCsvSummaryReader::parse( const QString& fileNa
|
||||
cvf::ref<RifRevealCsvSectionSummaryReader> sectionReader = new RifRevealCsvSectionSummaryReader;
|
||||
|
||||
// The first part is field data, and the rest is well data
|
||||
auto defaultCategory = isFirst ? RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_FIELD
|
||||
: RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL;
|
||||
auto defaultCategory = isFirst ? RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_FIELD
|
||||
: RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL;
|
||||
|
||||
QString errorMessage;
|
||||
if ( !sectionReader->parse( p, defaultCategory, &errorMessage ) )
|
||||
|
@@ -201,7 +201,7 @@ void RimAnalysisPlotCollection::applySummaryCaseCollectionAndFieldAddressToPlot(
|
||||
{
|
||||
for ( auto address : allAddresses )
|
||||
{
|
||||
if ( address.category() == RifEclipseSummaryAddress::SUMMARY_FIELD )
|
||||
if ( address.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_FIELD )
|
||||
{
|
||||
if ( quantityName.empty() || quantityName == address.vectorName() )
|
||||
{
|
||||
|
@@ -18,7 +18,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
@@ -28,6 +27,7 @@ class RimSummaryCase;
|
||||
class RimSummaryAddress;
|
||||
class RimSummaryCaseCollection;
|
||||
class RiaSummaryCurveDefinition;
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
class RimAnalysisPlotDataEntry : public caf::PdmObject
|
||||
{
|
||||
|
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "RimObjectiveFunction.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifEclipseSummaryAddressQMetaType.h"
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
||||
@@ -36,6 +35,7 @@ class RimEnsembleCurveSet;
|
||||
class RimSummaryCase;
|
||||
class RimSummaryAddress;
|
||||
class RimCustomObjectiveFunction;
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
|
@@ -74,14 +74,14 @@ void RimDataSourceSteppingTools::modifyCurrentIndex( caf::PdmValueField*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimDataSourceSteppingTools::updateAddressIfMatching( const QVariant& oldValue,
|
||||
const QVariant& newValue,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
RifEclipseSummaryAddress* adr )
|
||||
bool RimDataSourceSteppingTools::updateAddressIfMatching( const QVariant& oldValue,
|
||||
const QVariant& newValue,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
RifEclipseSummaryAddress* adr )
|
||||
{
|
||||
if ( !adr ) return false;
|
||||
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_REGION )
|
||||
if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION )
|
||||
{
|
||||
int oldInt = oldValue.toInt();
|
||||
int newInt = newValue.toInt();
|
||||
@@ -93,7 +93,7 @@ bool RimDataSourceSteppingTools::updateAddressIfMatching( const QVariant&
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_AQUIFER )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_AQUIFER )
|
||||
{
|
||||
int oldInt = oldValue.toInt();
|
||||
int newInt = newValue.toInt();
|
||||
@@ -105,7 +105,7 @@ bool RimDataSourceSteppingTools::updateAddressIfMatching( const QVariant&
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_GROUP )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP )
|
||||
{
|
||||
std::string oldString = oldValue.toString().toStdString();
|
||||
std::string newString = newValue.toString().toStdString();
|
||||
@@ -117,7 +117,7 @@ bool RimDataSourceSteppingTools::updateAddressIfMatching( const QVariant&
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_NETWORK )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_NETWORK )
|
||||
{
|
||||
std::string oldString = oldValue.toString().toStdString();
|
||||
std::string newString = newValue.toString().toStdString();
|
||||
@@ -129,7 +129,7 @@ bool RimDataSourceSteppingTools::updateAddressIfMatching( const QVariant&
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_WELL )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL )
|
||||
{
|
||||
std::string oldString = oldValue.toString().toStdString();
|
||||
std::string newString = newValue.toString().toStdString();
|
||||
@@ -141,7 +141,8 @@ bool RimDataSourceSteppingTools::updateAddressIfMatching( const QVariant&
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_BLOCK || category == RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK ||
|
||||
category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION )
|
||||
{
|
||||
std::string oldString = oldValue.toString().toStdString();
|
||||
std::string newString = newValue.toString().toStdString();
|
||||
@@ -152,7 +153,7 @@ bool RimDataSourceSteppingTools::updateAddressIfMatching( const QVariant&
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION_2_REGION )
|
||||
{
|
||||
std::string oldString = oldValue.toString().toStdString();
|
||||
std::string newString = newValue.toString().toStdString();
|
||||
@@ -165,7 +166,7 @@ bool RimDataSourceSteppingTools::updateAddressIfMatching( const QVariant&
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_SEGMENT )
|
||||
{
|
||||
int oldInt = oldValue.toInt();
|
||||
int newInt = newValue.toInt();
|
||||
|
@@ -18,11 +18,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
|
||||
#include "cafPdmUiItem.h"
|
||||
#include "cafPdmValueField.h"
|
||||
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
@@ -34,10 +36,10 @@ public:
|
||||
int indexOffset,
|
||||
bool notifyChange = true );
|
||||
|
||||
static bool updateAddressIfMatching( const QVariant& oldValue,
|
||||
const QVariant& newValue,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
RifEclipseSummaryAddress* adr );
|
||||
static bool updateAddressIfMatching( const QVariant& oldValue,
|
||||
const QVariant& newValue,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
RifEclipseSummaryAddress* adr );
|
||||
|
||||
static bool updateHistoryAndSummaryQuantityIfMatching( const QVariant& oldValue, const QVariant& newValue, RifEclipseSummaryAddress* adr );
|
||||
|
||||
|
@@ -17,8 +17,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "RimPlotCurveAppearance.h"
|
||||
|
||||
#include "RiaCurveDataTools.h"
|
||||
@@ -41,6 +39,7 @@
|
||||
class RiuPlotCurve;
|
||||
class RiuPlotWidget;
|
||||
class RimPlotRectAnnotation;
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -97,7 +96,7 @@ public:
|
||||
|
||||
void setNamingMethod( RiaDefines::ObjectNamingMethod namingMethod );
|
||||
QString curveName() const;
|
||||
virtual QString curveExportDescription( const RifEclipseSummaryAddress& address = RifEclipseSummaryAddress() ) const;
|
||||
virtual QString curveExportDescription( const RifEclipseSummaryAddress& address ) const;
|
||||
virtual QString createCurveNameFromTemplate( const QString& templateText );
|
||||
|
||||
void setCustomName( const QString& customName );
|
||||
|
@@ -516,7 +516,7 @@ QList<caf::PdmOptionItemInfo> RimSimWellInViewCollection::calculateValueOptions(
|
||||
auto addresses = summaryCase->summaryReader()->allResultAddresses();
|
||||
for ( auto addr : addresses )
|
||||
{
|
||||
if ( addr.category() == RifEclipseSummaryAddress::SUMMARY_WELL )
|
||||
if ( addr.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL )
|
||||
{
|
||||
summaries.insert( addr.vectorName() );
|
||||
}
|
||||
|
@@ -239,43 +239,45 @@ void RimSummaryCalculation::substituteVariables( std::vector<SummaryCalculationV
|
||||
QVariant oldValue;
|
||||
QVariant newValue;
|
||||
bool isHandledBySteppingTools = false;
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_WELL )
|
||||
if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL )
|
||||
{
|
||||
oldValue = QString::fromStdString( firstVariable.summaryAddress.wellName() );
|
||||
newValue = QString::fromStdString( address.wellName() );
|
||||
isHandledBySteppingTools = true;
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_REGION )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION )
|
||||
{
|
||||
oldValue = firstVariable.summaryAddress.regionNumber();
|
||||
newValue = address.regionNumber();
|
||||
isHandledBySteppingTools = true;
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_GROUP )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP )
|
||||
{
|
||||
oldValue = QString::fromStdString( firstVariable.summaryAddress.groupName() );
|
||||
newValue = QString::fromStdString( address.groupName() );
|
||||
isHandledBySteppingTools = true;
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_AQUIFER )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_AQUIFER )
|
||||
{
|
||||
oldValue = firstVariable.summaryAddress.aquiferNumber();
|
||||
newValue = address.aquiferNumber();
|
||||
isHandledBySteppingTools = true;
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION || category == RifEclipseSummaryAddress::SUMMARY_BLOCK )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION ||
|
||||
category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK )
|
||||
{
|
||||
oldValue = QString::fromStdString( firstVariable.summaryAddress.blockAsString() );
|
||||
newValue = QString::fromStdString( address.blockAsString() );
|
||||
isHandledBySteppingTools = true;
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_MISC || category == RifEclipseSummaryAddress::SUMMARY_FIELD ||
|
||||
category == RifEclipseSummaryAddress::SUMMARY_IMPORTED )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_MISC ||
|
||||
category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_FIELD ||
|
||||
category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_IMPORTED )
|
||||
{
|
||||
// No need to do anything for these types
|
||||
return;
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION_2_REGION )
|
||||
{
|
||||
oldValue = QString::fromStdString( firstVariable.summaryAddress.formatUiTextRegionToRegion() );
|
||||
newValue = QString::fromStdString( address.formatUiTextRegionToRegion() );
|
||||
@@ -491,17 +493,17 @@ std::vector<RimSummaryCalculationAddress> RimSummaryCalculation::allAddressesFor
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimSummaryCalculationAddress>
|
||||
RimSummaryCalculation::allAddressesForCategory( RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
const std::set<RifEclipseSummaryAddress>& allResultAddresses ) const
|
||||
RimSummaryCalculation::allAddressesForCategory( RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
const std::set<RifEclipseSummaryAddress>& allResultAddresses ) const
|
||||
{
|
||||
std::vector<RimSummaryCalculationAddress> addresses;
|
||||
|
||||
std::string name = shortName().toStdString();
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_FIELD )
|
||||
if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_FIELD )
|
||||
{
|
||||
addresses.push_back( RimSummaryCalculationAddress( RifEclipseSummaryAddress::fieldAddress( name, m_id ) ) );
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_AQUIFER )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_AQUIFER )
|
||||
{
|
||||
std::set<int> uniqueNumbers;
|
||||
std::for_each( allResultAddresses.begin(),
|
||||
@@ -513,11 +515,11 @@ std::vector<RimSummaryCalculationAddress>
|
||||
addresses.push_back( RimSummaryCalculationAddress( RifEclipseSummaryAddress::aquiferAddress( name, num, m_id ) ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_MISC )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_MISC )
|
||||
{
|
||||
addresses.push_back( RimSummaryCalculationAddress( RifEclipseSummaryAddress::miscAddress( name, m_id ) ) );
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_NETWORK )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_NETWORK )
|
||||
{
|
||||
std::set<std::string> uniqueNames;
|
||||
std::for_each( allResultAddresses.begin(),
|
||||
@@ -529,7 +531,7 @@ std::vector<RimSummaryCalculationAddress>
|
||||
addresses.push_back( RimSummaryCalculationAddress( RifEclipseSummaryAddress::networkAddress( name, networkName, m_id ) ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_WELL )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL )
|
||||
{
|
||||
std::set<std::string> uniqueWellNames;
|
||||
std::for_each( allResultAddresses.begin(),
|
||||
@@ -541,7 +543,7 @@ std::vector<RimSummaryCalculationAddress>
|
||||
addresses.push_back( RimSummaryCalculationAddress( RifEclipseSummaryAddress::wellAddress( name, wellName, m_id ) ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_GROUP )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP )
|
||||
{
|
||||
std::set<std::string> uniqueGroupNames;
|
||||
std::for_each( allResultAddresses.begin(),
|
||||
@@ -553,7 +555,7 @@ std::vector<RimSummaryCalculationAddress>
|
||||
addresses.push_back( RimSummaryCalculationAddress( RifEclipseSummaryAddress::groupAddress( name, groupName, m_id ) ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_REGION )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION )
|
||||
{
|
||||
std::set<int> uniqueRegionNumbers;
|
||||
std::for_each( allResultAddresses.begin(),
|
||||
@@ -565,7 +567,7 @@ std::vector<RimSummaryCalculationAddress>
|
||||
addresses.push_back( RimSummaryCalculationAddress( RifEclipseSummaryAddress::regionAddress( name, regionNumber, m_id ) ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION_2_REGION )
|
||||
{
|
||||
std::set<std::pair<int, int>> uniqueRegionNumbers;
|
||||
std::for_each( allResultAddresses.begin(),
|
||||
@@ -578,7 +580,7 @@ std::vector<RimSummaryCalculationAddress>
|
||||
addresses.push_back( RimSummaryCalculationAddress( RifEclipseSummaryAddress::regionToRegionAddress( name, r1, r2, m_id ) ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_IMPORTED )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_IMPORTED )
|
||||
{
|
||||
addresses.push_back( RimSummaryCalculationAddress( RifEclipseSummaryAddress::importedAddress( name, m_id ) ) );
|
||||
}
|
||||
@@ -593,40 +595,40 @@ RimSummaryCalculationAddress RimSummaryCalculation::singleAddressesForCategory(
|
||||
{
|
||||
std::string name = shortName().toStdString();
|
||||
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category = address.category();
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_FIELD )
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category = address.category();
|
||||
if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_FIELD )
|
||||
{
|
||||
return RifEclipseSummaryAddress::fieldAddress( name, m_id );
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_AQUIFER )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_AQUIFER )
|
||||
{
|
||||
return RifEclipseSummaryAddress::aquiferAddress( name, address.aquiferNumber(), m_id );
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_MISC )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_MISC )
|
||||
{
|
||||
return RifEclipseSummaryAddress::miscAddress( name, m_id );
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_NETWORK )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_NETWORK )
|
||||
{
|
||||
return RifEclipseSummaryAddress::networkAddress( name, address.networkName(), m_id );
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_WELL )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL )
|
||||
{
|
||||
return RifEclipseSummaryAddress::wellAddress( name, address.wellName(), m_id );
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_GROUP )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP )
|
||||
{
|
||||
return RifEclipseSummaryAddress::groupAddress( name, address.groupName(), m_id );
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_REGION )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION )
|
||||
{
|
||||
return RifEclipseSummaryAddress::regionAddress( name, address.regionNumber(), m_id );
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION_2_REGION )
|
||||
{
|
||||
return RifEclipseSummaryAddress::regionToRegionAddress( name, address.regionNumber(), address.regionNumber2(), m_id );
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_IMPORTED )
|
||||
else if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_IMPORTED )
|
||||
{
|
||||
return RifEclipseSummaryAddress::importedAddress( name, m_id );
|
||||
}
|
||||
|
@@ -77,7 +77,7 @@ protected:
|
||||
|
||||
static void substituteVariables( std::vector<SummaryCalculationVariable>& vars, const RifEclipseSummaryAddress& address );
|
||||
|
||||
std::vector<RimSummaryCalculationAddress> allAddressesForCategory( RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
std::vector<RimSummaryCalculationAddress> allAddressesForCategory( RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
const std::set<RifEclipseSummaryAddress>& allResultAddresses ) const;
|
||||
|
||||
RimSummaryCalculationAddress singleAddressesForCategory( const RifEclipseSummaryAddress& address ) const;
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include "cafPdmPtrField.h"
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RimPlotCurve.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
|
@@ -18,8 +18,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "RimDerivedSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
|
||||
|
@@ -18,9 +18,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifEclipseSummaryAddressQMetaType.h"
|
||||
|
||||
#include "RimObjectiveFunction.h"
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
|
@@ -449,7 +449,7 @@ void RimEnsembleCurveSet::deleteEnsembleCurves()
|
||||
for ( size_t c = 0; c < m_curves.size(); c++ )
|
||||
{
|
||||
RimSummaryCurve* curve = m_curves[c];
|
||||
if ( curve->summaryAddressY().category() != RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
if ( curve->summaryAddressY().category() != RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
curvesIndexesToDelete.push_back( c );
|
||||
}
|
||||
|
||||
@@ -471,7 +471,7 @@ void RimEnsembleCurveSet::deleteStatisticsCurves()
|
||||
for ( size_t c = 0; c < m_curves.size(); c++ )
|
||||
{
|
||||
RimSummaryCurve* curve = m_curves[c];
|
||||
if ( curve->summaryAddressY().category() == RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
if ( curve->summaryAddressY().category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
curvesIndexesToDelete.push_back( c );
|
||||
}
|
||||
|
||||
@@ -583,7 +583,7 @@ void RimEnsembleCurveSet::updateAllCurves()
|
||||
RimSummaryCaseCollection* group = m_yValuesSummaryCaseCollection();
|
||||
RimSummaryAddress* addr = m_yValuesSummaryAddress();
|
||||
|
||||
if ( group && addr->address().category() != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
if ( group && addr->address().category() != RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
std::vector<RimSummaryCase*> allCases = group->allSummaryCases();
|
||||
std::vector<RimSummaryCase*> filteredCases = filterEnsembleCases( allCases );
|
||||
@@ -1669,7 +1669,8 @@ void RimEnsembleCurveSet::updateCurveColors()
|
||||
std::vector<RimSummaryCase*> summaryCases;
|
||||
for ( auto& curve : m_curves )
|
||||
{
|
||||
if ( curve->summaryAddressY().category() == RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS ) continue;
|
||||
if ( curve->summaryAddressY().category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
continue;
|
||||
|
||||
curvesToColor.push_back( curve );
|
||||
summaryCases.push_back( curve->summaryCaseY() );
|
||||
@@ -1784,7 +1785,7 @@ void RimEnsembleCurveSet::updateEnsembleCurves( const std::vector<RimSummaryCase
|
||||
setLeftOrRightAxisY( axisY() );
|
||||
|
||||
RimSummaryAddress* addr = m_yValuesSummaryAddress();
|
||||
if ( plot && addr->address().category() != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
if ( plot && addr->address().category() != RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
if ( isCurvesVisible() )
|
||||
{
|
||||
@@ -1854,7 +1855,8 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector<RimSummaryCa
|
||||
RimSummaryCaseCollection* group = m_yValuesSummaryCaseCollection();
|
||||
RimSummaryAddress* addr = m_yValuesSummaryAddress();
|
||||
|
||||
if ( !isCurvesVisible() || m_disableStatisticCurves || !group || addr->address().category() == RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
if ( !isCurvesVisible() || m_disableStatisticCurves || !group ||
|
||||
addr->address().category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID )
|
||||
return;
|
||||
|
||||
// Calculate
|
||||
|
@@ -21,12 +21,11 @@
|
||||
#include "RiaDateTimeDefines.h"
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "RimSummaryCase.h"
|
||||
|
||||
class RifEnsembleStatisticsReader;
|
||||
class RimEnsembleCurveSet;
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
|
@@ -43,7 +43,8 @@ RimObservedSummaryData::RimObservedSummaryData()
|
||||
m_useCustomIdentifier.uiCapability()->setUiHidden( true );
|
||||
CAF_PDM_InitField( &m_summaryCategory,
|
||||
"SummaryType",
|
||||
caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>( RifEclipseSummaryAddress::SUMMARY_WELL ),
|
||||
caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryVarCategory>(
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL ),
|
||||
"Summary Type" );
|
||||
m_summaryCategory.uiCapability()->setUiHidden( true );
|
||||
CAF_PDM_InitFieldNoDefault( &m_identifierName, "IdentifierName", "Identifier Name" );
|
||||
@@ -71,7 +72,7 @@ QString RimObservedSummaryData::identifierName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseSummaryAddress::SummaryVarCategory RimObservedSummaryData::summaryCategory() const
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory RimObservedSummaryData::summaryCategory() const
|
||||
{
|
||||
return m_summaryCategory();
|
||||
}
|
||||
@@ -101,7 +102,7 @@ void RimObservedSummaryData::updateMetaData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimObservedSummaryData::customWellName() const
|
||||
{
|
||||
if ( m_useCustomIdentifier() && m_summaryCategory() == RifEclipseSummaryAddress::SUMMARY_WELL )
|
||||
if ( m_useCustomIdentifier() && m_summaryCategory() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL )
|
||||
{
|
||||
return m_identifierName();
|
||||
}
|
||||
@@ -118,11 +119,11 @@ QList<caf::PdmOptionItemInfo> RimObservedSummaryData::calculateValueOptions( con
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
using AddressAppEnum = caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>;
|
||||
options.push_back( caf::PdmOptionItemInfo( AddressAppEnum::uiText( RifEclipseSummaryAddress::SUMMARY_WELL ),
|
||||
RifEclipseSummaryAddress::SUMMARY_WELL ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( AddressAppEnum::uiText( RifEclipseSummaryAddress::SUMMARY_GROUP ),
|
||||
RifEclipseSummaryAddress::SUMMARY_GROUP ) );
|
||||
using AddressAppEnum = caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryVarCategory>;
|
||||
options.push_back( caf::PdmOptionItemInfo( AddressAppEnum::uiText( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL ),
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( AddressAppEnum::uiText( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP ),
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP ) );
|
||||
|
||||
return options;
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "RimSummaryCase.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
@@ -38,8 +38,8 @@ public:
|
||||
|
||||
QString caseName() const override;
|
||||
|
||||
QString identifierName() const;
|
||||
RifEclipseSummaryAddress::SummaryVarCategory summaryCategory() const;
|
||||
QString identifierName() const;
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory summaryCategory() const;
|
||||
|
||||
void updateMetaData();
|
||||
|
||||
@@ -51,9 +51,9 @@ private:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
private:
|
||||
caf::PdmField<caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>> m_summaryCategory;
|
||||
caf::PdmField<QString> m_identifierName;
|
||||
caf::PdmField<bool> m_useCustomIdentifier;
|
||||
caf::PdmField<caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryVarCategory>> m_summaryCategory;
|
||||
caf::PdmField<QString> m_identifierName;
|
||||
caf::PdmField<bool> m_useCustomIdentifier;
|
||||
|
||||
caf::PdmField<QString> m_importedSummaryData;
|
||||
};
|
||||
|
@@ -29,9 +29,9 @@
|
||||
namespace caf
|
||||
{
|
||||
template <>
|
||||
void caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>::setUp()
|
||||
void caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryVarCategory>::setUp()
|
||||
{
|
||||
using RifAdr = RifEclipseSummaryAddress;
|
||||
using RifAdr = RifEclipseSummaryAddressDefines::SummaryVarCategory;
|
||||
|
||||
addItem( RifAdr::SUMMARY_FIELD, "SUMMARY_FIELD", RiaDefines::summaryField() );
|
||||
addItem( RifAdr::SUMMARY_AQUIFER, "SUMMARY_AQUIFER", RiaDefines::summaryAquifer() );
|
||||
@@ -82,7 +82,7 @@ RimSummaryAddress::RimSummaryAddress()
|
||||
CAF_PDM_InitField( &m_caseId, "CaseId", -1, "CaseId" );
|
||||
CAF_PDM_InitField( &m_ensembleId, "EnsembleId", -1, "EnsembleId" );
|
||||
|
||||
m_category = RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
m_category = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID;
|
||||
m_regionNumber = -1;
|
||||
m_regionNumber2 = -1;
|
||||
m_wellSegmentNumber = -1;
|
||||
@@ -186,14 +186,14 @@ RiaDefines::PhaseType RimSummaryAddress::addressPhaseType() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimSummaryAddress::keywordForCategory( RifEclipseSummaryAddress::SummaryVarCategory category ) const
|
||||
QString RimSummaryAddress::keywordForCategory( RifEclipseSummaryAddressDefines::SummaryVarCategory category ) const
|
||||
{
|
||||
// Return the keyword text for supported field replacement in plot templates
|
||||
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_WELL ) return m_wellName.keyword();
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_GROUP ) return m_groupName.keyword();
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_REGION ) return m_regionNumber.keyword();
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_NETWORK ) return m_networkName.keyword();
|
||||
if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL ) return m_wellName.keyword();
|
||||
if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP ) return m_groupName.keyword();
|
||||
if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION ) return m_regionNumber.keyword();
|
||||
if ( category == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_NETWORK ) return m_networkName.keyword();
|
||||
|
||||
return {};
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ public:
|
||||
|
||||
RiaDefines::PhaseType addressPhaseType() const;
|
||||
|
||||
QString keywordForCategory( RifEclipseSummaryAddress::SummaryVarCategory category ) const;
|
||||
QString keywordForCategory( RifEclipseSummaryAddressDefines::SummaryVarCategory category ) const;
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
@@ -68,7 +68,7 @@ protected:
|
||||
QString iconResourceText() const;
|
||||
|
||||
private:
|
||||
caf::PdmField<caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>> m_category;
|
||||
caf::PdmField<caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryVarCategory>> m_category;
|
||||
|
||||
caf::PdmField<QString> m_vectorName;
|
||||
caf::PdmField<int> m_regionNumber;
|
||||
|
@@ -26,6 +26,8 @@
|
||||
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
|
||||
using namespace RifEclipseSummaryAddressDefines;
|
||||
|
||||
template <>
|
||||
void caf::AppEnum<RimSummaryAddressCollection::CollectionContentType>::setUp()
|
||||
{
|
||||
@@ -210,27 +212,27 @@ void RimSummaryAddressCollection::updateFolderStructure( const std::set<RifEclip
|
||||
{
|
||||
switch ( address.category() )
|
||||
{
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_FIELD:
|
||||
case SummaryVarCategory::SUMMARY_FIELD:
|
||||
fields->addAddress( address, caseId, ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_AQUIFER:
|
||||
case SummaryVarCategory::SUMMARY_AQUIFER:
|
||||
aquifer->addToSubfolder( QString::number( address.aquiferNumber() ), CollectionContentType::AQUIFER, address, caseId, ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_NETWORK:
|
||||
case SummaryVarCategory::SUMMARY_NETWORK:
|
||||
networks->addToSubfolder( QString::fromStdString( address.networkName() ), CollectionContentType::NETWORK, address, caseId, ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_MISC:
|
||||
case SummaryVarCategory::SUMMARY_MISC:
|
||||
misc->addAddress( address, caseId, ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_REGION:
|
||||
case SummaryVarCategory::SUMMARY_REGION:
|
||||
regions->addToSubfolder( QString::number( address.regionNumber() ), CollectionContentType::REGION, address, caseId, ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_REGION_2_REGION:
|
||||
case SummaryVarCategory::SUMMARY_REGION_2_REGION:
|
||||
region2region->addToSubfolder( QString::fromStdString( address.itemUiText() ),
|
||||
CollectionContentType::REGION_2_REGION,
|
||||
address,
|
||||
@@ -238,15 +240,15 @@ void RimSummaryAddressCollection::updateFolderStructure( const std::set<RifEclip
|
||||
ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_GROUP:
|
||||
case SummaryVarCategory::SUMMARY_GROUP:
|
||||
groups->addToSubfolder( QString::fromStdString( address.groupName() ), CollectionContentType::GROUP, address, caseId, ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL:
|
||||
case SummaryVarCategory::SUMMARY_WELL:
|
||||
wells->addToSubfolder( QString::fromStdString( address.wellName() ), CollectionContentType::WELL, address, caseId, ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL_COMPLETION:
|
||||
case SummaryVarCategory::SUMMARY_WELL_COMPLETION:
|
||||
completion->addToSubfolderTree( { QString::fromStdString( address.wellName() ),
|
||||
QString::fromStdString( address.blockAsString() ) },
|
||||
CollectionContentType::WELL_COMPLETION,
|
||||
@@ -255,7 +257,7 @@ void RimSummaryAddressCollection::updateFolderStructure( const std::set<RifEclip
|
||||
ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL_SEGMENT:
|
||||
case SummaryVarCategory::SUMMARY_WELL_SEGMENT:
|
||||
segment->addToSubfolderTree( { QString::fromStdString( address.wellName() ), QString::number( address.wellSegmentNumber() ) },
|
||||
CollectionContentType::WELL_SEGMENT,
|
||||
address,
|
||||
@@ -263,11 +265,11 @@ void RimSummaryAddressCollection::updateFolderStructure( const std::set<RifEclip
|
||||
ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_BLOCK:
|
||||
case SummaryVarCategory::SUMMARY_BLOCK:
|
||||
blocks->addToSubfolder( QString::fromStdString( address.blockAsString() ), CollectionContentType::BLOCK, address, caseId, ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL_LGR:
|
||||
case SummaryVarCategory::SUMMARY_WELL_LGR:
|
||||
lgrwell->addToSubfolderTree( { QString::fromStdString( address.lgrName() ), QString::fromStdString( address.wellName() ) },
|
||||
CollectionContentType::WELL_LGR,
|
||||
address,
|
||||
@@ -275,7 +277,7 @@ void RimSummaryAddressCollection::updateFolderStructure( const std::set<RifEclip
|
||||
ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR:
|
||||
case SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR:
|
||||
lgrcompletion->addToSubfolderTree( { QString::fromStdString( address.lgrName() ),
|
||||
QString::fromStdString( address.wellName() ),
|
||||
QString::fromStdString( address.blockAsString() ) },
|
||||
@@ -285,7 +287,7 @@ void RimSummaryAddressCollection::updateFolderStructure( const std::set<RifEclip
|
||||
ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_BLOCK_LGR:
|
||||
case SummaryVarCategory::SUMMARY_BLOCK_LGR:
|
||||
lgrblock->addToSubfolderTree( { QString::fromStdString( address.lgrName() ), QString::fromStdString( address.blockAsString() ) },
|
||||
CollectionContentType::BLOCK_LGR,
|
||||
address,
|
||||
@@ -293,7 +295,7 @@ void RimSummaryAddressCollection::updateFolderStructure( const std::set<RifEclip
|
||||
ensembleId );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_IMPORTED:
|
||||
case SummaryVarCategory::SUMMARY_IMPORTED:
|
||||
imported->addAddress( address, caseId, ensembleId );
|
||||
break;
|
||||
|
||||
|
@@ -798,7 +798,7 @@ double RimSummaryCurve::computeCurveZValue()
|
||||
{
|
||||
zOrder = RiuQwtPlotCurveDefines::zDepthForIndex( RiuQwtPlotCurveDefines::ZIndex::Z_SINGLE_CURVE_OBSERVED );
|
||||
}
|
||||
else if ( sumAddr.category() == RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
else if ( sumAddr.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
{
|
||||
zOrder = RiuQwtPlotCurveDefines::zDepthForIndex( RiuQwtPlotCurveDefines::ZIndex::Z_ENSEMBLE_STAT_CURVE );
|
||||
}
|
||||
|
@@ -90,7 +90,7 @@ public:
|
||||
void updatePlotAxis();
|
||||
void applyCurveAutoNameSettings( const RimSummaryCurveAutoName& autoNameSettings );
|
||||
|
||||
QString curveExportDescription( const RifEclipseSummaryAddress& address = RifEclipseSummaryAddress() ) const override;
|
||||
QString curveExportDescription( const RifEclipseSummaryAddress& address ) const override;
|
||||
void setCurveAppearanceFromCaseType();
|
||||
void setDefaultCurveAppearance();
|
||||
|
||||
|
@@ -696,7 +696,7 @@ std::set<std::string> RimSummaryCurveAppearanceCalculator::getAllSummaryWellName
|
||||
|
||||
for ( auto& address : allAddresses )
|
||||
{
|
||||
if ( address.category() == RifEclipseSummaryAddress::SUMMARY_WELL )
|
||||
if ( address.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL )
|
||||
{
|
||||
summaryWellNames.insert( address.wellName() );
|
||||
}
|
||||
|
@@ -215,7 +215,7 @@ QString RimSummaryCurveAutoName::buildCurveName( const RifEclipseSummaryAddress&
|
||||
}
|
||||
}
|
||||
|
||||
if ( summaryAddress.category() == RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
if ( summaryAddress.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
{
|
||||
text = summaryAddress.vectorName();
|
||||
}
|
||||
@@ -265,7 +265,7 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string&
|
||||
{
|
||||
switch ( summaryAddress.category() )
|
||||
{
|
||||
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_AQUIFER:
|
||||
{
|
||||
if ( m_aquiferNumber )
|
||||
{
|
||||
@@ -274,7 +274,7 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string&
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION:
|
||||
{
|
||||
if ( m_regionNumber )
|
||||
{
|
||||
@@ -287,7 +287,7 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string&
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION_2_REGION:
|
||||
{
|
||||
if ( m_regionNumber )
|
||||
{
|
||||
@@ -297,7 +297,7 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string&
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_GROUP:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP:
|
||||
{
|
||||
if ( m_groupName )
|
||||
{
|
||||
@@ -310,7 +310,7 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string&
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_NETWORK:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_NETWORK:
|
||||
{
|
||||
bool skipSubString = nameHelper && nameHelper->isNetworkInTitle();
|
||||
if ( !skipSubString )
|
||||
@@ -320,12 +320,12 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string&
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL:
|
||||
{
|
||||
appendWellName( text, summaryAddress, nameHelper );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION:
|
||||
{
|
||||
appendWellName( text, summaryAddress, nameHelper );
|
||||
|
||||
@@ -341,13 +341,13 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string&
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_LGR:
|
||||
{
|
||||
appendLgrName( text, summaryAddress );
|
||||
appendWellName( text, summaryAddress, nameHelper );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR:
|
||||
{
|
||||
appendLgrName( text, summaryAddress );
|
||||
appendWellName( text, summaryAddress, nameHelper );
|
||||
@@ -364,7 +364,7 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string&
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_SEGMENT:
|
||||
{
|
||||
appendWellName( text, summaryAddress, nameHelper );
|
||||
|
||||
@@ -379,7 +379,7 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string&
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK:
|
||||
{
|
||||
if ( m_completion )
|
||||
{
|
||||
@@ -393,7 +393,7 @@ void RimSummaryCurveAutoName::appendAddressDetails( std::string&
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK_LGR:
|
||||
{
|
||||
appendLgrName( text, summaryAddress );
|
||||
|
||||
|
@@ -49,7 +49,7 @@ void RimSummaryCurvesData::populateTimeHistoryCurvesData( std::vector<RimGridTim
|
||||
if ( !curve->isChecked() ) continue;
|
||||
QString curveCaseName = curve->caseName();
|
||||
|
||||
CurveData curveData = { curve->curveExportDescription(), RifEclipseSummaryAddress(), curve->yValues() };
|
||||
CurveData curveData = { curve->curveExportDescription( {} ), RifEclipseSummaryAddress(), curve->yValues() };
|
||||
|
||||
curvesData->addCurveData( curveCaseName, "", curve->timeStepValues(), curveData );
|
||||
}
|
||||
@@ -68,7 +68,7 @@ void RimSummaryCurvesData::populateAsciiDataCurvesData( std::vector<RimAsciiData
|
||||
{
|
||||
if ( !curve->isChecked() ) continue;
|
||||
|
||||
CurveData curveData = { curve->curveExportDescription(), RifEclipseSummaryAddress(), curve->yValues() };
|
||||
CurveData curveData = { curve->curveExportDescription( {} ), RifEclipseSummaryAddress(), curve->yValues() };
|
||||
|
||||
curvesData->addCurveDataNoSearch( "", "", curve->timeSteps(), { curveData } );
|
||||
}
|
||||
@@ -203,7 +203,7 @@ void RimSummaryCurvesData::populateSummaryCurvesData( std::vector<RimSummaryCurv
|
||||
ensembleName = curve->curveDefinitionY().ensemble()->name();
|
||||
}
|
||||
|
||||
CurveData curveData = { curve->curveExportDescription(), curve->summaryAddressY(), curve->valuesY() };
|
||||
CurveData curveData = { curve->curveExportDescription( {} ), curve->summaryAddressY(), curve->valuesY() };
|
||||
CurveData errorCurveData;
|
||||
|
||||
// Error data
|
||||
|
@@ -409,7 +409,7 @@ QString RimSummaryDeclineCurve::createCurveAutoName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimSummaryDeclineCurve::curveExportDescription( const RifEclipseSummaryAddress& address ) const
|
||||
{
|
||||
return RimSummaryCurve::curveExportDescription() + "." + m_declineCurveType().uiText() + "_Decline";
|
||||
return RimSummaryCurve::curveExportDescription( {} ) + "." + m_declineCurveType().uiText() + "_Decline";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@@ -2311,28 +2311,28 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleAddressCollectionDrop( RimSummar
|
||||
auto newCurveDef = curveDef;
|
||||
auto curveAdr = newCurveDef.summaryAddress();
|
||||
std::string objectIdentifierString;
|
||||
if ( ( curveAdr.category() == RifEclipseSummaryAddress::SUMMARY_WELL ) &&
|
||||
if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL ) &&
|
||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL ) )
|
||||
{
|
||||
objectIdentifierString = curveAdr.wellName();
|
||||
curveAdr.setWellName( droppedName );
|
||||
newCurveDef.setSummaryAddress( curveAdr );
|
||||
}
|
||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddress::SUMMARY_GROUP ) &&
|
||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP ) &&
|
||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::GROUP ) )
|
||||
{
|
||||
objectIdentifierString = curveAdr.groupName();
|
||||
curveAdr.setGroupName( droppedName );
|
||||
newCurveDef.setSummaryAddress( curveAdr );
|
||||
}
|
||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddress::SUMMARY_NETWORK ) &&
|
||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_NETWORK ) &&
|
||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::NETWORK ) )
|
||||
{
|
||||
objectIdentifierString = curveAdr.networkName();
|
||||
curveAdr.setNetworkName( droppedName );
|
||||
newCurveDef.setSummaryAddress( curveAdr );
|
||||
}
|
||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddress::SUMMARY_REGION ) &&
|
||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION ) &&
|
||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION ) )
|
||||
{
|
||||
objectIdentifierString = std::to_string( curveAdr.regionNumber() );
|
||||
@@ -2342,7 +2342,7 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleAddressCollectionDrop( RimSummar
|
||||
curveAdr.setRegion( droppedRegion );
|
||||
newCurveDef.setSummaryAddress( curveAdr );
|
||||
}
|
||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT ) &&
|
||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_SEGMENT ) &&
|
||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_SEGMENT ) )
|
||||
{
|
||||
objectIdentifierString = std::to_string( curveAdr.wellSegmentNumber() );
|
||||
@@ -2804,7 +2804,7 @@ void RimSummaryPlot::updateNameHelperWithCurveData( RimSummaryPlotNameHelper* na
|
||||
{
|
||||
sumCases.push_back( curve->summaryCaseX() );
|
||||
|
||||
if ( curve->summaryAddressX().category() != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
if ( curve->summaryAddressX().category() != RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
addresses.push_back( curve->summaryAddressX() );
|
||||
}
|
||||
|
@@ -21,8 +21,6 @@
|
||||
#include "RiaDateTimeDefines.h"
|
||||
#include "RiaPlotDefines.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "RimPlot.h"
|
||||
#include "RimSummaryDataSourceStepping.h"
|
||||
|
||||
@@ -62,6 +60,7 @@ class RimPlotTemplateFileItem;
|
||||
class RimSummaryPlotSourceStepping;
|
||||
class RimTimeAxisAnnotation;
|
||||
class RiaSummaryCurveDefinition;
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
class QwtInterval;
|
||||
class QwtPlotCurve;
|
||||
|
@@ -20,8 +20,6 @@
|
||||
|
||||
#include "RimSummaryNameHelper.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "cafPdmPointer.h"
|
||||
|
||||
#include <QString>
|
||||
@@ -34,6 +32,7 @@ class RimSummaryCurve;
|
||||
class RimSummaryCase;
|
||||
class RimSummaryCaseCollection;
|
||||
class RiaSummaryAddressAnalyzer;
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
|
@@ -52,6 +52,8 @@
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
using namespace RifEclipseSummaryAddressDefines;
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimSummaryPlotSourceStepping, "RimSummaryCurveCollectionModifier" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -253,47 +255,47 @@ QList<caf::PdmOptionItemInfo> RimSummaryPlotSourceStepping::calculateValueOption
|
||||
}
|
||||
else
|
||||
{
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category = RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
std::string secondaryIdentifier;
|
||||
SummaryVarCategory category = SummaryVarCategory::SUMMARY_INVALID;
|
||||
std::string secondaryIdentifier;
|
||||
|
||||
if ( fieldNeedingOptions == &m_wellName )
|
||||
{
|
||||
category = RifEclipseSummaryAddress::SUMMARY_WELL;
|
||||
category = SummaryVarCategory::SUMMARY_WELL;
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_region )
|
||||
{
|
||||
category = RifEclipseSummaryAddress::SUMMARY_REGION;
|
||||
category = SummaryVarCategory::SUMMARY_REGION;
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_groupName )
|
||||
{
|
||||
category = RifEclipseSummaryAddress::SUMMARY_GROUP;
|
||||
category = SummaryVarCategory::SUMMARY_GROUP;
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_networkName )
|
||||
{
|
||||
category = RifEclipseSummaryAddress::SUMMARY_NETWORK;
|
||||
category = SummaryVarCategory::SUMMARY_NETWORK;
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_cellBlock )
|
||||
{
|
||||
category = RifEclipseSummaryAddress::SUMMARY_BLOCK;
|
||||
category = SummaryVarCategory::SUMMARY_BLOCK;
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_wellSegment )
|
||||
{
|
||||
secondaryIdentifier = m_wellName().toStdString();
|
||||
category = RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT;
|
||||
category = SummaryVarCategory::SUMMARY_WELL_SEGMENT;
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_completion )
|
||||
{
|
||||
secondaryIdentifier = m_wellName().toStdString();
|
||||
category = RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION;
|
||||
category = SummaryVarCategory::SUMMARY_WELL_COMPLETION;
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_aquifer )
|
||||
{
|
||||
category = RifEclipseSummaryAddress::SUMMARY_AQUIFER;
|
||||
category = SummaryVarCategory::SUMMARY_AQUIFER;
|
||||
}
|
||||
|
||||
std::vector<QString> identifierTexts;
|
||||
|
||||
if ( category != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
if ( category != SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
identifierTexts = analyzer->identifierTexts( category, secondaryIdentifier );
|
||||
}
|
||||
@@ -443,41 +445,41 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
|
||||
if ( changedField != &m_vectorName )
|
||||
{
|
||||
RifEclipseSummaryAddress::SummaryVarCategory summaryCategoryToModify = RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
SummaryVarCategory summaryCategoryToModify = SummaryVarCategory::SUMMARY_INVALID;
|
||||
if ( changedField == &m_wellName )
|
||||
{
|
||||
summaryCategoryToModify = RifEclipseSummaryAddress::SUMMARY_WELL;
|
||||
summaryCategoryToModify = SummaryVarCategory::SUMMARY_WELL;
|
||||
}
|
||||
else if ( changedField == &m_region )
|
||||
{
|
||||
summaryCategoryToModify = RifEclipseSummaryAddress::SUMMARY_REGION;
|
||||
summaryCategoryToModify = SummaryVarCategory::SUMMARY_REGION;
|
||||
}
|
||||
else if ( changedField == &m_groupName )
|
||||
{
|
||||
summaryCategoryToModify = RifEclipseSummaryAddress::SUMMARY_GROUP;
|
||||
summaryCategoryToModify = SummaryVarCategory::SUMMARY_GROUP;
|
||||
}
|
||||
else if ( changedField == &m_networkName )
|
||||
{
|
||||
summaryCategoryToModify = RifEclipseSummaryAddress::SUMMARY_NETWORK;
|
||||
summaryCategoryToModify = SummaryVarCategory::SUMMARY_NETWORK;
|
||||
}
|
||||
else if ( changedField == &m_cellBlock )
|
||||
{
|
||||
summaryCategoryToModify = RifEclipseSummaryAddress::SUMMARY_BLOCK;
|
||||
summaryCategoryToModify = SummaryVarCategory::SUMMARY_BLOCK;
|
||||
}
|
||||
else if ( changedField == &m_wellSegment )
|
||||
{
|
||||
summaryCategoryToModify = RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT;
|
||||
summaryCategoryToModify = SummaryVarCategory::SUMMARY_WELL_SEGMENT;
|
||||
}
|
||||
else if ( changedField == &m_completion )
|
||||
{
|
||||
summaryCategoryToModify = RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION;
|
||||
summaryCategoryToModify = SummaryVarCategory::SUMMARY_WELL_COMPLETION;
|
||||
}
|
||||
else if ( changedField == &m_aquifer )
|
||||
{
|
||||
summaryCategoryToModify = RifEclipseSummaryAddress::SUMMARY_AQUIFER;
|
||||
summaryCategoryToModify = SummaryVarCategory::SUMMARY_AQUIFER;
|
||||
}
|
||||
|
||||
if ( summaryCategoryToModify != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
if ( summaryCategoryToModify != SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
for ( auto curve : curves )
|
||||
{
|
||||
@@ -743,7 +745,7 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::activeFieldsForD
|
||||
RiaSummaryAddressAnalyzer analyzer;
|
||||
analyzer.appendAddresses( addressesForCurvesInPlot() );
|
||||
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category = RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
SummaryVarCategory category = SummaryVarCategory::SUMMARY_INVALID;
|
||||
|
||||
if ( !analyzer.categories().empty() )
|
||||
{
|
||||
@@ -764,12 +766,12 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::activeFieldsForD
|
||||
|
||||
if ( allCategoriesAreDependingOnWellName )
|
||||
{
|
||||
category = RifEclipseSummaryAddress::SUMMARY_WELL;
|
||||
category = SummaryVarCategory::SUMMARY_WELL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( category != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
if ( category != SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
if ( analyzer.wellNames().size() == 1 )
|
||||
{
|
||||
@@ -1018,7 +1020,7 @@ RifEclipseSummaryAddress RimSummaryPlotSourceStepping::stepAddress( RifEclipseSu
|
||||
{
|
||||
case RimSummaryDataSourceStepping::SourceSteppingDimension::WELL:
|
||||
{
|
||||
auto ids = analyzer.identifierTexts( RifEclipseSummaryAddress::SUMMARY_WELL, "" );
|
||||
auto ids = analyzer.identifierTexts( SummaryVarCategory::SUMMARY_WELL, "" );
|
||||
auto searchString = QString::fromStdString( addr.wellName() );
|
||||
auto found = getIdIterator( ids, searchString );
|
||||
if ( found != ids.end() ) addr.setWellName( ( *found ).toStdString() );
|
||||
@@ -1027,7 +1029,7 @@ RifEclipseSummaryAddress RimSummaryPlotSourceStepping::stepAddress( RifEclipseSu
|
||||
|
||||
case RimSummaryDataSourceStepping::SourceSteppingDimension::GROUP:
|
||||
{
|
||||
auto ids = analyzer.identifierTexts( RifEclipseSummaryAddress::SUMMARY_GROUP, "" );
|
||||
auto ids = analyzer.identifierTexts( SummaryVarCategory::SUMMARY_GROUP, "" );
|
||||
auto searchString = QString::fromStdString( addr.groupName() );
|
||||
auto found = getIdIterator( ids, searchString );
|
||||
if ( found != ids.end() ) addr.setGroupName( ( *found ).toStdString() );
|
||||
@@ -1036,7 +1038,7 @@ RifEclipseSummaryAddress RimSummaryPlotSourceStepping::stepAddress( RifEclipseSu
|
||||
|
||||
case RimSummaryDataSourceStepping::SourceSteppingDimension::NETWORK:
|
||||
{
|
||||
auto ids = analyzer.identifierTexts( RifEclipseSummaryAddress::SUMMARY_NETWORK, "" );
|
||||
auto ids = analyzer.identifierTexts( SummaryVarCategory::SUMMARY_NETWORK, "" );
|
||||
auto searchString = QString::fromStdString( addr.networkName() );
|
||||
auto found = getIdIterator( ids, searchString );
|
||||
if ( found != ids.end() ) addr.setNetworkName( ( *found ).toStdString() );
|
||||
@@ -1045,7 +1047,7 @@ RifEclipseSummaryAddress RimSummaryPlotSourceStepping::stepAddress( RifEclipseSu
|
||||
|
||||
case RimSummaryDataSourceStepping::SourceSteppingDimension::REGION:
|
||||
{
|
||||
auto ids = analyzer.identifierTexts( RifEclipseSummaryAddress::SUMMARY_REGION, "" );
|
||||
auto ids = analyzer.identifierTexts( SummaryVarCategory::SUMMARY_REGION, "" );
|
||||
auto searchString = QString::number( addr.regionNumber() );
|
||||
auto found = getIdIterator( ids, searchString );
|
||||
if ( found != ids.end() ) addr.setRegion( ( *found ).toInt() );
|
||||
@@ -1070,7 +1072,7 @@ RifEclipseSummaryAddress RimSummaryPlotSourceStepping::stepAddress( RifEclipseSu
|
||||
|
||||
case RimSummaryDataSourceStepping::SourceSteppingDimension::BLOCK:
|
||||
{
|
||||
auto ids = analyzer.identifierTexts( RifEclipseSummaryAddress::SUMMARY_BLOCK, "" );
|
||||
auto ids = analyzer.identifierTexts( SummaryVarCategory::SUMMARY_BLOCK, "" );
|
||||
auto searchString = QString::fromStdString( addr.blockAsString() );
|
||||
auto found = getIdIterator( ids, searchString );
|
||||
if ( found != ids.end() ) addr.setCellIjk( ( *found ).toStdString() );
|
||||
@@ -1079,7 +1081,7 @@ RifEclipseSummaryAddress RimSummaryPlotSourceStepping::stepAddress( RifEclipseSu
|
||||
|
||||
case RimSummaryDataSourceStepping::SourceSteppingDimension::AQUIFER:
|
||||
{
|
||||
auto ids = analyzer.identifierTexts( RifEclipseSummaryAddress::SUMMARY_AQUIFER, "" );
|
||||
auto ids = analyzer.identifierTexts( SummaryVarCategory::SUMMARY_AQUIFER, "" );
|
||||
auto searchString = QString::number( addr.aquiferNumber() );
|
||||
auto found = getIdIterator( ids, searchString );
|
||||
if ( found != ids.end() ) addr.setAquiferNumber( ( *found ).toInt() );
|
||||
@@ -1188,7 +1190,7 @@ void RimSummaryPlotSourceStepping::setStep( QString stepIdentifier )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<QString, QString> RimSummaryPlotSourceStepping::optionsForQuantity( std::set<RifEclipseSummaryAddress> addresses )
|
||||
{
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category = RifEclipseSummaryAddress::SUMMARY_FIELD;
|
||||
SummaryVarCategory category = SummaryVarCategory::SUMMARY_FIELD;
|
||||
|
||||
auto visibleCurveAddresses = addressesForCurvesInPlot();
|
||||
if ( !visibleCurveAddresses.empty() )
|
||||
@@ -1221,7 +1223,7 @@ std::map<QString, QString> RimSummaryPlotSourceStepping::optionsForQuantity( std
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<QString, QString> RimSummaryPlotSourceStepping::optionsForQuantity( RiaSummaryAddressAnalyzer* analyzser )
|
||||
{
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category = RifEclipseSummaryAddress::SUMMARY_FIELD;
|
||||
SummaryVarCategory category = SummaryVarCategory::SUMMARY_FIELD;
|
||||
|
||||
auto visibleCurveAddresses = addressesForCurvesInPlot();
|
||||
if ( !visibleCurveAddresses.empty() )
|
||||
|
@@ -364,7 +364,7 @@ QString RimSummaryRegressionAnalysisCurve::createCurveAutoName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimSummaryRegressionAnalysisCurve::curveExportDescription( const RifEclipseSummaryAddress& address ) const
|
||||
{
|
||||
return RimSummaryCurve::curveExportDescription() + "." + m_regressionType().uiText() + "_Regression";
|
||||
return RimSummaryCurve::curveExportDescription( {} ) + "." + m_regressionType().uiText() + "_Regression";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@@ -74,7 +74,7 @@ RimSummaryTable::RimSummaryTable()
|
||||
m_vector.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() );
|
||||
CAF_PDM_InitFieldNoDefault( &m_category, "Categories", "Category" );
|
||||
m_category.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() );
|
||||
m_category = RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL;
|
||||
m_category = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL;
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_resamplingSelection, "ResamplingSelection", "Date Resampling" );
|
||||
m_resamplingSelection.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() );
|
||||
@@ -128,7 +128,7 @@ void RimSummaryTable::setDefaultCaseAndCategoryAndVectorName()
|
||||
{
|
||||
const auto summaryCases = getToplevelSummaryCases();
|
||||
m_case = nullptr;
|
||||
m_category = RifEclipseSummaryAddress::SUMMARY_WELL;
|
||||
m_category = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL;
|
||||
m_vector = "";
|
||||
|
||||
m_tableName = createTableName();
|
||||
@@ -150,9 +150,9 @@ void RimSummaryTable::setDefaultCaseAndCategoryAndVectorName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryTable::setFromCaseAndCategoryAndVectorName( RimSummaryCase* summaryCase,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
const QString& vectorName )
|
||||
void RimSummaryTable::setFromCaseAndCategoryAndVectorName( RimSummaryCase* summaryCase,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
const QString& vectorName )
|
||||
{
|
||||
m_case = summaryCase;
|
||||
m_category = category;
|
||||
@@ -354,15 +354,15 @@ QList<caf::PdmOptionItemInfo> RimSummaryTable::calculateValueOptions( const caf:
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_category )
|
||||
{
|
||||
options.push_back( caf::PdmOptionItemInfo( caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>::uiText(
|
||||
RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL ),
|
||||
RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>::uiText(
|
||||
RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_GROUP ),
|
||||
RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_GROUP ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>::uiText(
|
||||
RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_REGION ),
|
||||
RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_REGION ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryVarCategory>::uiText(
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL ),
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryVarCategory>::uiText(
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP ),
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryVarCategory>::uiText(
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION ),
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION ) );
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_vector && m_case )
|
||||
{
|
||||
@@ -603,7 +603,7 @@ QString RimSummaryTable::dateFormatString() const
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<RifEclipseSummaryAddress> RimSummaryTable::getSummaryAddressesFromReader( const RifSummaryReaderInterface* summaryReader,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
const QString& vector ) const
|
||||
{
|
||||
if ( !summaryReader ) return {};
|
||||
@@ -622,13 +622,13 @@ std::set<RifEclipseSummaryAddress> RimSummaryTable::getSummaryAddressesFromReade
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<QString> RimSummaryTable::getCategoryVectorFromSummaryReader( const RifSummaryReaderInterface* summaryReader,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category ) const
|
||||
std::set<QString> RimSummaryTable::getCategoryVectorFromSummaryReader( const RifSummaryReaderInterface* summaryReader,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category ) const
|
||||
{
|
||||
if ( !summaryReader ) return {};
|
||||
if ( category != RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL &&
|
||||
category != RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_GROUP &&
|
||||
category != RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_REGION )
|
||||
if ( category != RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL &&
|
||||
category != RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP &&
|
||||
category != RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION )
|
||||
{
|
||||
return {};
|
||||
}
|
||||
@@ -649,15 +649,15 @@ std::set<QString> RimSummaryTable::getCategoryVectorFromSummaryReader( const Rif
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimSummaryTable::getCategoryNameFromAddress( const RifEclipseSummaryAddress& address ) const
|
||||
{
|
||||
if ( address.category() == RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL )
|
||||
if ( address.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL )
|
||||
{
|
||||
return QString::fromStdString( address.wellName() );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_GROUP )
|
||||
else if ( address.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP )
|
||||
{
|
||||
return QString::fromStdString( address.groupName() );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_REGION )
|
||||
else if ( address.category() == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION )
|
||||
{
|
||||
return QString( "Region %1" ).arg( address.regionNumber() );
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "RiaDateTimeDefines.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
|
||||
#include "RimRegularLegendConfig.h"
|
||||
#include "RimSummaryTableTools.h"
|
||||
@@ -38,6 +38,7 @@ class RifSummaryReaderInterface;
|
||||
class RimSummaryCase;
|
||||
class RimRegularLegendConfig;
|
||||
class RiuMatrixPlotWidget;
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -58,9 +59,9 @@ public:
|
||||
~RimSummaryTable() override;
|
||||
|
||||
void setDefaultCaseAndCategoryAndVectorName();
|
||||
void setFromCaseAndCategoryAndVectorName( RimSummaryCase* summaryCase,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
const QString& vectorName );
|
||||
void setFromCaseAndCategoryAndVectorName( RimSummaryCase* summaryCase,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
const QString& vectorName );
|
||||
void setDescription( const QString& description );
|
||||
QString description() const override;
|
||||
|
||||
@@ -97,11 +98,11 @@ private:
|
||||
std::pair<double, double> createLegendMinMaxValues( const double maxTableValue ) const;
|
||||
QString dateFormatString() const;
|
||||
|
||||
std::set<RifEclipseSummaryAddress> getSummaryAddressesFromReader( const RifSummaryReaderInterface* summaryReader,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
const QString& vector ) const;
|
||||
std::set<QString> getCategoryVectorFromSummaryReader( const RifSummaryReaderInterface* summaryReader,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category ) const;
|
||||
std::set<RifEclipseSummaryAddress> getSummaryAddressesFromReader( const RifSummaryReaderInterface* summaryReader,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
const QString& vector ) const;
|
||||
std::set<QString> getCategoryVectorFromSummaryReader( const RifSummaryReaderInterface* summaryReader,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category ) const;
|
||||
QString getCategoryNameFromAddress( const RifEclipseSummaryAddress& address ) const;
|
||||
|
||||
std::vector<RimSummaryCase*> getToplevelSummaryCases() const;
|
||||
@@ -114,10 +115,10 @@ private:
|
||||
caf::PdmField<bool> m_isAutomaticName;
|
||||
caf::PdmPtrField<RimSummaryCase*> m_case;
|
||||
|
||||
caf::PdmField<caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>> m_category;
|
||||
caf::PdmField<QString> m_vector;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::DateTimePeriod>> m_resamplingSelection;
|
||||
caf::PdmField<double> m_thresholdValue;
|
||||
caf::PdmField<caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryVarCategory>> m_category;
|
||||
caf::PdmField<QString> m_vector;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::DateTimePeriod>> m_resamplingSelection;
|
||||
caf::PdmField<double> m_thresholdValue;
|
||||
|
||||
caf::PdmField<std::vector<QString>> m_excludedRowsUiField;
|
||||
|
||||
|
@@ -128,9 +128,10 @@ RimSummaryTable* RimSummaryTableCollection::createDefaultSummaryTable()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryTable* RimSummaryTableCollection::createSummaryTableFromCategoryAndVectorName( RimSummaryCase* summaryCase,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
const QString& vectorName )
|
||||
RimSummaryTable*
|
||||
RimSummaryTableCollection::createSummaryTableFromCategoryAndVectorName( RimSummaryCase* summaryCase,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
const QString& vectorName )
|
||||
{
|
||||
RimSummaryTable* table = new RimSummaryTable();
|
||||
table->setFromCaseAndCategoryAndVectorName( summaryCase, category, vectorName );
|
||||
|
@@ -18,6 +18,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
|
||||
#include "RimAbstractPlotCollection.h"
|
||||
#include "RimSummaryTable.h"
|
||||
|
||||
@@ -49,9 +51,9 @@ public:
|
||||
void removeTable( RimSummaryTable* table );
|
||||
|
||||
RimSummaryTable* createDefaultSummaryTable();
|
||||
RimSummaryTable* createSummaryTableFromCategoryAndVectorName( RimSummaryCase* summaryCase,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
const QString& vectorName );
|
||||
RimSummaryTable* createSummaryTableFromCategoryAndVectorName( RimSummaryCase* summaryCase,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
const QString& vectorName );
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimSummaryTable*> m_summaryTables;
|
||||
|
@@ -991,7 +991,7 @@ TEST( RifKeywordBasedRsmspecParserTest, TestAddressCreation )
|
||||
RifEclipseSummaryAddress address = RifEclipseUserDataKeywordTools::makeAndFillAddress( quantityName, headerColumn );
|
||||
|
||||
EXPECT_TRUE( address.isValid() );
|
||||
EXPECT_EQ( address.category(), RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR );
|
||||
EXPECT_EQ( address.category(), RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR );
|
||||
EXPECT_EQ( address.uiText(), "LCABC:lgrName:wellName:12,14,16" );
|
||||
}
|
||||
|
||||
|
@@ -168,6 +168,6 @@ TEST( RiaSummaryAddressAnalyzer, QuantitiesPerCategory )
|
||||
auto categories = analyzer.categories();
|
||||
EXPECT_EQ( 2u, categories.size() );
|
||||
|
||||
auto vectorNamesForWells = analyzer.vectorNamesForCategory( RifEclipseSummaryAddress::SUMMARY_WELL );
|
||||
auto vectorNamesForWells = analyzer.vectorNamesForCategory( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL );
|
||||
EXPECT_EQ( 3u, vectorNamesForWells.size() );
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_Field )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_FIELD, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_FIELD, addr.category() );
|
||||
EXPECT_EQ( "FOPT", addr.vectorName() );
|
||||
EXPECT_FALSE( addr.isErrorResult() );
|
||||
}
|
||||
@@ -30,7 +30,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_Aquifer )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_AQUIFER, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_AQUIFER, addr.category() );
|
||||
EXPECT_EQ( "AAQR", addr.vectorName() );
|
||||
EXPECT_EQ( 456, addr.aquiferNumber() );
|
||||
EXPECT_FALSE( addr.isErrorResult() );
|
||||
@@ -43,7 +43,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_Network )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_NETWORK, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_NETWORK, addr.category() );
|
||||
EXPECT_EQ( "NETW", addr.vectorName() );
|
||||
EXPECT_FALSE( addr.isErrorResult() );
|
||||
}
|
||||
@@ -55,7 +55,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_Network_name )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_NETWORK, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_NETWORK, addr.category() );
|
||||
EXPECT_EQ( "NETW", addr.vectorName() );
|
||||
EXPECT_EQ( "MYNAME", addr.networkName() );
|
||||
EXPECT_FALSE( addr.isErrorResult() );
|
||||
@@ -68,7 +68,7 @@ TEST( RifEclipseSummaryAddressTest, DISABLED_TestEclipseAddressParsing_Misc )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_MISC, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_MISC, addr.category() );
|
||||
EXPECT_EQ( "CPU", addr.vectorName() );
|
||||
EXPECT_FALSE( addr.isErrorResult() );
|
||||
}
|
||||
@@ -80,7 +80,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_Region )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_REGION, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION, addr.category() );
|
||||
EXPECT_EQ( "RPR", addr.vectorName() );
|
||||
EXPECT_EQ( 7081, addr.regionNumber() );
|
||||
EXPECT_FALSE( addr.isErrorResult() );
|
||||
@@ -93,7 +93,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_RegionToRegion )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION_2_REGION, addr.category() );
|
||||
EXPECT_EQ( "ROFR", addr.vectorName() );
|
||||
EXPECT_EQ( 7081, addr.regionNumber() );
|
||||
EXPECT_EQ( 8001, addr.regionNumber2() );
|
||||
@@ -107,7 +107,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_WellGroup )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_GROUP, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP, addr.category() );
|
||||
EXPECT_EQ( "GOPR", addr.vectorName() );
|
||||
EXPECT_EQ( "WELLS1", addr.groupName() );
|
||||
EXPECT_FALSE( addr.isErrorResult() );
|
||||
@@ -120,7 +120,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_Well )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_WELL, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL, addr.category() );
|
||||
EXPECT_EQ( "WOPR", addr.vectorName() );
|
||||
EXPECT_EQ( "B-2H", addr.wellName() );
|
||||
EXPECT_FALSE( addr.isErrorResult() );
|
||||
@@ -133,7 +133,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_WellCompletion )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION, addr.category() );
|
||||
EXPECT_EQ( "COFRL", addr.vectorName() );
|
||||
EXPECT_EQ( "B-1H", addr.wellName() );
|
||||
EXPECT_EQ( 15, addr.cellI() );
|
||||
@@ -149,7 +149,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_WellLgr )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_WELL_LGR, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_LGR, addr.category() );
|
||||
EXPECT_EQ( "LWABC", addr.vectorName() );
|
||||
EXPECT_EQ( "LGRNA", addr.lgrName() );
|
||||
EXPECT_EQ( "B-10H", addr.wellName() );
|
||||
@@ -163,7 +163,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_WellCompletionLgr
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR, addr.category() );
|
||||
EXPECT_EQ( "LCGAS", addr.vectorName() );
|
||||
EXPECT_EQ( "LGR1", addr.lgrName() );
|
||||
EXPECT_EQ( "B-1H", addr.wellName() );
|
||||
@@ -180,7 +180,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_WellSegment )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_SEGMENT, addr.category() );
|
||||
EXPECT_EQ( "SOFR", addr.vectorName() );
|
||||
EXPECT_EQ( "B-5H", addr.wellName() );
|
||||
EXPECT_EQ( 32, addr.wellSegmentNumber() );
|
||||
@@ -194,7 +194,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_Block )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_BLOCK, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK, addr.category() );
|
||||
EXPECT_EQ( "BPR", addr.vectorName() );
|
||||
EXPECT_EQ( 123, addr.cellI() );
|
||||
EXPECT_EQ( 122, addr.cellJ() );
|
||||
@@ -209,7 +209,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_BlockLgr )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK_LGR, addr.category() );
|
||||
EXPECT_EQ( "LBABC", addr.vectorName() );
|
||||
EXPECT_EQ( "LGRN", addr.lgrName() );
|
||||
EXPECT_EQ( 45, addr.cellI() );
|
||||
@@ -225,7 +225,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_Imported )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_IMPORTED, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_IMPORTED, addr.category() );
|
||||
EXPECT_EQ( "FAULT (Imp)", addr.vectorName() );
|
||||
EXPECT_FALSE( addr.isErrorResult() );
|
||||
}
|
||||
@@ -237,7 +237,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_ErrorResult1 )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_AQUIFER, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_AQUIFER, addr.category() );
|
||||
EXPECT_EQ( "AAQR", addr.vectorName() );
|
||||
EXPECT_EQ( 456, addr.aquiferNumber() );
|
||||
EXPECT_TRUE( addr.isErrorResult() );
|
||||
@@ -250,7 +250,7 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_ErrorResult2 )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR, addr.category() );
|
||||
EXPECT_EQ( "LCGAS", addr.vectorName() );
|
||||
EXPECT_EQ( "LGR1", addr.lgrName() );
|
||||
EXPECT_EQ( "B-1H", addr.wellName() );
|
||||
@@ -267,24 +267,24 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressParsing_ErrorResult3 )
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fromEclipseTextAddressParseErrorTokens( addrString );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_IMPORTED, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_IMPORTED, addr.category() );
|
||||
EXPECT_EQ( "FAULT (Imp)", addr.vectorName() );
|
||||
EXPECT_TRUE( addr.isErrorResult() );
|
||||
}
|
||||
|
||||
TEST( RifEclipseSummaryAddressTest, TestEclipseAddressIjkParsing )
|
||||
{
|
||||
RifEclipseSummaryAddress::SummaryVarCategory cat = RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION;
|
||||
std::map<RifEclipseSummaryAddress::SummaryIdentifierType, std::string> identifiers( {
|
||||
{ RifEclipseSummaryAddress::INPUT_WELL_NAME, "1-BH" },
|
||||
{ RifEclipseSummaryAddress::INPUT_CELL_IJK, "6, 7, 8" },
|
||||
{ RifEclipseSummaryAddress::INPUT_VECTOR_NAME, "WOPR" },
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory cat = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION;
|
||||
std::map<RifEclipseSummaryAddressDefines::SummaryIdentifierType, std::string> identifiers( {
|
||||
{ RifEclipseSummaryAddressDefines::SummaryIdentifierType::INPUT_WELL_NAME, "1-BH" },
|
||||
{ RifEclipseSummaryAddressDefines::SummaryIdentifierType::INPUT_CELL_IJK, "6, 7, 8" },
|
||||
{ RifEclipseSummaryAddressDefines::SummaryIdentifierType::INPUT_VECTOR_NAME, "WOPR" },
|
||||
} );
|
||||
|
||||
RifEclipseSummaryAddress addr( cat, identifiers );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION, addr.category() );
|
||||
EXPECT_EQ( "WOPR", addr.vectorName() );
|
||||
EXPECT_EQ( "1-BH", addr.wellName() );
|
||||
EXPECT_EQ( 6, addr.cellI() );
|
||||
@@ -295,16 +295,16 @@ TEST( RifEclipseSummaryAddressTest, TestEclipseAddressIjkParsing )
|
||||
|
||||
TEST( RifEclipseSummaryAddressTest, TestEclipseAddressRegToRegParsing )
|
||||
{
|
||||
RifEclipseSummaryAddress::SummaryVarCategory cat = RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION;
|
||||
std::map<RifEclipseSummaryAddress::SummaryIdentifierType, std::string> identifiers( {
|
||||
{ RifEclipseSummaryAddress::INPUT_REGION_2_REGION, "123 - 456" },
|
||||
{ RifEclipseSummaryAddress::INPUT_VECTOR_NAME, "ROFR" },
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory cat = RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION_2_REGION;
|
||||
std::map<RifEclipseSummaryAddressDefines::SummaryIdentifierType, std::string> identifiers( {
|
||||
{ RifEclipseSummaryAddressDefines::SummaryIdentifierType::INPUT_REGION_2_REGION, "123 - 456" },
|
||||
{ RifEclipseSummaryAddressDefines::SummaryIdentifierType::INPUT_VECTOR_NAME, "ROFR" },
|
||||
} );
|
||||
|
||||
RifEclipseSummaryAddress addr( cat, identifiers );
|
||||
|
||||
EXPECT_TRUE( addr.isValid() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION, addr.category() );
|
||||
EXPECT_EQ( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION_2_REGION, addr.category() );
|
||||
EXPECT_EQ( "ROFR", addr.vectorName() );
|
||||
EXPECT_EQ( 123, addr.regionNumber() );
|
||||
EXPECT_EQ( 456, addr.regionNumber2() );
|
||||
|
@@ -27,7 +27,7 @@ TEST( RifRevealCsvSectionSummaryReaderTest, ExpectedText )
|
||||
QString errorMessage;
|
||||
RifRevealCsvSectionSummaryReader reader;
|
||||
|
||||
bool isOk = reader.parse( fileContents, RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL, &errorMessage );
|
||||
bool isOk = reader.parse( fileContents, RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL, &errorMessage );
|
||||
ASSERT_TRUE( isOk );
|
||||
|
||||
EXPECT_TRUE( errorMessage.isEmpty() );
|
||||
@@ -46,6 +46,6 @@ TEST( RifRevealCsvSectionSummaryReaderTest, EmptyText )
|
||||
QString fileContents = "";
|
||||
QString errorMessage;
|
||||
|
||||
bool isOk = reader.parse( fileContents, RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_MISC, &errorMessage );
|
||||
bool isOk = reader.parse( fileContents, RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_MISC, &errorMessage );
|
||||
ASSERT_FALSE( isOk );
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@ TEST( RiuSummaryQuantityNameInfoProvider, TestInit )
|
||||
{
|
||||
std::string s( "SRSFC" );
|
||||
auto cat = RiuSummaryQuantityNameInfoProvider::instance()->identifyCategory( s );
|
||||
EXPECT_TRUE( cat == RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT );
|
||||
EXPECT_TRUE( cat == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_SEGMENT );
|
||||
|
||||
auto longName = RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( s );
|
||||
EXPECT_TRUE( longName == "Reach brine concentration" );
|
||||
@@ -27,7 +27,7 @@ TEST( RiuSummaryQuantityNameInfoProvider, TestInit )
|
||||
{
|
||||
std::string s( "does not exist" );
|
||||
auto cat = RiuSummaryQuantityNameInfoProvider::instance()->identifyCategory( s );
|
||||
EXPECT_TRUE( cat == RifEclipseSummaryAddress::SUMMARY_INVALID );
|
||||
EXPECT_TRUE( cat == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID );
|
||||
|
||||
auto longName = RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( s );
|
||||
|
||||
@@ -57,7 +57,7 @@ TEST( RiuSummaryQuantityNameInfoProvider, TestCustomNaming )
|
||||
{
|
||||
std::string s( "SRSFCABC" );
|
||||
auto cat = RiuSummaryQuantityNameInfoProvider::instance()->identifyCategory( s );
|
||||
EXPECT_TRUE( cat == RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT );
|
||||
EXPECT_TRUE( cat == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_SEGMENT );
|
||||
|
||||
auto longName = RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( s );
|
||||
EXPECT_TRUE( longName == "Reach brine concentration" );
|
||||
@@ -79,13 +79,13 @@ TEST( RiuSummaryQuantityNameInfoProvider, Test6x )
|
||||
{
|
||||
std::string s( "GLIT" );
|
||||
auto cat = RiuSummaryQuantityNameInfoProvider::instance()->identifyCategory( s );
|
||||
EXPECT_TRUE( cat == RifEclipseSummaryAddress::SUMMARY_GROUP );
|
||||
EXPECT_TRUE( cat == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP );
|
||||
}
|
||||
|
||||
{
|
||||
std::string s( "WSBVPROP" );
|
||||
auto cat = RiuSummaryQuantityNameInfoProvider::instance()->identifyCategory( s );
|
||||
EXPECT_TRUE( cat == RifEclipseSummaryAddress::SUMMARY_WELL );
|
||||
EXPECT_TRUE( cat == RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "RiuSummaryQuantityNameInfoProvider.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include <regex>
|
||||
#include <sstream>
|
||||
|
||||
@@ -62,36 +64,36 @@ RiuSummaryQuantityNameInfoProvider* RiuSummaryQuantityNameInfoProvider::instance
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseSummaryAddress::SummaryVarCategory RiuSummaryQuantityNameInfoProvider::identifyCategory( const std::string& vectorName )
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory RiuSummaryQuantityNameInfoProvider::identifyCategory( const std::string& vectorName )
|
||||
{
|
||||
// Try to an exact match on the vector name first in the vector table.
|
||||
bool exactMatch = true;
|
||||
auto exactCategory = categoryFromVectorName( vectorName, exactMatch );
|
||||
if ( exactCategory != RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_INVALID ) return exactCategory;
|
||||
if ( exactCategory != RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID ) return exactCategory;
|
||||
|
||||
if ( vectorName.size() < 3 || vectorName.size() > 8 ) return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_INVALID;
|
||||
if ( vectorName.size() < 3 || vectorName.size() > 8 ) return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID;
|
||||
|
||||
// Try to match the base vector name with more heuristics
|
||||
auto strippedQuantityName = RifEclipseSummaryAddress::baseVectorName( vectorName );
|
||||
|
||||
// First, try to lookup vector in vector table
|
||||
auto category = categoryFromVectorName( strippedQuantityName );
|
||||
if ( category != RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_INVALID ) return category;
|
||||
if ( category != RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID ) return category;
|
||||
|
||||
switch ( strippedQuantityName[0] )
|
||||
{
|
||||
case 'A':
|
||||
return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_AQUIFER;
|
||||
return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_AQUIFER;
|
||||
case 'B':
|
||||
return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_BLOCK;
|
||||
return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK;
|
||||
case 'F':
|
||||
return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_FIELD;
|
||||
return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_FIELD;
|
||||
case 'N':
|
||||
return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_NETWORK;
|
||||
return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_NETWORK;
|
||||
case 'S':
|
||||
return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL_SEGMENT;
|
||||
return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_SEGMENT;
|
||||
case 'W':
|
||||
return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL;
|
||||
return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -99,26 +101,26 @@ RifEclipseSummaryAddress::SummaryVarCategory RiuSummaryQuantityNameInfoProvider:
|
||||
if ( strippedQuantityName[0] == 'R' )
|
||||
{
|
||||
if ( ParseHelpers::is_region_to_region( strippedQuantityName ) )
|
||||
return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_REGION_2_REGION;
|
||||
return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION_2_REGION;
|
||||
|
||||
return RifEclipseSummaryAddress::SUMMARY_REGION;
|
||||
return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_REGION;
|
||||
}
|
||||
|
||||
// Then check LGR categories
|
||||
std::string firstTwoLetters = strippedQuantityName.substr( 0, 2 );
|
||||
|
||||
if ( firstTwoLetters == "LB" ) return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_BLOCK_LGR;
|
||||
if ( firstTwoLetters == "LC" ) return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR;
|
||||
if ( firstTwoLetters == "LW" ) return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL_LGR;
|
||||
if ( firstTwoLetters == "LB" ) return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_BLOCK_LGR;
|
||||
if ( firstTwoLetters == "LC" ) return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR;
|
||||
if ( firstTwoLetters == "LW" ) return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_LGR;
|
||||
|
||||
return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_INVALID;
|
||||
return RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseSummaryAddress::SummaryVarCategory RiuSummaryQuantityNameInfoProvider::categoryFromVectorName( const std::string& vectorName,
|
||||
bool exactMatch ) const
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory
|
||||
RiuSummaryQuantityNameInfoProvider::categoryFromVectorName( const std::string& vectorName, bool exactMatch ) const
|
||||
{
|
||||
auto info = quantityInfo( vectorName, exactMatch );
|
||||
|
||||
@@ -183,7 +185,8 @@ RiuSummaryQuantityNameInfoProvider::RiuSummaryQuantityInfo RiuSummaryQuantityNam
|
||||
std::string RiuSummaryQuantityNameInfoProvider::longNameFromVectorName( const std::string& vectorName, bool returnVectorNameIfNotFound ) const
|
||||
{
|
||||
auto info = quantityInfo( vectorName );
|
||||
return info.category != RifEclipseSummaryAddress::SUMMARY_INVALID || !returnVectorNameIfNotFound ? info.longName : vectorName;
|
||||
return info.category != RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID || !returnVectorNameIfNotFound ? info.longName
|
||||
: vectorName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -209,7 +212,7 @@ RiuSummaryQuantityNameInfoProvider::RiuSummaryQuantityNameInfoProvider()
|
||||
std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQuantityInfo>
|
||||
RiuSummaryQuantityNameInfoProvider::createInfoForEclipseKeywords()
|
||||
{
|
||||
using A = RifEclipseSummaryAddress;
|
||||
using A = RifEclipseSummaryAddressDefines::SummaryVarCategory;
|
||||
|
||||
std::unordered_map<std::string, RiuSummaryQuantityInfo> info;
|
||||
|
||||
@@ -2139,7 +2142,7 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
|
||||
std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQuantityInfo>
|
||||
RiuSummaryQuantityNameInfoProvider::createInfoFor6xKeywords()
|
||||
{
|
||||
using A = RifEclipseSummaryAddress;
|
||||
using A = RifEclipseSummaryAddressDefines::SummaryVarCategory;
|
||||
|
||||
std::unordered_map<std::string, RiuSummaryQuantityInfo> info;
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
@@ -31,7 +31,7 @@ class RiuSummaryQuantityNameInfoProvider
|
||||
public:
|
||||
static RiuSummaryQuantityNameInfoProvider* instance();
|
||||
|
||||
RifEclipseSummaryAddress::SummaryVarCategory identifyCategory( const std::string& vectorName );
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory identifyCategory( const std::string& vectorName );
|
||||
|
||||
std::string longNameFromVectorName( const std::string& vectorName, bool returnVectorNameIfNotFound = false ) const;
|
||||
|
||||
@@ -40,24 +40,24 @@ private:
|
||||
{
|
||||
public:
|
||||
RiuSummaryQuantityInfo()
|
||||
: category( RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
: category( RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
}
|
||||
RiuSummaryQuantityInfo( RifEclipseSummaryAddress::SummaryVarCategory category, const std::string& longName )
|
||||
RiuSummaryQuantityInfo( RifEclipseSummaryAddressDefines::SummaryVarCategory category, const std::string& longName )
|
||||
: category( category )
|
||||
, longName( longName )
|
||||
{
|
||||
}
|
||||
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category;
|
||||
std::string longName;
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory category;
|
||||
std::string longName;
|
||||
};
|
||||
|
||||
private:
|
||||
RiuSummaryQuantityNameInfoProvider();
|
||||
|
||||
RiuSummaryQuantityInfo quantityInfo( const std::string& vectorName, bool exactMatch = false ) const;
|
||||
RifEclipseSummaryAddress::SummaryVarCategory categoryFromVectorName( const std::string& vectorName, bool exactMatch = false ) const;
|
||||
RiuSummaryQuantityInfo quantityInfo( const std::string& vectorName, bool exactMatch = false ) const;
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory categoryFromVectorName( const std::string& vectorName, bool exactMatch = false ) const;
|
||||
|
||||
static std::unordered_map<std::string, RiuSummaryQuantityInfo> createInfoForEclipseKeywords();
|
||||
static std::unordered_map<std::string, RiuSummaryQuantityInfo> createInfoFor6xKeywords();
|
||||
|
@@ -49,6 +49,8 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace RifEclipseSummaryAddressDefines;
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RiuSummaryVectorSelectionUi, "RicSummaryAddressSelection" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -58,14 +60,14 @@ class SummaryIdentifierAndField
|
||||
{
|
||||
public:
|
||||
SummaryIdentifierAndField()
|
||||
: m_summaryIdentifier( (RifEclipseSummaryAddress::SummaryIdentifierType)0 )
|
||||
: m_summaryIdentifier( (SummaryIdentifierType)0 )
|
||||
, m_pdmField( nullptr )
|
||||
{
|
||||
}
|
||||
|
||||
SummaryIdentifierAndField( const SummaryIdentifierAndField& ) = delete;
|
||||
|
||||
SummaryIdentifierAndField( RifEclipseSummaryAddress::SummaryIdentifierType summaryIdentifier )
|
||||
SummaryIdentifierAndField( SummaryIdentifierType summaryIdentifier )
|
||||
: m_summaryIdentifier( summaryIdentifier )
|
||||
, m_pdmField( new caf::PdmField<std::vector<QString>>() )
|
||||
{
|
||||
@@ -73,12 +75,12 @@ public:
|
||||
|
||||
virtual ~SummaryIdentifierAndField();
|
||||
|
||||
RifEclipseSummaryAddress::SummaryIdentifierType summaryIdentifier() const { return m_summaryIdentifier; }
|
||||
caf::PdmField<std::vector<QString>>* pdmField() { return m_pdmField; }
|
||||
SummaryIdentifierType summaryIdentifier() const { return m_summaryIdentifier; }
|
||||
caf::PdmField<std::vector<QString>>* pdmField() { return m_pdmField; }
|
||||
|
||||
private:
|
||||
RifEclipseSummaryAddress::SummaryIdentifierType m_summaryIdentifier;
|
||||
caf::PdmField<std::vector<QString>>* m_pdmField;
|
||||
SummaryIdentifierType m_summaryIdentifier;
|
||||
caf::PdmField<std::vector<QString>>* m_pdmField;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -94,69 +96,69 @@ SummaryIdentifierAndField::~SummaryIdentifierAndField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
|
||||
: m_identifierFieldsMap( {
|
||||
{ RifEclipseSummaryAddress::SUMMARY_FIELD,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_AQUIFER,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_AQUIFER_NUMBER ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_NETWORK,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_NETWORK_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_MISC,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_REGION,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_REGION_NUMBER ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_REGION_2_REGION ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_GROUP,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_GROUP_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_WELL,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_LGR,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_SEGMENT_NUMBER ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_BLOCK,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_IMPORTED,
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_FIELD,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_AQUIFER,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_AQUIFER_NUMBER ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_NETWORK,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_NETWORK_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_MISC,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_REGION,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_REGION_NUMBER ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_REGION_2_REGION,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_REGION_2_REGION ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_GROUP,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_GROUP_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_WELL,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_WELL_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_WELL_COMPLETION,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_WELL_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_CELL_IJK ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_LGR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_WELL_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_CELL_IJK ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_WELL_LGR,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_LGR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_WELL_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_WELL_SEGMENT,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_WELL_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_SEGMENT_NUMBER ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_BLOCK,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_CELL_IJK ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_BLOCK_LGR,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_LGR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_CELL_IJK ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
{ SummaryVarCategory::SUMMARY_IMPORTED,
|
||||
{ new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_VECTOR_NAME ),
|
||||
new SummaryIdentifierAndField( SummaryIdentifierType::INPUT_ID ) } },
|
||||
|
||||
} )
|
||||
, m_showIndividualEnsembleCases( true )
|
||||
@@ -167,136 +169,114 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
|
||||
CAF_PDM_InitFieldNoDefault( &m_currentSummaryCategory, "CurrentSummaryCategory", "Current Summary Category" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_selectedSummaryCategories, "SelectedSummaryCategories", "Summary Categories" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_FIELD][0]->pdmField(), "FieldVectors", "Field vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_FIELD][1]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_FIELD][0]->pdmField(), "FieldVectors", "Field vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_FIELD][1]->pdmField(),
|
||||
"FieldCalculationIds",
|
||||
"Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][0]->pdmField(), "Aquifers", "Aquifers" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][1]->pdmField(),
|
||||
"AquiferVectors",
|
||||
"Aquifer Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][2]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_AQUIFER][0]->pdmField(), "Aquifers", "Aquifers" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_AQUIFER][1]->pdmField(), "AquiferVectors", "Aquifer Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_AQUIFER][2]->pdmField(),
|
||||
"AquifierCalculationIds",
|
||||
"Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_NETWORK][0]->pdmField(), "NetworkNames", "Networks" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_NETWORK][1]->pdmField(),
|
||||
"NetworkVectors",
|
||||
"Network Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_NETWORK][2]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_NETWORK][0]->pdmField(), "NetworkNames", "Networks" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_NETWORK][1]->pdmField(), "NetworkVectors", "Network Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_NETWORK][2]->pdmField(),
|
||||
"NetworkCalculationIds",
|
||||
"Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_MISC][0]->pdmField(), "MiscVectors", "Misc Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_MISC][1]->pdmField(),
|
||||
"MiscCalculationIds",
|
||||
"Calculation Ids" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_MISC][0]->pdmField(), "MiscVectors", "Misc Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_MISC][1]->pdmField(), "MiscCalculationIds", "Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION][0]->pdmField(), "Regions", "Regions" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION][1]->pdmField(),
|
||||
"RegionsVectors",
|
||||
"Regions Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION][2]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_REGION][0]->pdmField(), "Regions", "Regions" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_REGION][1]->pdmField(), "RegionsVectors", "Regions Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_REGION][2]->pdmField(),
|
||||
"RegionCalculationIds",
|
||||
"Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION][0]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_REGION_2_REGION][0]->pdmField(),
|
||||
"Region2RegionRegions",
|
||||
"Regions" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION][1]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_REGION_2_REGION][1]->pdmField(),
|
||||
"Region2RegionVectors",
|
||||
"Region2s Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION][2]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_REGION_2_REGION][2]->pdmField(),
|
||||
"Region2RegionCalculationIds",
|
||||
"Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_GROUP][0]->pdmField(),
|
||||
"WellGroupWellGroupNames",
|
||||
"Groups" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_GROUP][1]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_GROUP][0]->pdmField(), "WellGroupWellGroupNames", "Groups" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_GROUP][1]->pdmField(),
|
||||
"WellGroupVectors",
|
||||
"Well Group Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_GROUP][2]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_GROUP][2]->pdmField(),
|
||||
"WellGroupCalculationIds",
|
||||
"Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL][0]->pdmField(), "WellWellName", "Wells" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL][1]->pdmField(), "WellVectors", "Well Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL][2]->pdmField(),
|
||||
"WellCalculationIds",
|
||||
"Calculation Ids" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL][0]->pdmField(), "WellWellName", "Wells" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL][1]->pdmField(), "WellVectors", "Well Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL][2]->pdmField(), "WellCalculationIds", "Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION][0]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION][0]->pdmField(),
|
||||
"WellCompletionWellName",
|
||||
"Wells" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION][1]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION][1]->pdmField(),
|
||||
"WellCompletionIjk",
|
||||
"Cell IJK" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION][2]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION][2]->pdmField(),
|
||||
"WellCompletionVectors",
|
||||
"Well Completion Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION][3]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION][3]->pdmField(),
|
||||
"WellCompletionCalculationIds",
|
||||
"Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR][0]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR][0]->pdmField(),
|
||||
"WellCompletionLgrLgrName",
|
||||
"LGR Names" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR][1]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR][1]->pdmField(),
|
||||
"WellCompletionLgrWellName",
|
||||
"Wells" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR][2]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR][2]->pdmField(),
|
||||
"WellCompletionLgrIjk",
|
||||
"Cell IJK" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR][3]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR][3]->pdmField(),
|
||||
"WellCompletionLgrVectors",
|
||||
"Well Completion Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR][4]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR][4]->pdmField(),
|
||||
"WellCompletionLgrCalculationIds",
|
||||
"Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][0]->pdmField(), "WellLgrLgrName", "LGR Names" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][1]->pdmField(), "WellLgrWellName", "Wells" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][2]->pdmField(), "WellLgrVectors", "Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][3]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_LGR][0]->pdmField(), "WellLgrLgrName", "LGR Names" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_LGR][1]->pdmField(), "WellLgrWellName", "Wells" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_LGR][2]->pdmField(), "WellLgrVectors", "Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_LGR][3]->pdmField(),
|
||||
"WellLgrCalculationIds",
|
||||
"Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT][0]->pdmField(),
|
||||
"WellSegmentWellName",
|
||||
"Wells" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT][1]->pdmField(),
|
||||
"WellSegmentNumber",
|
||||
"Segments" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT][2]->pdmField(),
|
||||
"WellSegmentVectors",
|
||||
"Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT][3]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_SEGMENT][0]->pdmField(), "WellSegmentWellName", "Wells" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_SEGMENT][1]->pdmField(), "WellSegmentNumber", "Segments" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_SEGMENT][2]->pdmField(), "WellSegmentVectors", "Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_SEGMENT][3]->pdmField(),
|
||||
"WellSegmentCalculationIds",
|
||||
"Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK][0]->pdmField(), "BlockIjk", "Cell IJK" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK][1]->pdmField(), "BlockVectors", "Block Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK][2]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_BLOCK][0]->pdmField(), "BlockIjk", "Cell IJK" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_BLOCK][1]->pdmField(), "BlockVectors", "Block Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_BLOCK][2]->pdmField(),
|
||||
"BlockCalculationIds",
|
||||
"Calculation Ids" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR][0]->pdmField(),
|
||||
"BlockLgrLgrName",
|
||||
"LGR Names" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR][1]->pdmField(), "BlockLgrIjk", "Cell IJK" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR][2]->pdmField(),
|
||||
"BlockLgrVectors",
|
||||
"Block Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR][3]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_BLOCK_LGR][0]->pdmField(), "BlockLgrLgrName", "LGR Names" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_BLOCK_LGR][1]->pdmField(), "BlockLgrIjk", "Cell IJK" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_BLOCK_LGR][2]->pdmField(), "BlockLgrVectors", "Block Vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_BLOCK_LGR][3]->pdmField(),
|
||||
"BlockLgrCalculationIds",
|
||||
"CalculationIds" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_IMPORTED][0]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_IMPORTED][0]->pdmField(),
|
||||
"ImportedVectors",
|
||||
"Imported vectors" );
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_IMPORTED][1]->pdmField(),
|
||||
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_IMPORTED][1]->pdmField(),
|
||||
"ImportedCalculationIds",
|
||||
"Calculation Ids" );
|
||||
|
||||
@@ -668,7 +648,7 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
|
||||
{
|
||||
resetAllFields();
|
||||
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> categories;
|
||||
std::set<SummaryVarCategory> categories;
|
||||
for ( const auto& curveDef : curveDefinitions )
|
||||
{
|
||||
if ( !( curveDef.summaryCase() || curveDef.isEnsembleCurve() ) ) continue;
|
||||
@@ -678,14 +658,14 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
|
||||
RifEclipseSummaryAddress summaryAddress = curveDef.summaryAddress();
|
||||
|
||||
// Ignore ensemble statistics curves
|
||||
if ( summaryAddress.category() == RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS ) continue;
|
||||
if ( summaryAddress.category() == SummaryVarCategory::SUMMARY_ENSEMBLE_STATISTICS ) continue;
|
||||
|
||||
// Select summary category if not already selected
|
||||
auto& selectedCategories = m_selectedSummaryCategories();
|
||||
|
||||
if ( std::find( selectedCategories.begin(), selectedCategories.end(), summaryAddress.category() ) == selectedCategories.end() )
|
||||
{
|
||||
if ( summaryAddress.category() != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
if ( summaryAddress.category() != SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
m_selectedSummaryCategories.v().push_back( summaryAddress.category() );
|
||||
}
|
||||
@@ -723,7 +703,7 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
|
||||
auto identifierAndFieldList = m_identifierFieldsMap[summaryAddress.category()];
|
||||
for ( const auto& identifierAndField : identifierAndFieldList )
|
||||
{
|
||||
bool isVectorField = identifierAndField->summaryIdentifier() == RifEclipseSummaryAddress::INPUT_VECTOR_NAME;
|
||||
bool isVectorField = identifierAndField->summaryIdentifier() == SummaryIdentifierType::INPUT_VECTOR_NAME;
|
||||
QString avalue = QString::fromStdString( summaryAddress.addressComponentUiText( identifierAndField->summaryIdentifier() ) );
|
||||
if ( isVectorField && isObservedDataCase )
|
||||
{
|
||||
@@ -750,7 +730,7 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
|
||||
|
||||
if ( !categories.empty() )
|
||||
{
|
||||
RifEclipseSummaryAddress::SummaryVarCategory cat = *( categories.begin() );
|
||||
SummaryVarCategory cat = *( categories.begin() );
|
||||
m_currentSummaryCategory.setValue( cat );
|
||||
}
|
||||
|
||||
@@ -765,8 +745,8 @@ void RiuSummaryVectorSelectionUi::fieldChangedByUi( const caf::PdmFieldHandle* c
|
||||
{
|
||||
if ( changedField != &m_selectedSources && changedField != &m_selectedSummaryCategories && changedField != &m_currentSummaryCategory )
|
||||
{
|
||||
RifEclipseSummaryAddress::SummaryVarCategory currentCategory = m_currentSummaryCategory();
|
||||
if ( currentCategory != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
SummaryVarCategory currentCategory = m_currentSummaryCategory();
|
||||
if ( currentCategory != SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
// When a summary vector is selected, make sure the summary category for the summary vector is in the
|
||||
// selection Note that we use the size of the variant to avoid this operation when an item in unchecked
|
||||
@@ -785,7 +765,7 @@ void RiuSummaryVectorSelectionUi::fieldChangedByUi( const caf::PdmFieldHandle* c
|
||||
auto identifierAndFieldList = m_identifierFieldsMap[currentCategory];
|
||||
for ( const auto identifierAndField : identifierAndFieldList )
|
||||
{
|
||||
if ( identifierAndField->summaryIdentifier() == RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) continue;
|
||||
if ( identifierAndField->summaryIdentifier() == SummaryIdentifierType::INPUT_VECTOR_NAME ) continue;
|
||||
|
||||
auto v = identifierAndField->pdmField()->value();
|
||||
if ( v.empty() )
|
||||
@@ -866,137 +846,137 @@ void RiuSummaryVectorSelectionUi::defineUiOrdering( QString uiConfigName, caf::P
|
||||
|
||||
caf::PdmField<std::vector<QString>>* summaryiesField = nullptr;
|
||||
|
||||
RifEclipseSummaryAddress::SummaryVarCategory sumCategory = m_currentSummaryCategory();
|
||||
if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
SummaryVarCategory sumCategory = m_currentSummaryCategory();
|
||||
if ( sumCategory == SummaryVarCategory::SUMMARY_INVALID )
|
||||
{
|
||||
sumCategory = RifEclipseSummaryAddress::SUMMARY_FIELD;
|
||||
sumCategory = SummaryVarCategory::SUMMARY_FIELD;
|
||||
}
|
||||
|
||||
if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_FIELD )
|
||||
if ( sumCategory == SummaryVarCategory::SUMMARY_FIELD )
|
||||
{
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_FIELD][0]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_FIELD][0]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_AQUIFER )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_AQUIFER )
|
||||
{
|
||||
{
|
||||
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryAquifer() + "s" );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_AQUIFER][0]->pdmField() );
|
||||
}
|
||||
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][1]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_AQUIFER][1]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_NETWORK )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_NETWORK )
|
||||
{
|
||||
{
|
||||
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryNetwork() + "s" );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_NETWORK][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_NETWORK][0]->pdmField() );
|
||||
}
|
||||
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_NETWORK][1]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_NETWORK][1]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_MISC )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_MISC )
|
||||
{
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_MISC][0]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_MISC][0]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_REGION )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_REGION )
|
||||
{
|
||||
{
|
||||
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryRegion() + "s" );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_REGION][0]->pdmField() );
|
||||
}
|
||||
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION][1]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_REGION][1]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_REGION_2_REGION )
|
||||
{
|
||||
{
|
||||
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( "Regions" );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_REGION_2_REGION][0]->pdmField() );
|
||||
}
|
||||
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION][1]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_REGION_2_REGION][1]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_GROUP )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_GROUP )
|
||||
{
|
||||
{
|
||||
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryWellGroup() + "s" );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_GROUP][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_GROUP][0]->pdmField() );
|
||||
}
|
||||
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_GROUP][1]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_GROUP][1]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_WELL )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_WELL )
|
||||
{
|
||||
{
|
||||
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryWell() + "s" );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL][0]->pdmField() );
|
||||
}
|
||||
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL][1]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL][1]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_WELL_COMPLETION )
|
||||
{
|
||||
{
|
||||
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryCompletion() + "s" );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION][1]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION][1]->pdmField() );
|
||||
}
|
||||
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION][2]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION][2]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR )
|
||||
{
|
||||
{
|
||||
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryLgrCompletion() + "s" );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR][1]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR][2]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR][1]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR][2]->pdmField() );
|
||||
}
|
||||
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR][3]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR][3]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_WELL_LGR )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_WELL_LGR )
|
||||
{
|
||||
{
|
||||
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryLgrWell() + "s" );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][1]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_LGR][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_LGR][1]->pdmField() );
|
||||
}
|
||||
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][2]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_LGR][2]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_WELL_SEGMENT )
|
||||
{
|
||||
{
|
||||
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryWellSegment() + "s" );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT][1]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_SEGMENT][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_SEGMENT][1]->pdmField() );
|
||||
}
|
||||
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT][2]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_WELL_SEGMENT][2]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_BLOCK )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_BLOCK )
|
||||
{
|
||||
{
|
||||
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryBlock() + "s" );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_BLOCK][0]->pdmField() );
|
||||
}
|
||||
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK][1]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_BLOCK][1]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_BLOCK_LGR )
|
||||
{
|
||||
{
|
||||
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup( RiaDefines::summaryLgrBlock() + "s" );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR][1]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_BLOCK_LGR][0]->pdmField() );
|
||||
myGroup->add( m_identifierFieldsMap[SummaryVarCategory::SUMMARY_BLOCK_LGR][1]->pdmField() );
|
||||
}
|
||||
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR][2]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_BLOCK_LGR][2]->pdmField();
|
||||
}
|
||||
else if ( sumCategory == RifEclipseSummaryAddress::SUMMARY_IMPORTED )
|
||||
else if ( sumCategory == SummaryVarCategory::SUMMARY_IMPORTED )
|
||||
{
|
||||
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_IMPORTED][0]->pdmField();
|
||||
summaryiesField = m_identifierFieldsMap[SummaryVarCategory::SUMMARY_IMPORTED][0]->pdmField();
|
||||
}
|
||||
|
||||
caf::PdmUiGroup* summariesGroup = uiOrdering.addNewGroupWithKeyword( "Summaries", RiuSummaryCurveDefinitionKeywords::summaries() );
|
||||
@@ -1063,8 +1043,7 @@ std::set<RifEclipseSummaryAddress>
|
||||
{
|
||||
std::set<RifEclipseSummaryAddress> addrUnion;
|
||||
|
||||
auto isVectorField = identifierAndField != nullptr &&
|
||||
identifierAndField->summaryIdentifier() == RifEclipseSummaryAddress::INPUT_VECTOR_NAME;
|
||||
auto isVectorField = identifierAndField != nullptr && identifierAndField->summaryIdentifier() == SummaryIdentifierType::INPUT_VECTOR_NAME;
|
||||
auto controllingIdentifierAndField = identifierAndField != nullptr ? lookupControllingField( identifierAndField ) : nullptr;
|
||||
if ( !isVectorField && controllingIdentifierAndField != nullptr && controllingIdentifierAndField->pdmField()->v().size() == 0 )
|
||||
{
|
||||
@@ -1241,11 +1220,10 @@ std::set<RifEclipseSummaryAddress> RiuSummaryVectorSelectionUi::buildAddressList
|
||||
std::set<RifEclipseSummaryAddress> addressSet;
|
||||
for ( const auto& category : m_selectedSummaryCategories() )
|
||||
{
|
||||
if ( m_identifierFieldsMap.at( category ).size() == 0 || category == RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_INVALID )
|
||||
continue;
|
||||
if ( m_identifierFieldsMap.at( category ).size() == 0 || category == SummaryVarCategory::SUMMARY_INVALID ) continue;
|
||||
|
||||
const auto& identifierAndFieldList = m_identifierFieldsMap.at( category );
|
||||
std::vector<std::pair<RifEclipseSummaryAddress::SummaryIdentifierType, QString>> selectionStack;
|
||||
const auto& identifierAndFieldList = m_identifierFieldsMap.at( category );
|
||||
std::vector<std::pair<SummaryIdentifierType, QString>> selectionStack;
|
||||
buildAddressListForCategoryRecursively( category, identifierAndFieldList.begin(), selectionStack, addressSet );
|
||||
}
|
||||
return addressSet;
|
||||
@@ -1255,10 +1233,10 @@ std::set<RifEclipseSummaryAddress> RiuSummaryVectorSelectionUi::buildAddressList
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryVectorSelectionUi::buildAddressListForCategoryRecursively(
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
std::vector<SummaryIdentifierAndField*>::const_iterator identifierAndFieldItr,
|
||||
std::vector<std::pair<RifEclipseSummaryAddress::SummaryIdentifierType, QString>>& identifierPath,
|
||||
std::set<RifEclipseSummaryAddress>& addressSet ) const
|
||||
SummaryVarCategory category,
|
||||
std::vector<SummaryIdentifierAndField*>::const_iterator identifierAndFieldItr,
|
||||
std::vector<std::pair<SummaryIdentifierType, QString>>& identifierPath,
|
||||
std::set<RifEclipseSummaryAddress>& addressSet ) const
|
||||
|
||||
{
|
||||
for ( const auto& identifierText : ( *identifierAndFieldItr )->pdmField()->v() )
|
||||
@@ -1266,7 +1244,7 @@ void RiuSummaryVectorSelectionUi::buildAddressListForCategoryRecursively(
|
||||
auto idText = identifierText;
|
||||
|
||||
// Calculated results have a id appended. E.g. "Calculation_3 ( NORNE_ATW2013, WOPR:B-4H ):3"
|
||||
if ( ( *identifierAndFieldItr )->summaryIdentifier() == RifEclipseSummaryAddress::INPUT_VECTOR_NAME )
|
||||
if ( ( *identifierAndFieldItr )->summaryIdentifier() == SummaryIdentifierType::INPUT_VECTOR_NAME )
|
||||
{
|
||||
// Extract the calculation id
|
||||
QStringList tokens = idText.split( ":" );
|
||||
@@ -1278,20 +1256,20 @@ void RiuSummaryVectorSelectionUi::buildAddressListForCategoryRecursively(
|
||||
tokens.pop_back();
|
||||
idText = tokens.join( ":" );
|
||||
|
||||
identifierPath.push_back( std::make_pair( RifEclipseSummaryAddress::INPUT_ID, calculationId ) );
|
||||
identifierPath.push_back( std::make_pair( SummaryIdentifierType::INPUT_ID, calculationId ) );
|
||||
}
|
||||
}
|
||||
|
||||
idText.remove( OBSERVED_DATA_AVALUE_POSTFIX );
|
||||
identifierPath.push_back( std::make_pair( ( *identifierAndFieldItr )->summaryIdentifier(), idText ) );
|
||||
|
||||
if ( ( *identifierAndFieldItr )->summaryIdentifier() != RifEclipseSummaryAddress::INPUT_VECTOR_NAME )
|
||||
if ( ( *identifierAndFieldItr )->summaryIdentifier() != SummaryIdentifierType::INPUT_VECTOR_NAME )
|
||||
{
|
||||
buildAddressListForCategoryRecursively( category, std::next( identifierAndFieldItr, 1 ), identifierPath, addressSet );
|
||||
}
|
||||
else
|
||||
{
|
||||
std::map<RifEclipseSummaryAddress::SummaryIdentifierType, std::string> selectedIdentifiers;
|
||||
std::map<SummaryIdentifierType, std::string> selectedIdentifiers;
|
||||
for ( const auto& identifier : identifierPath )
|
||||
{
|
||||
selectedIdentifiers.insert( std::make_pair( identifier.first, identifier.second.toStdString() ) );
|
||||
@@ -1336,7 +1314,7 @@ void RiuSummaryVectorSelectionUi::defineEditorAttribute( const caf::PdmFieldHand
|
||||
void RiuSummaryVectorSelectionUi::resetAllFields()
|
||||
{
|
||||
m_selectedSources.clearWithoutDelete();
|
||||
m_selectedSummaryCategories = std::vector<caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>>();
|
||||
m_selectedSummaryCategories = std::vector<caf::AppEnum<SummaryVarCategory>>();
|
||||
|
||||
// clear all state in fields
|
||||
for ( auto& identifierAndFieldList : m_identifierFieldsMap )
|
||||
@@ -1392,31 +1370,31 @@ void RiuSummaryVectorSelectionUi::appendOptionItemsForSources( QList<caf::PdmOpt
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryVectorSelectionUi::appendOptionItemsForCategories( QList<caf::PdmOptionItemInfo>& options ) const
|
||||
{
|
||||
std::vector<RifEclipseSummaryAddress::SummaryVarCategory> sortedCategoriesForUi;
|
||||
std::vector<SummaryVarCategory> sortedCategoriesForUi;
|
||||
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_FIELD );
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_AQUIFER );
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_NETWORK );
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_MISC );
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_REGION );
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_REGION_2_REGION );
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_GROUP );
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL );
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL_COMPLETION );
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_BLOCK );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_FIELD );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_AQUIFER );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_NETWORK );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_MISC );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_REGION );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_REGION_2_REGION );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_GROUP );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_WELL );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_WELL_COMPLETION );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_BLOCK );
|
||||
|
||||
if ( !m_hideCalculationIncompatibleCategories )
|
||||
{
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL_SEGMENT );
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL_LGR );
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR );
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_BLOCK_LGR );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_WELL_SEGMENT );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_WELL_LGR );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_WELL_COMPLETION_LGR );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_BLOCK_LGR );
|
||||
}
|
||||
|
||||
sortedCategoriesForUi.push_back( RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_IMPORTED );
|
||||
sortedCategoriesForUi.push_back( SummaryVarCategory::SUMMARY_IMPORTED );
|
||||
|
||||
// NB SUMMARY_ENSEMBLE_STATISTICS is intentionally excluded
|
||||
// categoriesForUiDisplay.push_back(RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_ENSEMBLE_STATISTICS);
|
||||
// categoriesForUiDisplay.push_back(SummaryVarCategory::SUMMARY_ENSEMBLE_STATISTICS);
|
||||
|
||||
for ( auto category : sortedCategoriesForUi )
|
||||
{
|
||||
@@ -1446,7 +1424,7 @@ void RiuSummaryVectorSelectionUi::appendOptionItemsForSubCategoriesAndVectors( Q
|
||||
addrUnion[SUM_CASES] = findPossibleSummaryAddressesFromSelectedCases( identifierAndField );
|
||||
addrUnion[OBS_DATA] = findPossibleSummaryAddressesFromSelectedObservedData( identifierAndField );
|
||||
|
||||
bool isVectorField = identifierAndField->summaryIdentifier() == RifEclipseSummaryAddress::INPUT_VECTOR_NAME;
|
||||
bool isVectorField = identifierAndField->summaryIdentifier() == SummaryIdentifierType::INPUT_VECTOR_NAME;
|
||||
|
||||
std::set<std::string> itemNames[itemCount];
|
||||
for ( int i = 0; i < itemCount; i++ )
|
||||
@@ -1504,9 +1482,9 @@ void RiuSummaryVectorSelectionUi::appendOptionItemsForSubCategoriesAndVectors( Q
|
||||
{
|
||||
switch ( identifierAndField->summaryIdentifier() )
|
||||
{
|
||||
case RifEclipseSummaryAddress::INPUT_REGION_NUMBER:
|
||||
case RifEclipseSummaryAddress::INPUT_SEGMENT_NUMBER:
|
||||
case RifEclipseSummaryAddress::INPUT_AQUIFER_NUMBER:
|
||||
case SummaryIdentifierType::INPUT_REGION_NUMBER:
|
||||
case SummaryIdentifierType::INPUT_SEGMENT_NUMBER:
|
||||
case SummaryIdentifierType::INPUT_AQUIFER_NUMBER:
|
||||
{
|
||||
std::set<int> values;
|
||||
for ( const std::string& itemName : itemNames[i] )
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
@@ -38,6 +38,7 @@ class RimSummaryPlot;
|
||||
class RiaSummaryCurveDefinition;
|
||||
class RiaCurveSetDefinition;
|
||||
class SummaryIdentifierAndField;
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
using SummarySource = caf::PdmObject;
|
||||
|
||||
@@ -94,9 +95,9 @@ private:
|
||||
const std::vector<SummaryIdentifierAndField*>& identifierAndFieldList ) const;
|
||||
|
||||
std::set<RifEclipseSummaryAddress> buildAddressListFromSelections() const;
|
||||
void buildAddressListForCategoryRecursively( RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
void buildAddressListForCategoryRecursively( RifEclipseSummaryAddressDefines::SummaryVarCategory category,
|
||||
std::vector<SummaryIdentifierAndField*>::const_iterator identifierAndFieldItr,
|
||||
std::vector<std::pair<RifEclipseSummaryAddress::SummaryIdentifierType, QString>>& identifierPath,
|
||||
std::vector<std::pair<RifEclipseSummaryAddressDefines::SummaryIdentifierType, QString>>& identifierPath,
|
||||
std::set<RifEclipseSummaryAddress>& addressSet ) const;
|
||||
|
||||
void resetAllFields();
|
||||
@@ -112,10 +113,10 @@ private:
|
||||
private:
|
||||
caf::PdmPtrArrayField<SummarySource*> m_selectedSources;
|
||||
|
||||
caf::PdmField<std::vector<caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>>> m_selectedSummaryCategories;
|
||||
caf::PdmField<caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>> m_currentSummaryCategory;
|
||||
caf::PdmField<std::vector<caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryVarCategory>>> m_selectedSummaryCategories;
|
||||
caf::PdmField<caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryVarCategory>> m_currentSummaryCategory;
|
||||
|
||||
std::map<RifEclipseSummaryAddress::SummaryVarCategory, std::vector<SummaryIdentifierAndField*>> m_identifierFieldsMap;
|
||||
std::map<RifEclipseSummaryAddressDefines::SummaryVarCategory, std::vector<SummaryIdentifierAndField*>> m_identifierFieldsMap;
|
||||
|
||||
bool m_multiSelectionMode;
|
||||
|
||||
|
Reference in New Issue
Block a user