mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8893 Rename quantity name -> vector name
This commit is contained in:
@@ -361,8 +361,8 @@ void RimEnsembleCurveFilter::fieldChangedByUi( const caf::PdmFieldHandle* change
|
||||
|
||||
RifEclipseSummaryAddress candidateAdr = parentCurveSet()->summaryAddress();
|
||||
|
||||
auto nativeQuantityName = RimObjectiveFunctionTools::nativeQuantityName( candidateAdr.quantityName() );
|
||||
candidateAdr.setQuantityName( nativeQuantityName );
|
||||
auto nativeQuantityName = RimObjectiveFunctionTools::nativeQuantityName( candidateAdr.vectorName() );
|
||||
candidateAdr.setVectorName( nativeQuantityName );
|
||||
summaryAddress->setAddress( candidateAdr );
|
||||
m_objectiveValuesSummaryAddresses.push_back( summaryAddress );
|
||||
updateAddressesUiField();
|
||||
|
||||
@@ -1777,16 +1777,16 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector<RimSummaryCa
|
||||
|
||||
if ( m_statistics->showP10Curve() && m_ensembleStatCase->hasP10Data() )
|
||||
addresses.push_back(
|
||||
SAddr::ensembleStatisticsAddress( ENSEMBLE_STAT_P10_QUANTITY_NAME, dataAddress.quantityName() ) );
|
||||
SAddr::ensembleStatisticsAddress( ENSEMBLE_STAT_P10_QUANTITY_NAME, dataAddress.vectorName() ) );
|
||||
if ( m_statistics->showP50Curve() && m_ensembleStatCase->hasP50Data() )
|
||||
addresses.push_back(
|
||||
SAddr::ensembleStatisticsAddress( ENSEMBLE_STAT_P50_QUANTITY_NAME, dataAddress.quantityName() ) );
|
||||
SAddr::ensembleStatisticsAddress( ENSEMBLE_STAT_P50_QUANTITY_NAME, dataAddress.vectorName() ) );
|
||||
if ( m_statistics->showP90Curve() && m_ensembleStatCase->hasP90Data() )
|
||||
addresses.push_back(
|
||||
SAddr::ensembleStatisticsAddress( ENSEMBLE_STAT_P90_QUANTITY_NAME, dataAddress.quantityName() ) );
|
||||
SAddr::ensembleStatisticsAddress( ENSEMBLE_STAT_P90_QUANTITY_NAME, dataAddress.vectorName() ) );
|
||||
if ( m_statistics->showMeanCurve() && m_ensembleStatCase->hasMeanData() )
|
||||
addresses.push_back(
|
||||
SAddr::ensembleStatisticsAddress( ENSEMBLE_STAT_MEAN_QUANTITY_NAME, dataAddress.quantityName() ) );
|
||||
SAddr::ensembleStatisticsAddress( ENSEMBLE_STAT_MEAN_QUANTITY_NAME, dataAddress.vectorName() ) );
|
||||
}
|
||||
|
||||
deleteStatisticsCurves();
|
||||
@@ -1807,7 +1807,7 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector<RimSummaryCa
|
||||
curve->setSymbolSkipDistance( 150 );
|
||||
if ( m_statistics->showCurveLabels() )
|
||||
{
|
||||
curve->setSymbolLabel( QString::fromStdString( address.ensembleStatisticsQuantityName() ) );
|
||||
curve->setSymbolLabel( QString::fromStdString( address.ensembleStatisticsVectorName() ) );
|
||||
}
|
||||
curve->setLineStyle( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_SOLID );
|
||||
curve->setSummaryCaseY( m_ensembleStatCase.get() );
|
||||
@@ -2066,7 +2066,7 @@ void RimEnsembleCurveSet::updateLegendMappingMode()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuPlotCurveSymbol::PointSymbolEnum statisticsCurveSymbolFromAddress( const RifEclipseSummaryAddress& address )
|
||||
{
|
||||
auto qName = QString::fromStdString( address.quantityName() );
|
||||
auto qName = QString::fromStdString( address.vectorName() );
|
||||
|
||||
if ( qName.contains( ENSEMBLE_STAT_P10_QUANTITY_NAME ) ) return RiuPlotCurveSymbol::SYMBOL_TRIANGLE;
|
||||
if ( qName.contains( ENSEMBLE_STAT_P90_QUANTITY_NAME ) ) return RiuPlotCurveSymbol::SYMBOL_DOWN_TRIANGLE;
|
||||
|
||||
@@ -260,21 +260,21 @@ std::vector<RimEnsembleCurveSet*> RimEnsembleCurveSetCollection::curveSetsForSou
|
||||
{
|
||||
// Add corresponding history/summary curve with or without H
|
||||
|
||||
std::string quantity = m_curveSetForSourceStepping->summaryAddress().quantityName();
|
||||
std::string vectorName = m_curveSetForSourceStepping->summaryAddress().vectorName();
|
||||
|
||||
std::string candidateName;
|
||||
if ( m_curveSetForSourceStepping->summaryAddress().isHistoryQuantity() )
|
||||
if ( m_curveSetForSourceStepping->summaryAddress().isHistoryVector() )
|
||||
{
|
||||
candidateName = quantity.substr( 0, quantity.size() - 1 );
|
||||
candidateName = vectorName.substr( 0, vectorName.size() - 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
candidateName = quantity + "H";
|
||||
candidateName = vectorName + "H";
|
||||
}
|
||||
|
||||
for ( const auto& c : curveSets() )
|
||||
{
|
||||
if ( c->summaryAddress().quantityName() == candidateName )
|
||||
if ( c->summaryAddress().vectorName() == candidateName )
|
||||
{
|
||||
steppingCurveSets.push_back( c );
|
||||
}
|
||||
|
||||
@@ -49,12 +49,12 @@ QString RimMultiSummaryPlotNameHelper::plotTitle() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimMultiSummaryPlotNameHelper::isPlotDisplayingSingleQuantity() const
|
||||
bool RimMultiSummaryPlotNameHelper::isPlotDisplayingSingleVectorName() const
|
||||
{
|
||||
int plotCountWithSingleQuantity = 0;
|
||||
for ( auto nameHelper : m_nameHelpers )
|
||||
{
|
||||
if ( nameHelper->isPlotDisplayingSingleQuantity() ) plotCountWithSingleQuantity++;
|
||||
if ( nameHelper->isPlotDisplayingSingleVectorName() ) plotCountWithSingleQuantity++;
|
||||
}
|
||||
|
||||
if ( plotCountWithSingleQuantity == 1 ) return true;
|
||||
@@ -148,11 +148,11 @@ QString RimMultiSummaryPlotNameHelper::caseName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string RimMultiSummaryPlotNameHelper::titleQuantity() const
|
||||
std::string RimMultiSummaryPlotNameHelper::titleVectorName() const
|
||||
{
|
||||
for ( auto nameHelper : m_nameHelpers )
|
||||
{
|
||||
if ( nameHelper->isPlotDisplayingSingleQuantity() ) return nameHelper->titleQuantity();
|
||||
if ( nameHelper->isPlotDisplayingSingleVectorName() ) return nameHelper->titleVectorName();
|
||||
}
|
||||
|
||||
return "";
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
|
||||
QString plotTitle() const override;
|
||||
|
||||
bool isPlotDisplayingSingleQuantity() const override;
|
||||
bool isPlotDisplayingSingleVectorName() const override;
|
||||
bool isWellNameInTitle() const override;
|
||||
bool isGroupNameInTitle() const override;
|
||||
bool isRegionInTitle() const override;
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
QString caseName() const override;
|
||||
|
||||
std::string titleQuantity() const override;
|
||||
std::string titleVectorName() const override;
|
||||
std::string titleWellName() const override;
|
||||
std::string titleGroupName() const override;
|
||||
std::string titleRegion() const override;
|
||||
|
||||
@@ -108,20 +108,20 @@ double RimObjectiveFunction::value( RimSummaryCase*
|
||||
|
||||
for ( auto vectorSummaryAddress : vectorSummaryAddresses )
|
||||
{
|
||||
std::string s = vectorSummaryAddress.quantityName() + RifReaderEclipseSummary::differenceIdentifier();
|
||||
if ( !vectorSummaryAddress.quantityName().empty() )
|
||||
std::string s = vectorSummaryAddress.vectorName() + RifReaderEclipseSummary::differenceIdentifier();
|
||||
if ( !vectorSummaryAddress.vectorName().empty() )
|
||||
{
|
||||
if ( vectorSummaryAddress.quantityName().find( RifReaderEclipseSummary::differenceIdentifier() ) !=
|
||||
if ( vectorSummaryAddress.vectorName().find( RifReaderEclipseSummary::differenceIdentifier() ) !=
|
||||
std::string::npos )
|
||||
{
|
||||
s = vectorSummaryAddress.quantityName();
|
||||
s = vectorSummaryAddress.vectorName();
|
||||
}
|
||||
RifEclipseSummaryAddress vectorSummaryAddressDiff = vectorSummaryAddress;
|
||||
vectorSummaryAddressDiff.setQuantityName( s );
|
||||
vectorSummaryAddressDiff.setVectorName( s );
|
||||
|
||||
RifEclipseSummaryAddress vectorSummaryAddressHistory = vectorSummaryAddress;
|
||||
vectorSummaryAddressHistory.setQuantityName( vectorSummaryAddress.quantityName() +
|
||||
RifReaderEclipseSummary::historyIdentifier() );
|
||||
vectorSummaryAddressHistory.setVectorName( vectorSummaryAddress.vectorName() +
|
||||
RifReaderEclipseSummary::historyIdentifier() );
|
||||
|
||||
if ( readerInterface->allResultAddresses().count( vectorSummaryAddressDiff ) )
|
||||
{
|
||||
|
||||
@@ -46,9 +46,9 @@ RimCustomObjectiveFunctionWeight* RimObjectiveFunctionTools::addWeight( RimCusto
|
||||
candidateAdr = newWeight->parentCurveSet()->summaryAddress();
|
||||
}
|
||||
|
||||
auto nativeQuantityName = RimObjectiveFunctionTools::nativeQuantityName( candidateAdr.quantityName() );
|
||||
auto nativeQuantityName = RimObjectiveFunctionTools::nativeQuantityName( candidateAdr.vectorName() );
|
||||
|
||||
candidateAdr.setQuantityName( nativeQuantityName );
|
||||
candidateAdr.setVectorName( nativeQuantityName );
|
||||
newWeight->setSummaryAddress( candidateAdr );
|
||||
|
||||
return newWeight;
|
||||
|
||||
@@ -61,7 +61,7 @@ RimSummaryAddress::RimSummaryAddress()
|
||||
CAF_PDM_InitObject( "SummaryAddress", ":/DataVector.png", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_category, "SummaryVarType", "Type" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_quantityName, "SummaryQuantityName", "Quantity" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_vectorName, "SummaryQuantityName", "Vector" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_regionNumber, "SummaryRegion", "Region" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_regionNumber2, "SummaryRegion2", "Region2" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_groupName, "SummaryWellGroup", "Group" );
|
||||
@@ -117,7 +117,7 @@ RimSummaryAddress* RimSummaryAddress::wrapFileReaderAddress( const RifEclipseSum
|
||||
void RimSummaryAddress::setAddress( const RifEclipseSummaryAddress& addr )
|
||||
{
|
||||
m_category = addr.category();
|
||||
m_quantityName = addr.quantityName().c_str();
|
||||
m_vectorName = addr.vectorName().c_str();
|
||||
m_regionNumber = addr.regionNumber();
|
||||
m_regionNumber2 = addr.regionNumber2();
|
||||
m_groupName = addr.groupName().c_str();
|
||||
@@ -132,7 +132,7 @@ void RimSummaryAddress::setAddress( const RifEclipseSummaryAddress& addr )
|
||||
m_cellK = addr.cellK();
|
||||
m_calculationId = addr.id();
|
||||
|
||||
setUiName( m_quantityName );
|
||||
setUiName( m_vectorName );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -141,7 +141,7 @@ void RimSummaryAddress::setAddress( const RifEclipseSummaryAddress& addr )
|
||||
RifEclipseSummaryAddress RimSummaryAddress::address() const
|
||||
{
|
||||
return RifEclipseSummaryAddress( m_category(),
|
||||
m_quantityName().toStdString(),
|
||||
m_vectorName().toStdString(),
|
||||
m_regionNumber(),
|
||||
m_regionNumber2(),
|
||||
m_groupName().toStdString(),
|
||||
@@ -169,7 +169,7 @@ void RimSummaryAddress::ensureCalculationIdIsAssigned()
|
||||
{
|
||||
QString description = c->description();
|
||||
|
||||
if ( description == m_quantityName )
|
||||
if ( description == m_vectorName )
|
||||
{
|
||||
m_calculationId = c->id();
|
||||
}
|
||||
@@ -183,15 +183,15 @@ void RimSummaryAddress::ensureCalculationIdIsAssigned()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::PhaseType RimSummaryAddress::addressPhaseType() const
|
||||
{
|
||||
if ( QRegularExpression( "^.OP" ).match( m_quantityName ).hasMatch() )
|
||||
if ( QRegularExpression( "^.OP" ).match( m_vectorName ).hasMatch() )
|
||||
{
|
||||
return RiaDefines::PhaseType::OIL_PHASE;
|
||||
}
|
||||
else if ( QRegularExpression( "^.GP" ).match( m_quantityName ).hasMatch() )
|
||||
else if ( QRegularExpression( "^.GP" ).match( m_vectorName ).hasMatch() )
|
||||
{
|
||||
return RiaDefines::PhaseType::GAS_PHASE;
|
||||
}
|
||||
else if ( QRegularExpression( "^.WP" ).match( m_quantityName ).hasMatch() )
|
||||
else if ( QRegularExpression( "^.WP" ).match( m_vectorName ).hasMatch() )
|
||||
{
|
||||
return RiaDefines::PhaseType::WATER_PHASE;
|
||||
}
|
||||
@@ -241,7 +241,7 @@ int RimSummaryAddress::caseId() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimSummaryAddress::quantityName() const
|
||||
{
|
||||
return m_quantityName;
|
||||
return m_vectorName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -71,7 +71,7 @@ protected:
|
||||
private:
|
||||
caf::PdmField<caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>> m_category;
|
||||
|
||||
caf::PdmField<QString> m_quantityName;
|
||||
caf::PdmField<QString> m_vectorName;
|
||||
caf::PdmField<int> m_regionNumber;
|
||||
caf::PdmField<int> m_regionNumber2;
|
||||
caf::PdmField<QString> m_groupName;
|
||||
|
||||
@@ -112,7 +112,7 @@ bool RimSummaryAddressCollection::hasDataVector( const std::string quantityName
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryAddressCollection::addAddress( const RifEclipseSummaryAddress& address, int caseId, int ensembleId )
|
||||
{
|
||||
if ( !hasDataVector( address.quantityName() ) )
|
||||
if ( !hasDataVector( address.vectorName() ) )
|
||||
{
|
||||
m_adresses.push_back( RimSummaryAddress::wrapFileReaderAddress( address, caseId, ensembleId ) );
|
||||
if ( m_caseId == -1 ) m_caseId = caseId;
|
||||
|
||||
@@ -1000,7 +1000,7 @@ void RimSummaryCurve::setCurveAppearanceFromCaseType()
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_yValuesSummaryAddress && m_yValuesSummaryAddress->address().isHistoryQuantity() )
|
||||
if ( m_yValuesSummaryAddress && m_yValuesSummaryAddress->address().isHistoryVector() )
|
||||
{
|
||||
RiaPreferencesSummary* prefs = RiaPreferencesSummary::current();
|
||||
|
||||
|
||||
@@ -277,8 +277,8 @@ void RimSummaryCurveAppearanceCalculator::setupCurveLook( RimSummaryCurve* curve
|
||||
m_currentCurveBaseColor = cvf::Color3f( 0.5f, 0.5f, 0.5f );
|
||||
m_currentCurveGradient = 0.0f;
|
||||
|
||||
std::string quantityName = curve->summaryAddressY().quantityName();
|
||||
if ( curve->summaryAddressY().isHistoryQuantity() )
|
||||
std::string quantityName = curve->summaryAddressY().vectorName();
|
||||
if ( curve->summaryAddressY().isHistoryVector() )
|
||||
{
|
||||
quantityName = quantityName.substr( 0, quantityName.size() - 1 );
|
||||
}
|
||||
@@ -325,7 +325,7 @@ void RimSummaryCurveAppearanceCalculator::setupCurveLook( RimSummaryCurve* curve
|
||||
void RimSummaryCurveAppearanceCalculator::assignColorByPhase( RimSummaryCurve* curve, int colorIndex )
|
||||
{
|
||||
char secondChar = 0;
|
||||
std::string varname = curve->summaryAddressY().quantityName();
|
||||
std::string varname = curve->summaryAddressY().vectorName();
|
||||
|
||||
if ( varname.size() > 1 )
|
||||
{
|
||||
@@ -380,11 +380,11 @@ void RimSummaryCurveAppearanceCalculator::init( const std::vector<RiaSummaryCurv
|
||||
if ( !( curveDef.summaryAddress().regionNumber() == -1 ) )
|
||||
m_regToAppearanceIdxMap[curveDef.summaryAddress().regionNumber()] = -1;
|
||||
|
||||
if ( !curveDef.summaryAddress().quantityName().empty() )
|
||||
if ( !curveDef.summaryAddress().vectorName().empty() )
|
||||
{
|
||||
std::string varname = curveDef.summaryAddress().quantityName();
|
||||
std::string varname = curveDef.summaryAddress().vectorName();
|
||||
|
||||
if ( curveDef.summaryAddress().isHistoryQuantity() )
|
||||
if ( curveDef.summaryAddress().isHistoryVector() )
|
||||
{
|
||||
varname = varname.substr( 0, varname.size() - 1 );
|
||||
}
|
||||
|
||||
@@ -190,26 +190,26 @@ QString RimSummaryCurveAutoName::buildCurveName( const RifEclipseSummaryAddress&
|
||||
|
||||
if ( m_vectorName )
|
||||
{
|
||||
bool skipSubString = nameHelper && nameHelper->isPlotDisplayingSingleQuantity();
|
||||
bool skipSubString = nameHelper && nameHelper->isPlotDisplayingSingleVectorName();
|
||||
if ( !skipSubString )
|
||||
{
|
||||
if ( m_longVectorName() )
|
||||
{
|
||||
auto quantityName = summaryAddress.quantityName();
|
||||
if ( summaryAddress.isHistoryQuantity() )
|
||||
auto quantityName = summaryAddress.vectorName();
|
||||
if ( summaryAddress.isHistoryVector() )
|
||||
quantityName = quantityName.substr( 0, quantityName.size() - 1 );
|
||||
|
||||
text = RiuSummaryQuantityNameInfoProvider::instance()->longNameFromQuantityName( quantityName );
|
||||
text = RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( quantityName );
|
||||
}
|
||||
else
|
||||
{
|
||||
text = summaryAddress.quantityName();
|
||||
text = summaryAddress.vectorName();
|
||||
}
|
||||
}
|
||||
|
||||
if ( summaryAddress.category() == RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
{
|
||||
text = summaryAddress.quantityName();
|
||||
text = summaryAddress.vectorName();
|
||||
}
|
||||
else if ( summaryAddress.category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED )
|
||||
{
|
||||
|
||||
@@ -254,25 +254,25 @@ std::vector<RimSummaryCurve*>
|
||||
|
||||
const std::string historyIdentifier = "H";
|
||||
|
||||
std::string quantity;
|
||||
std::string vectorName;
|
||||
|
||||
if ( steppingType == RimSummaryDataSourceStepping::Axis::X_AXIS )
|
||||
{
|
||||
quantity = m_curveForSourceStepping->summaryAddressX().quantityName();
|
||||
vectorName = m_curveForSourceStepping->summaryAddressX().vectorName();
|
||||
}
|
||||
else if ( steppingType == RimSummaryDataSourceStepping::Axis::Y_AXIS )
|
||||
{
|
||||
quantity = m_curveForSourceStepping->summaryAddressY().quantityName();
|
||||
vectorName = m_curveForSourceStepping->summaryAddressY().vectorName();
|
||||
}
|
||||
|
||||
std::string candidateName;
|
||||
if ( RiaStdStringTools::endsWith( quantity, historyIdentifier ) )
|
||||
if ( RiaStdStringTools::endsWith( vectorName, historyIdentifier ) )
|
||||
{
|
||||
candidateName = quantity.substr( 0, quantity.size() - 1 );
|
||||
candidateName = vectorName.substr( 0, vectorName.size() - 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
candidateName = quantity + historyIdentifier;
|
||||
candidateName = vectorName + historyIdentifier;
|
||||
}
|
||||
|
||||
for ( const auto& c : curves() )
|
||||
@@ -280,7 +280,7 @@ std::vector<RimSummaryCurve*>
|
||||
if ( steppingType == RimSummaryDataSourceStepping::Axis::X_AXIS )
|
||||
{
|
||||
if ( c->summaryCaseX() == m_curveForSourceStepping->summaryCaseX() &&
|
||||
c->summaryAddressX().quantityName() == candidateName )
|
||||
c->summaryAddressX().vectorName() == candidateName )
|
||||
{
|
||||
stepCurves.push_back( c );
|
||||
}
|
||||
@@ -288,7 +288,7 @@ std::vector<RimSummaryCurve*>
|
||||
else if ( steppingType == RimSummaryDataSourceStepping::Axis::Y_AXIS )
|
||||
{
|
||||
if ( c->summaryCaseY() == m_curveForSourceStepping->summaryCaseY() &&
|
||||
c->summaryAddressY().quantityName() == candidateName )
|
||||
c->summaryAddressY().vectorName() == candidateName )
|
||||
{
|
||||
stepCurves.push_back( c );
|
||||
}
|
||||
|
||||
@@ -673,7 +673,7 @@ void RimSummaryMultiPlot::setDefaultRangeAggregationSteppingDimension()
|
||||
rangeAggregation = AxisRangeAggregation::SUB_PLOTS;
|
||||
}
|
||||
|
||||
auto stepDimension = RimSummaryPlotSourceStepping::SourceSteppingDimension::QUANTITY;
|
||||
auto stepDimension = RimSummaryPlotSourceStepping::SourceSteppingDimension::VECTOR;
|
||||
if ( analyzer.wellNames().size() == 1 )
|
||||
{
|
||||
stepDimension = RimSummaryPlotSourceStepping::SourceSteppingDimension::WELL;
|
||||
@@ -828,9 +828,8 @@ void RimSummaryMultiPlot::computeAggregatedAxisRange()
|
||||
|
||||
if ( axisRangeAggregation == AxisRangeAggregation::REALIZATIONS )
|
||||
{
|
||||
RifEclipseSummaryAddress addr =
|
||||
RifEclipseSummaryAddress::fieldAddress( curve->summaryAddressY().quantityName() );
|
||||
addresses = { addr };
|
||||
RifEclipseSummaryAddress addr = RifEclipseSummaryAddress::fieldAddress( curve->summaryAddressY().vectorName() );
|
||||
addresses = { addr };
|
||||
}
|
||||
else if ( axisRangeAggregation == AxisRangeAggregation::WELLS ||
|
||||
axisRangeAggregation == AxisRangeAggregation::REGIONS )
|
||||
@@ -851,7 +850,7 @@ void RimSummaryMultiPlot::computeAggregatedAxisRange()
|
||||
for ( const auto& wellName : analyzer.wellNames() )
|
||||
{
|
||||
addresses.push_back(
|
||||
RifEclipseSummaryAddress::wellAddress( curve->summaryAddressY().quantityName(), wellName ) );
|
||||
RifEclipseSummaryAddress::wellAddress( curve->summaryAddressY().vectorName(), wellName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -859,7 +858,7 @@ void RimSummaryMultiPlot::computeAggregatedAxisRange()
|
||||
{
|
||||
for ( auto regionNumber : analyzer.regionNumbers() )
|
||||
{
|
||||
addresses.push_back( RifEclipseSummaryAddress::regionAddress( curve->summaryAddressY().quantityName(),
|
||||
addresses.push_back( RifEclipseSummaryAddress::regionAddress( curve->summaryAddressY().vectorName(),
|
||||
regionNumber ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,12 +78,12 @@ QString RimSummaryNameHelper::aggregatedPlotTitle( const RimSummaryNameHelper& o
|
||||
title += "Completion : " + QString::fromStdString( completion );
|
||||
}
|
||||
|
||||
auto quantity = this->titleQuantity();
|
||||
if ( ( other.titleQuantity() != this->titleQuantity() ) && ( !quantity.empty() ) )
|
||||
auto vectorName = this->titleVectorName();
|
||||
if ( ( other.titleVectorName() != this->titleVectorName() ) && ( !vectorName.empty() ) )
|
||||
{
|
||||
if ( !title.isEmpty() ) title += ", ";
|
||||
title += QString::fromStdString(
|
||||
RiuSummaryQuantityNameInfoProvider::instance()->longNameFromQuantityName( quantity, true ) );
|
||||
RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( vectorName, true ) );
|
||||
}
|
||||
|
||||
return title;
|
||||
|
||||
@@ -37,18 +37,18 @@ public:
|
||||
|
||||
QString aggregatedPlotTitle( const RimSummaryNameHelper& summaryMultiPlotNameHelper ) const;
|
||||
|
||||
virtual bool isPlotDisplayingSingleQuantity() const = 0;
|
||||
virtual bool isWellNameInTitle() const = 0;
|
||||
virtual bool isGroupNameInTitle() const = 0;
|
||||
virtual bool isRegionInTitle() const = 0;
|
||||
virtual bool isCaseInTitle() const = 0;
|
||||
virtual bool isBlockInTitle() const = 0;
|
||||
virtual bool isSegmentInTitle() const = 0;
|
||||
virtual bool isCompletionInTitle() const = 0;
|
||||
virtual bool isPlotDisplayingSingleVectorName() const = 0;
|
||||
virtual bool isWellNameInTitle() const = 0;
|
||||
virtual bool isGroupNameInTitle() const = 0;
|
||||
virtual bool isRegionInTitle() const = 0;
|
||||
virtual bool isCaseInTitle() const = 0;
|
||||
virtual bool isBlockInTitle() const = 0;
|
||||
virtual bool isSegmentInTitle() const = 0;
|
||||
virtual bool isCompletionInTitle() const = 0;
|
||||
|
||||
virtual QString caseName() const = 0;
|
||||
|
||||
virtual std::string titleQuantity() const = 0;
|
||||
virtual std::string titleVectorName() const = 0;
|
||||
virtual std::string titleWellName() const = 0;
|
||||
virtual std::string titleGroupName() const = 0;
|
||||
virtual std::string titleRegion() const = 0;
|
||||
|
||||
@@ -928,7 +928,7 @@ bool RimSummaryPlot::isOnlyWaterCutCurvesVisible( RiuPlotAxis plotAxis )
|
||||
auto curves = visibleSummaryCurvesForAxis( plotAxis );
|
||||
for ( auto c : curves )
|
||||
{
|
||||
auto quantityName = c->summaryAddressY().quantityName();
|
||||
auto quantityName = c->summaryAddressY().vectorName();
|
||||
|
||||
if ( RiaStdStringTools::endsWith( quantityName, "WCT" ) ) waterCutCurveCount++;
|
||||
}
|
||||
@@ -2485,7 +2485,7 @@ void RimSummaryPlot::updateCurveNames()
|
||||
if ( c->isCurveVisible() )
|
||||
{
|
||||
c->updateCurveNameNoLegendUpdate();
|
||||
shortCurveNames.append( QString::fromStdString( c->summaryAddressY().quantityName() ) );
|
||||
shortCurveNames.append( QString::fromStdString( c->summaryAddressY().vectorName() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2496,7 +2496,7 @@ void RimSummaryPlot::updateCurveNames()
|
||||
|
||||
if ( curveSet->isCurvesVisible() )
|
||||
{
|
||||
shortCurveNames.append( QString::fromStdString( curveSet->summaryAddress().quantityName() ) );
|
||||
shortCurveNames.append( QString::fromStdString( curveSet->summaryAddress().vectorName() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -212,12 +212,11 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const
|
||||
std::map<std::string, std::set<std::string>> unitToQuantityNameMap;
|
||||
|
||||
auto addToUnitToQuantityMap = [&]( const std::string& unitText, const RifEclipseSummaryAddress& sumAddress ) {
|
||||
// remove any stats prefix from the quantity name
|
||||
size_t cutPos = sumAddress.quantityName().find( ':' );
|
||||
size_t cutPos = sumAddress.vectorName().find( ':' );
|
||||
if ( cutPos == std::string::npos ) cutPos = -1;
|
||||
|
||||
std::string titleText;
|
||||
const std::string& quantityName = sumAddress.quantityName().substr( cutPos + 1 );
|
||||
const std::string& quantityName = sumAddress.vectorName().substr( cutPos + 1 );
|
||||
|
||||
if ( sumAddress.category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED )
|
||||
{
|
||||
@@ -229,9 +228,9 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const
|
||||
{
|
||||
auto candidateName = quantityName;
|
||||
|
||||
if ( sumAddress.isHistoryQuantity() ) candidateName = quantityName.substr( 0, quantityName.size() - 1 );
|
||||
if ( sumAddress.isHistoryVector() ) candidateName = quantityName.substr( 0, quantityName.size() - 1 );
|
||||
|
||||
titleText = RiuSummaryQuantityNameInfoProvider::instance()->longNameFromQuantityName( candidateName );
|
||||
titleText = RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( candidateName );
|
||||
}
|
||||
|
||||
if ( m_axisProperties->showAcronym() )
|
||||
|
||||
@@ -635,7 +635,7 @@ void RimSummaryPlotFilterTextCurveSetEditor::insertFilteredAddressesInSet(
|
||||
|
||||
for ( const auto& adr : candidateAddresses )
|
||||
{
|
||||
if ( RiaStdStringTools::endsWith( adr.quantityName(), diffText ) ) continue;
|
||||
if ( RiaStdStringTools::endsWith( adr.vectorName(), diffText ) ) continue;
|
||||
|
||||
tmp.insert( adr );
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ QString RimSummaryPlotNameHelper::plotTitle() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryPlotNameHelper::isPlotDisplayingSingleQuantity() const
|
||||
bool RimSummaryPlotNameHelper::isPlotDisplayingSingleVectorName() const
|
||||
{
|
||||
if ( m_analyzer->quantities().size() == 2 )
|
||||
{
|
||||
@@ -186,7 +186,7 @@ QString RimSummaryPlotNameHelper::caseName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string RimSummaryPlotNameHelper::titleQuantity() const
|
||||
std::string RimSummaryPlotNameHelper::titleVectorName() const
|
||||
{
|
||||
return m_titleQuantity;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
QString plotTitle() const override;
|
||||
|
||||
bool isPlotDisplayingSingleQuantity() const override;
|
||||
bool isPlotDisplayingSingleVectorName() const override;
|
||||
bool isWellNameInTitle() const override;
|
||||
bool isGroupNameInTitle() const override;
|
||||
bool isRegionInTitle() const override;
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
QString caseName() const override;
|
||||
|
||||
std::string titleQuantity() const override;
|
||||
std::string titleVectorName() const override;
|
||||
std::string titleWellName() const override;
|
||||
std::string titleGroupName() const override;
|
||||
std::string titleRegion() const override;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace caf
|
||||
template <>
|
||||
void AppEnum<RimSummaryPlotSourceStepping::SourceSteppingDimension>::setUp()
|
||||
{
|
||||
addItem( RimSummaryPlotSourceStepping::SourceSteppingDimension::QUANTITY, "QUANTITY", "Quantity" );
|
||||
addItem( RimSummaryPlotSourceStepping::SourceSteppingDimension::VECTOR, "VECTOR", "Vector" );
|
||||
addItem( RimSummaryPlotSourceStepping::SourceSteppingDimension::WELL, "WELL", "Well" );
|
||||
addItem( RimSummaryPlotSourceStepping::SourceSteppingDimension::SUMMARY_CASE, "SUMMARY_CASE", "Summary Case" );
|
||||
addItem( RimSummaryPlotSourceStepping::SourceSteppingDimension::ENSEMBLE, "ENSEMBLE", "Ensemble" );
|
||||
@@ -64,7 +64,7 @@ void AppEnum<RimSummaryPlotSourceStepping::SourceSteppingDimension>::setUp()
|
||||
addItem( RimSummaryPlotSourceStepping::SourceSteppingDimension::REGION, "REGION", "Region" );
|
||||
addItem( RimSummaryPlotSourceStepping::SourceSteppingDimension::BLOCK, "BLOCK", "Block" );
|
||||
addItem( RimSummaryPlotSourceStepping::SourceSteppingDimension::AQUIFER, "AQUIFER", "Aquifer" );
|
||||
setDefault( RimSummaryPlotSourceStepping::SourceSteppingDimension::QUANTITY );
|
||||
setDefault( RimSummaryPlotSourceStepping::SourceSteppingDimension::VECTOR );
|
||||
}
|
||||
} // namespace caf
|
||||
|
||||
@@ -90,7 +90,7 @@ RimSummaryPlotSourceStepping::RimSummaryPlotSourceStepping()
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellName, "WellName", "Well Name" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_groupName, "GroupName", "Group Name" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_region, "Region", "Region" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_quantity, "Quantities", "Quantity" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_vectorName, "VectorName", "Vector" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_cellBlock, "CellBlock", "Block" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_segment, "Segment", "Segment" );
|
||||
@@ -232,7 +232,7 @@ QList<caf::PdmOptionItemInfo>
|
||||
auto addresses = adressesForSourceStepping();
|
||||
if ( !addresses.empty() )
|
||||
{
|
||||
if ( fieldNeedingOptions == &m_quantity )
|
||||
if ( fieldNeedingOptions == &m_vectorName )
|
||||
{
|
||||
std::map<QString, QString> displayAndValueStrings = optionsForQuantity( addresses );
|
||||
|
||||
@@ -383,7 +383,7 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
m_wellName.uiCapability()->updateConnectedEditors();
|
||||
m_groupName.uiCapability()->updateConnectedEditors();
|
||||
m_region.uiCapability()->updateConnectedEditors();
|
||||
m_quantity.uiCapability()->updateConnectedEditors();
|
||||
m_vectorName.uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
else if ( changedField == &m_ensemble )
|
||||
{
|
||||
@@ -406,9 +406,9 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
m_wellName.uiCapability()->updateConnectedEditors();
|
||||
m_groupName.uiCapability()->updateConnectedEditors();
|
||||
m_region.uiCapability()->updateConnectedEditors();
|
||||
m_quantity.uiCapability()->updateConnectedEditors();
|
||||
m_vectorName.uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
else if ( changedField == &m_quantity )
|
||||
else if ( changedField == &m_vectorName )
|
||||
{
|
||||
for ( auto curve : curves )
|
||||
{
|
||||
@@ -438,11 +438,11 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
curveSet->setSummaryAddress( adr );
|
||||
}
|
||||
}
|
||||
m_quantity.uiCapability()->updateConnectedEditors();
|
||||
m_vectorName.uiCapability()->updateConnectedEditors();
|
||||
triggerLoadDataAndUpdate = true;
|
||||
}
|
||||
|
||||
if ( changedField != &m_quantity )
|
||||
if ( changedField != &m_vectorName )
|
||||
{
|
||||
RifEclipseSummaryAddress::SummaryVarCategory summaryCategoryToModify = RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
if ( changedField == &m_wellName )
|
||||
@@ -577,8 +577,8 @@ caf::PdmValueField* RimSummaryPlotSourceStepping::fieldToModify()
|
||||
case SourceSteppingDimension::REGION:
|
||||
return &m_region;
|
||||
|
||||
case SourceSteppingDimension::QUANTITY:
|
||||
return &m_quantity;
|
||||
case SourceSteppingDimension::VECTOR:
|
||||
return &m_vectorName;
|
||||
|
||||
case SourceSteppingDimension::BLOCK:
|
||||
return &m_cellBlock;
|
||||
@@ -821,10 +821,10 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::activeFieldsForD
|
||||
|
||||
if ( !analyzer.quantityNameForTitle().empty() )
|
||||
{
|
||||
QString txt = QString::fromStdString( analyzer.quantityNameForTitle() );
|
||||
m_quantity = txt;
|
||||
QString txt = QString::fromStdString( analyzer.quantityNameForTitle() );
|
||||
m_vectorName = txt;
|
||||
|
||||
fieldsCommonForAllCurves.push_back( &m_quantity );
|
||||
fieldsCommonForAllCurves.push_back( &m_vectorName );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1051,7 +1051,7 @@ RifEclipseSummaryAddress RimSummaryPlotSourceStepping::stepAddress( RifEclipseSu
|
||||
}
|
||||
break;
|
||||
|
||||
case SourceSteppingDimension::QUANTITY:
|
||||
case SourceSteppingDimension::VECTOR:
|
||||
{
|
||||
auto options = optionsForQuantity( addresses );
|
||||
|
||||
@@ -1061,7 +1061,7 @@ RifEclipseSummaryAddress RimSummaryPlotSourceStepping::stepAddress( RifEclipseSu
|
||||
values.push_back( it->second );
|
||||
}
|
||||
|
||||
QString qName = QString::fromStdString( addr.quantityName() );
|
||||
QString qName = QString::fromStdString( addr.vectorName() );
|
||||
auto found = std::find( values.begin(), values.end(), qName );
|
||||
if ( found != values.end() )
|
||||
{
|
||||
@@ -1073,7 +1073,7 @@ RifEclipseSummaryAddress RimSummaryPlotSourceStepping::stepAddress( RifEclipseSu
|
||||
{
|
||||
if ( found != values.begin() ) found--;
|
||||
}
|
||||
if ( found != values.end() ) addr.setQuantityName( ( *found ).toStdString() );
|
||||
if ( found != values.end() ) addr.setVectorName( ( *found ).toStdString() );
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1154,8 +1154,8 @@ void RimSummaryPlotSourceStepping::syncWithStepper( RimSummaryPlotSourceStepping
|
||||
m_region = other->m_region();
|
||||
break;
|
||||
|
||||
case SourceSteppingDimension::QUANTITY:
|
||||
m_quantity = other->m_quantity();
|
||||
case SourceSteppingDimension::VECTOR:
|
||||
m_vectorName = other->m_vectorName();
|
||||
break;
|
||||
|
||||
case SourceSteppingDimension::BLOCK:
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
WELL,
|
||||
GROUP,
|
||||
REGION,
|
||||
QUANTITY,
|
||||
VECTOR,
|
||||
BLOCK,
|
||||
AQUIFER
|
||||
};
|
||||
@@ -125,7 +125,7 @@ private:
|
||||
caf::PdmField<QString> m_wellName;
|
||||
caf::PdmField<QString> m_groupName;
|
||||
caf::PdmField<int> m_region;
|
||||
caf::PdmField<QString> m_quantity;
|
||||
caf::PdmField<QString> m_vectorName;
|
||||
caf::PdmField<QString> m_placeholderForLabel;
|
||||
|
||||
caf::PdmField<QString> m_cellBlock;
|
||||
|
||||
Reference in New Issue
Block a user