mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Use post fix Y in RiaSummaryCurveDefinition
This commit is contained in:
parent
471790eebd
commit
f07a5db559
@ -30,7 +30,7 @@
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition()
|
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition()
|
||||||
: m_summaryCase( nullptr )
|
: m_summaryCaseY( nullptr )
|
||||||
, m_summaryCaseX( nullptr )
|
, m_summaryCaseX( nullptr )
|
||||||
, m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
, m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
||||||
, m_ensemble( nullptr )
|
, m_ensemble( nullptr )
|
||||||
@ -44,8 +44,8 @@ RiaSummaryCurveDefinition::RiaSummaryCurveDefinition()
|
|||||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCase* summaryCase,
|
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCase* summaryCase,
|
||||||
const RifEclipseSummaryAddress& summaryAddress,
|
const RifEclipseSummaryAddress& summaryAddress,
|
||||||
bool isEnsembleCurve )
|
bool isEnsembleCurve )
|
||||||
: m_summaryCase( summaryCase )
|
: m_summaryCaseY( summaryCase )
|
||||||
, m_summaryAddress( summaryAddress )
|
, m_summaryAddressY( summaryAddress )
|
||||||
, m_summaryCaseX( nullptr )
|
, m_summaryCaseX( nullptr )
|
||||||
, m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
, m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
||||||
, m_ensemble( nullptr )
|
, m_ensemble( nullptr )
|
||||||
@ -57,8 +57,8 @@ RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCase*
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddress )
|
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddress )
|
||||||
: m_summaryCase( nullptr )
|
: m_summaryCaseY( nullptr )
|
||||||
, m_summaryAddress( summaryAddress )
|
, m_summaryAddressY( summaryAddress )
|
||||||
, m_summaryCaseX( nullptr )
|
, m_summaryCaseX( nullptr )
|
||||||
, m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
, m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
||||||
, m_ensemble( ensemble )
|
, m_ensemble( ensemble )
|
||||||
@ -69,9 +69,9 @@ RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCaseCollection*
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimSummaryCase* RiaSummaryCurveDefinition::summaryCase() const
|
RimSummaryCase* RiaSummaryCurveDefinition::summaryCaseY() const
|
||||||
{
|
{
|
||||||
return m_summaryCase;
|
return m_summaryCaseY;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -85,9 +85,9 @@ RimSummaryCaseCollection* RiaSummaryCurveDefinition::ensemble() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
const RifEclipseSummaryAddress& RiaSummaryCurveDefinition::summaryAddress() const
|
RifEclipseSummaryAddress RiaSummaryCurveDefinition::summaryAddressY() const
|
||||||
{
|
{
|
||||||
return m_summaryAddress;
|
return m_summaryAddressY;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -101,9 +101,9 @@ bool RiaSummaryCurveDefinition::isEnsembleCurve() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiaSummaryCurveDefinition::setSummaryAddress( const RifEclipseSummaryAddress& address )
|
void RiaSummaryCurveDefinition::setSummaryAddressY( const RifEclipseSummaryAddress& address )
|
||||||
{
|
{
|
||||||
m_summaryAddress = address;
|
m_summaryAddressY = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -145,7 +145,7 @@ void RiaSummaryCurveDefinition::setIdentifierText( SummaryCategory category, con
|
|||||||
{
|
{
|
||||||
if ( RifEclipseSummaryAddress::isDependentOnWellName( category ) )
|
if ( RifEclipseSummaryAddress::isDependentOnWellName( category ) )
|
||||||
{
|
{
|
||||||
m_summaryAddress.setWellName( name );
|
m_summaryAddressY.setWellName( name );
|
||||||
m_summaryAddressX.setWellName( name );
|
m_summaryAddressX.setWellName( name );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,16 +154,16 @@ void RiaSummaryCurveDefinition::setIdentifierText( SummaryCategory category, con
|
|||||||
switch ( category )
|
switch ( category )
|
||||||
{
|
{
|
||||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_AQUIFER:
|
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_AQUIFER:
|
||||||
m_summaryAddress.setAquiferNumber( id );
|
m_summaryAddressY.setAquiferNumber( id );
|
||||||
m_summaryAddressX.setAquiferNumber( id );
|
m_summaryAddressX.setAquiferNumber( id );
|
||||||
break;
|
break;
|
||||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION:
|
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION:
|
||||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION_2_REGION:
|
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION_2_REGION:
|
||||||
m_summaryAddress.setRegion( id );
|
m_summaryAddressY.setRegion( id );
|
||||||
m_summaryAddressX.setRegion( id );
|
m_summaryAddressX.setRegion( id );
|
||||||
break;
|
break;
|
||||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP:
|
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP:
|
||||||
m_summaryAddress.setGroupName( name );
|
m_summaryAddressY.setGroupName( name );
|
||||||
m_summaryAddressX.setGroupName( name );
|
m_summaryAddressX.setGroupName( name );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -176,13 +176,13 @@ void RiaSummaryCurveDefinition::setIdentifierText( SummaryCategory category, con
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& curveDefinition, gsl::not_null<std::vector<double>*> values )
|
void RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& curveDefinition, gsl::not_null<std::vector<double>*> values )
|
||||||
{
|
{
|
||||||
if ( !curveDefinition.summaryAddress().isValid() ) return;
|
if ( !curveDefinition.summaryAddressY().isValid() ) return;
|
||||||
if ( !curveDefinition.summaryCase() ) return;
|
if ( !curveDefinition.summaryCaseY() ) return;
|
||||||
|
|
||||||
RifSummaryReaderInterface* reader = curveDefinition.summaryCase()->summaryReader();
|
RifSummaryReaderInterface* reader = curveDefinition.summaryCaseY()->summaryReader();
|
||||||
if ( !reader ) return;
|
if ( !reader ) return;
|
||||||
|
|
||||||
reader->values( curveDefinition.summaryAddress(), values );
|
reader->values( curveDefinition.summaryAddressY(), values );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -190,13 +190,13 @@ void RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& c
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<time_t> RiaSummaryCurveDefinition::timeSteps( const RiaSummaryCurveDefinition& curveDefinition )
|
std::vector<time_t> RiaSummaryCurveDefinition::timeSteps( const RiaSummaryCurveDefinition& curveDefinition )
|
||||||
{
|
{
|
||||||
if ( !curveDefinition.summaryAddress().isValid() ) return {};
|
if ( !curveDefinition.summaryAddressY().isValid() ) return {};
|
||||||
if ( !curveDefinition.summaryCase() ) return {};
|
if ( !curveDefinition.summaryCaseY() ) return {};
|
||||||
|
|
||||||
RifSummaryReaderInterface* reader = curveDefinition.summaryCase()->summaryReader();
|
RifSummaryReaderInterface* reader = curveDefinition.summaryCaseY()->summaryReader();
|
||||||
if ( !reader ) return {};
|
if ( !reader ) return {};
|
||||||
|
|
||||||
return reader->timeSteps( curveDefinition.summaryAddress() );
|
return reader->timeSteps( curveDefinition.summaryAddressY() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -205,12 +205,12 @@ std::vector<time_t> RiaSummaryCurveDefinition::timeSteps( const RiaSummaryCurveD
|
|||||||
QString RiaSummaryCurveDefinition::curveDefinitionText() const
|
QString RiaSummaryCurveDefinition::curveDefinitionText() const
|
||||||
{
|
{
|
||||||
QString caseName;
|
QString caseName;
|
||||||
if ( summaryCase() )
|
if ( summaryCaseY() )
|
||||||
caseName = summaryCase()->displayCaseName();
|
caseName = summaryCaseY()->displayCaseName();
|
||||||
else if ( ensemble() )
|
else if ( ensemble() )
|
||||||
caseName = ensemble()->name();
|
caseName = ensemble()->name();
|
||||||
|
|
||||||
return RiaSummaryCurveDefinition::curveDefinitionText( caseName, summaryAddress() );
|
return RiaSummaryCurveDefinition::curveDefinitionText( caseName, summaryAddressY() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -258,18 +258,18 @@ bool RiaSummaryCurveDefinition::operator<( const RiaSummaryCurveDefinition& othe
|
|||||||
return m_ensemble < other.ensemble();
|
return m_ensemble < other.ensemble();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_summaryCase != other.summaryCase() )
|
if ( m_summaryCaseY != other.summaryCaseY() )
|
||||||
{
|
{
|
||||||
QString summaryCaseName;
|
QString summaryCaseName;
|
||||||
QString otherSummaryCaseName;
|
QString otherSummaryCaseName;
|
||||||
|
|
||||||
if ( m_summaryCase )
|
if ( m_summaryCaseY )
|
||||||
{
|
{
|
||||||
summaryCaseName = m_summaryCase->displayCaseName();
|
summaryCaseName = m_summaryCaseY->displayCaseName();
|
||||||
}
|
}
|
||||||
if ( other.summaryCase() )
|
if ( other.summaryCaseY() )
|
||||||
{
|
{
|
||||||
otherSummaryCaseName = other.summaryCase()->displayCaseName();
|
otherSummaryCaseName = other.summaryCaseY()->displayCaseName();
|
||||||
}
|
}
|
||||||
|
|
||||||
// First check if names are different to ensure stable alphabetic sort
|
// First check if names are different to ensure stable alphabetic sort
|
||||||
@ -279,12 +279,12 @@ bool RiaSummaryCurveDefinition::operator<( const RiaSummaryCurveDefinition& othe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use pointer address, sorting will be be unstable
|
// Use pointer address, sorting will be be unstable
|
||||||
return m_summaryCase < other.summaryCase();
|
return m_summaryCaseY < other.summaryCaseY();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_summaryAddress != other.summaryAddress() )
|
if ( m_summaryAddressY != other.summaryAddressY() )
|
||||||
{
|
{
|
||||||
return ( m_summaryAddress < other.summaryAddress() );
|
return ( m_summaryAddressY < other.summaryAddressY() );
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_isEnsembleCurve < other.isEnsembleCurve();
|
return m_isEnsembleCurve < other.isEnsembleCurve();
|
||||||
@ -308,20 +308,20 @@ void RiaSummaryCurveDefinitionAnalyser::setCurveDefinitions( const std::vector<R
|
|||||||
m_ensembles.insert( curveDef.ensemble() );
|
m_ensembles.insert( curveDef.ensemble() );
|
||||||
valid = true;
|
valid = true;
|
||||||
}
|
}
|
||||||
else if ( curveDef.summaryCase() )
|
else if ( curveDef.summaryCaseY() )
|
||||||
{
|
{
|
||||||
m_singleSummaryCases.insert( curveDef.summaryCase() );
|
m_singleSummaryCases.insert( curveDef.summaryCaseY() );
|
||||||
|
|
||||||
if ( curveDef.summaryCase()->ensemble() )
|
if ( curveDef.summaryCaseY()->ensemble() )
|
||||||
{
|
{
|
||||||
m_ensembles.insert( curveDef.summaryCase()->ensemble() );
|
m_ensembles.insert( curveDef.summaryCaseY()->ensemble() );
|
||||||
}
|
}
|
||||||
valid = true;
|
valid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( valid )
|
if ( valid )
|
||||||
{
|
{
|
||||||
const RifEclipseSummaryAddress& address = curveDef.summaryAddress();
|
const RifEclipseSummaryAddress& address = curveDef.summaryAddressY();
|
||||||
|
|
||||||
m_vectorNames.insert( address.vectorName() );
|
m_vectorNames.insert( address.vectorName() );
|
||||||
m_summaryAdresses.insert( address );
|
m_summaryAdresses.insert( address );
|
||||||
|
@ -42,11 +42,11 @@ public:
|
|||||||
explicit RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddress );
|
explicit RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddress );
|
||||||
|
|
||||||
// Y Axis
|
// Y Axis
|
||||||
RimSummaryCase* summaryCase() const;
|
RimSummaryCase* summaryCaseY() const;
|
||||||
const RifEclipseSummaryAddress& summaryAddress() const;
|
RifEclipseSummaryAddress summaryAddressY() const;
|
||||||
RimSummaryCaseCollection* ensemble() const;
|
RimSummaryCaseCollection* ensemble() const;
|
||||||
bool isEnsembleCurve() const;
|
bool isEnsembleCurve() const;
|
||||||
void setSummaryAddress( const RifEclipseSummaryAddress& address );
|
void setSummaryAddressY( const RifEclipseSummaryAddress& address );
|
||||||
|
|
||||||
// X Axis
|
// X Axis
|
||||||
void setSummaryCaseX( RimSummaryCase* summaryCase );
|
void setSummaryCaseX( RimSummaryCase* summaryCase );
|
||||||
@ -67,8 +67,8 @@ public:
|
|||||||
static QString curveDefinitionText( const QString& caseName, const RifEclipseSummaryAddress& summaryAddress );
|
static QString curveDefinitionText( const QString& caseName, const RifEclipseSummaryAddress& summaryAddress );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RimSummaryCase* m_summaryCase;
|
RimSummaryCase* m_summaryCaseY;
|
||||||
RifEclipseSummaryAddress m_summaryAddress;
|
RifEclipseSummaryAddress m_summaryAddressY;
|
||||||
RimSummaryCase* m_summaryCaseX;
|
RimSummaryCase* m_summaryCaseX;
|
||||||
RifEclipseSummaryAddress m_summaryAddressX;
|
RifEclipseSummaryAddress m_summaryAddressX;
|
||||||
RimSummaryCaseCollection* m_ensemble;
|
RimSummaryCaseCollection* m_ensemble;
|
||||||
|
@ -481,7 +481,7 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std:
|
|||||||
std::map<RimSummaryCurve*, std::pair<bool, bool>> stashedErrorBarsAndLegendVisibility;
|
std::map<RimSummaryCurve*, std::pair<bool, bool>> stashedErrorBarsAndLegendVisibility;
|
||||||
for ( const auto& curveDef : curveDefsToAdd )
|
for ( const auto& curveDef : curveDefsToAdd )
|
||||||
{
|
{
|
||||||
RimSummaryCase* currentCase = curveDef.summaryCase();
|
RimSummaryCase* currentCase = curveDef.summaryCaseY();
|
||||||
|
|
||||||
if ( curveDef.isEnsembleCurve() )
|
if ( curveDef.isEnsembleCurve() )
|
||||||
{
|
{
|
||||||
@ -489,7 +489,7 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std:
|
|||||||
RimEnsembleCurveSet* curveSet = nullptr;
|
RimEnsembleCurveSet* curveSet = nullptr;
|
||||||
for ( const auto& cs : m_previewPlot->ensembleCurveSetCollection()->curveSets() )
|
for ( const auto& cs : m_previewPlot->ensembleCurveSetCollection()->curveSets() )
|
||||||
{
|
{
|
||||||
if ( cs->summaryCaseCollection() == curveDef.ensemble() && cs->summaryAddress() == curveDef.summaryAddress() )
|
if ( cs->summaryCaseCollection() == curveDef.ensemble() && cs->summaryAddress() == curveDef.summaryAddressY() )
|
||||||
{
|
{
|
||||||
curveSet = cs;
|
curveSet = cs;
|
||||||
break;
|
break;
|
||||||
@ -503,7 +503,7 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std:
|
|||||||
|
|
||||||
// Do not call setSummaryAddressAndStatisticsFlag() here, as the call to m_statistics->updateAllRequiredEditors(); causes a
|
// Do not call setSummaryAddressAndStatisticsFlag() here, as the call to m_statistics->updateAllRequiredEditors(); causes a
|
||||||
// crash in updateUiOrdering. The statistics curves will be created when the curve set is added to the plot.
|
// crash in updateUiOrdering. The statistics curves will be created when the curve set is added to the plot.
|
||||||
curveSet->setSummaryAddress( curveDef.summaryAddress() );
|
curveSet->setSummaryAddress( curveDef.summaryAddressY() );
|
||||||
|
|
||||||
// Set single curve set color
|
// Set single curve set color
|
||||||
auto allCurveSets = m_previewPlot->ensembleCurveSetCollection()->curveSets();
|
auto allCurveSets = m_previewPlot->ensembleCurveSetCollection()->curveSets();
|
||||||
@ -543,7 +543,7 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std:
|
|||||||
curve->setShowInLegend( false );
|
curve->setShowInLegend( false );
|
||||||
}
|
}
|
||||||
curve->setSummaryCaseY( currentCase );
|
curve->setSummaryCaseY( currentCase );
|
||||||
curve->setSummaryAddressYAndApplyInterpolation( curveDef.summaryAddress() );
|
curve->setSummaryAddressYAndApplyInterpolation( curveDef.summaryAddressY() );
|
||||||
curve->applyCurveAutoNameSettings( *m_curveNameConfig() );
|
curve->applyCurveAutoNameSettings( *m_curveNameConfig() );
|
||||||
if ( currentCase && currentCase->isObservedData() ) curve->setSymbolSkipDistance( 0 );
|
if ( currentCase && currentCase->isObservedData() ) curve->setSymbolSkipDistance( 0 );
|
||||||
|
|
||||||
|
@ -952,15 +952,15 @@ QString RimAnalysisPlot::assignGroupingText( RimAnalysisPlot::SortGroupType sor
|
|||||||
{
|
{
|
||||||
case RimAnalysisPlot::SUMMARY_ITEM:
|
case RimAnalysisPlot::SUMMARY_ITEM:
|
||||||
{
|
{
|
||||||
RifEclipseSummaryAddress addr = dataEntry.summaryAddress();
|
RifEclipseSummaryAddress addr = dataEntry.summaryAddressY();
|
||||||
groupingText = QString::fromStdString( addr.itemUiText() );
|
groupingText = QString::fromStdString( addr.itemUiText() );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RimAnalysisPlot::CASE:
|
case RimAnalysisPlot::CASE:
|
||||||
{
|
{
|
||||||
if ( dataEntry.summaryCase() )
|
if ( dataEntry.summaryCaseY() )
|
||||||
{
|
{
|
||||||
groupingText = dataEntry.summaryCase()->displayCaseName();
|
groupingText = dataEntry.summaryCaseY()->displayCaseName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -974,7 +974,7 @@ QString RimAnalysisPlot::assignGroupingText( RimAnalysisPlot::SortGroupType sor
|
|||||||
break;
|
break;
|
||||||
case RimAnalysisPlot::VECTOR:
|
case RimAnalysisPlot::VECTOR:
|
||||||
{
|
{
|
||||||
RifEclipseSummaryAddress addr = dataEntry.summaryAddress();
|
RifEclipseSummaryAddress addr = dataEntry.summaryAddressY();
|
||||||
|
|
||||||
groupingText = QString::fromStdString( addr.vectorName() );
|
groupingText = QString::fromStdString( addr.vectorName() );
|
||||||
}
|
}
|
||||||
@ -1030,11 +1030,11 @@ std::vector<RiaSummaryCurveDefinition> RimAnalysisPlot::filteredCurveDefs()
|
|||||||
|
|
||||||
for ( const auto& curveDef : dataDefinitions )
|
for ( const auto& curveDef : dataDefinitions )
|
||||||
{
|
{
|
||||||
if ( curveDef.summaryCase() )
|
if ( curveDef.summaryCaseY() )
|
||||||
{
|
{
|
||||||
filteredSumCases.insert( curveDef.summaryCase() );
|
filteredSumCases.insert( curveDef.summaryCaseY() );
|
||||||
|
|
||||||
RifEclipseSummaryAddress address = curveDef.summaryAddress();
|
RifEclipseSummaryAddress address = curveDef.summaryAddressY();
|
||||||
|
|
||||||
address.setVectorName( "" ); // Vector name set to "" in order to store only unique summary items
|
address.setVectorName( "" ); // Vector name set to "" in order to store only unique summary items
|
||||||
filteredSummaryItems.insert( address );
|
filteredSummaryItems.insert( address );
|
||||||
@ -1054,8 +1054,8 @@ std::vector<RiaSummaryCurveDefinition> RimAnalysisPlot::filteredCurveDefs()
|
|||||||
|
|
||||||
for ( const RiaSummaryCurveDefinition& curveDefCandidate : dataDefinitions )
|
for ( const RiaSummaryCurveDefinition& curveDefCandidate : dataDefinitions )
|
||||||
{
|
{
|
||||||
RimSummaryCase* sumCase = curveDefCandidate.summaryCase();
|
RimSummaryCase* sumCase = curveDefCandidate.summaryCaseY();
|
||||||
RifEclipseSummaryAddress addr = curveDefCandidate.summaryAddress();
|
RifEclipseSummaryAddress addr = curveDefCandidate.summaryAddressY();
|
||||||
addr.setVectorName( "" );
|
addr.setVectorName( "" );
|
||||||
|
|
||||||
if ( filteredSumCases.count( sumCase ) && filteredSummaryItems.count( addr ) )
|
if ( filteredSumCases.count( sumCase ) && filteredSummaryItems.count( addr ) )
|
||||||
@ -1421,8 +1421,8 @@ void RimAnalysisPlot::addDataToChartBuilder( RiuGroupedBarChartBuilder& chartBui
|
|||||||
|
|
||||||
for ( const RiaSummaryCurveDefinition& curveDef : barDataDefinitions )
|
for ( const RiaSummaryCurveDefinition& curveDef : barDataDefinitions )
|
||||||
{
|
{
|
||||||
if ( !curveDef.summaryCase() ) continue;
|
if ( !curveDef.summaryCaseY() ) continue;
|
||||||
RifSummaryReaderInterface* reader = curveDef.summaryCase()->summaryReader();
|
RifSummaryReaderInterface* reader = curveDef.summaryCaseY()->summaryReader();
|
||||||
|
|
||||||
if ( !reader ) continue;
|
if ( !reader ) continue;
|
||||||
|
|
||||||
@ -1437,15 +1437,15 @@ void RimAnalysisPlot::addDataToChartBuilder( RiuGroupedBarChartBuilder& chartBui
|
|||||||
referenceCaseReader,
|
referenceCaseReader,
|
||||||
-1,
|
-1,
|
||||||
DerivedSummaryOperator::DERIVED_OPERATOR_SUB,
|
DerivedSummaryOperator::DERIVED_OPERATOR_SUB,
|
||||||
curveDef.summaryAddress() );
|
curveDef.summaryAddressY() );
|
||||||
timeSteps.swap( timeAndValues.first );
|
timeSteps.swap( timeAndValues.first );
|
||||||
values.swap( timeAndValues.second );
|
values.swap( timeAndValues.second );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
timeSteps = reader->timeSteps( curveDef.summaryAddress() );
|
timeSteps = reader->timeSteps( curveDef.summaryAddressY() );
|
||||||
|
|
||||||
reader->values( curveDef.summaryAddress(), &values );
|
reader->values( curveDef.summaryAddressY(), &values );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !( timeSteps.size() && values.size() ) ) continue;
|
if ( !( timeSteps.size() && values.size() ) ) continue;
|
||||||
@ -1500,17 +1500,17 @@ void RimAnalysisPlot::addDataToChartBuilder( RiuGroupedBarChartBuilder& chartBui
|
|||||||
QStringList barTextComponents;
|
QStringList barTextComponents;
|
||||||
if ( m_useVectorNameInBarText )
|
if ( m_useVectorNameInBarText )
|
||||||
{
|
{
|
||||||
barTextComponents += QString::fromStdString( curveDef.summaryAddress().vectorName() );
|
barTextComponents += QString::fromStdString( curveDef.summaryAddressY().vectorName() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_useSummaryItemInBarText )
|
if ( m_useSummaryItemInBarText )
|
||||||
{
|
{
|
||||||
barTextComponents += QString::fromStdString( curveDef.summaryAddress().itemUiText() );
|
barTextComponents += QString::fromStdString( curveDef.summaryAddressY().itemUiText() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_useCaseInBarText && curveDef.summaryCase() )
|
if ( m_useCaseInBarText && curveDef.summaryCaseY() )
|
||||||
{
|
{
|
||||||
barTextComponents += curveDef.summaryCase()->displayCaseName();
|
barTextComponents += curveDef.summaryCaseY()->displayCaseName();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_useEnsembleInBarText && curveDef.ensemble() )
|
if ( m_useEnsembleInBarText && curveDef.ensemble() )
|
||||||
|
@ -63,12 +63,12 @@ RimAnalysisPlotDataEntry::~RimAnalysisPlotDataEntry()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimAnalysisPlotDataEntry::setFromCurveDefinition( const RiaSummaryCurveDefinition& curveDef )
|
void RimAnalysisPlotDataEntry::setFromCurveDefinition( const RiaSummaryCurveDefinition& curveDef )
|
||||||
{
|
{
|
||||||
m_summaryAddress->setAddress( curveDef.summaryAddress() );
|
m_summaryAddress->setAddress( curveDef.summaryAddressY() );
|
||||||
if ( curveDef.ensemble() )
|
if ( curveDef.ensemble() )
|
||||||
{
|
{
|
||||||
m_ensemble = curveDef.ensemble();
|
m_ensemble = curveDef.ensemble();
|
||||||
}
|
}
|
||||||
m_summaryCase = curveDef.summaryCase();
|
m_summaryCase = curveDef.summaryCaseY();
|
||||||
m_isEnsembleCurve = curveDef.isEnsembleCurve();
|
m_isEnsembleCurve = curveDef.isEnsembleCurve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -511,7 +511,7 @@ void RimCorrelationMatrixPlot::createMatrix()
|
|||||||
for ( auto curveDef : curveDefs )
|
for ( auto curveDef : curveDefs )
|
||||||
{
|
{
|
||||||
auto ensemble = curveDef.ensemble();
|
auto ensemble = curveDef.ensemble();
|
||||||
auto address = curveDef.summaryAddress();
|
auto address = curveDef.summaryAddressY();
|
||||||
|
|
||||||
if ( ensemble )
|
if ( ensemble )
|
||||||
{
|
{
|
||||||
|
@ -323,7 +323,7 @@ void RimCorrelationPlotCollection::applyFirstEnsembleFieldAddressesToReport( Rim
|
|||||||
|
|
||||||
time_t timeStep = *( plot->matrixPlot()->allAvailableTimeSteps().rbegin() );
|
time_t timeStep = *( plot->matrixPlot()->allAvailableTimeSteps().rbegin() );
|
||||||
auto correlationSortedEnsembleParameters =
|
auto correlationSortedEnsembleParameters =
|
||||||
ensembles.front()->correlationSortedEnsembleParameters( curveDefsTornadoAndCrossPlot.front().summaryAddress(), timeStep );
|
ensembles.front()->correlationSortedEnsembleParameters( curveDefsTornadoAndCrossPlot.front().summaryAddressY(), timeStep );
|
||||||
if ( !correlationSortedEnsembleParameters.empty() )
|
if ( !correlationSortedEnsembleParameters.empty() )
|
||||||
{
|
{
|
||||||
QString crossPlotEnsembleParameterName = correlationSortedEnsembleParameters.front().first.name;
|
QString crossPlotEnsembleParameterName = correlationSortedEnsembleParameters.front().first.name;
|
||||||
@ -369,7 +369,7 @@ void RimCorrelationPlotCollection::applyEnsembleFieldAndTimeStepToReport( RimCor
|
|||||||
plot->crossPlot()->setTimeStep( timeStep );
|
plot->crossPlot()->setTimeStep( timeStep );
|
||||||
|
|
||||||
auto correlationSortedEnsembleParameters =
|
auto correlationSortedEnsembleParameters =
|
||||||
ensemble->correlationSortedEnsembleParameters( curveDefsTornadoAndCrossPlot.front().summaryAddress(), timeStep );
|
ensemble->correlationSortedEnsembleParameters( curveDefsTornadoAndCrossPlot.front().summaryAddressY(), timeStep );
|
||||||
QString crossPlotEnsembleParameterName = correlationSortedEnsembleParameters.front().first.name;
|
QString crossPlotEnsembleParameterName = correlationSortedEnsembleParameters.front().first.name;
|
||||||
plot->crossPlot()->setEnsembleParameter( crossPlotEnsembleParameterName );
|
plot->crossPlot()->setEnsembleParameter( crossPlotEnsembleParameterName );
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ void RimCustomObjectiveFunctionWeight::fieldChangedByUi( const caf::PdmFieldHand
|
|||||||
for ( auto address : curveSelection )
|
for ( auto address : curveSelection )
|
||||||
{
|
{
|
||||||
RimSummaryAddress* summaryAddress = new RimSummaryAddress();
|
RimSummaryAddress* summaryAddress = new RimSummaryAddress();
|
||||||
summaryAddress->setAddress( address.summaryAddress() );
|
summaryAddress->setAddress( address.summaryAddressY() );
|
||||||
m_objectiveValuesSummaryAddresses.push_back( summaryAddress );
|
m_objectiveValuesSummaryAddresses.push_back( summaryAddress );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,8 +77,8 @@ void RimSummaryCalculationVariable::fieldChangedByUi( const caf::PdmFieldHandle*
|
|||||||
std::vector<RiaSummaryCurveDefinition> curveSelection = dlg.curveSelection();
|
std::vector<RiaSummaryCurveDefinition> curveSelection = dlg.curveSelection();
|
||||||
if ( curveSelection.size() > 0 )
|
if ( curveSelection.size() > 0 )
|
||||||
{
|
{
|
||||||
m_case = curveSelection[0].summaryCase();
|
m_case = curveSelection[0].summaryCaseY();
|
||||||
m_summaryAddress->setAddress( curveSelection[0].summaryAddress() );
|
m_summaryAddress->setAddress( curveSelection[0].summaryAddressY() );
|
||||||
|
|
||||||
writeDataToApplicationStore();
|
writeDataToApplicationStore();
|
||||||
|
|
||||||
|
@ -391,7 +391,7 @@ void RimEnsembleCurveFilter::fieldChangedByUi( const caf::PdmFieldHandle* change
|
|||||||
for ( auto address : curveSelection )
|
for ( auto address : curveSelection )
|
||||||
{
|
{
|
||||||
RimSummaryAddress* summaryAddress = new RimSummaryAddress();
|
RimSummaryAddress* summaryAddress = new RimSummaryAddress();
|
||||||
summaryAddress->setAddress( address.summaryAddress() );
|
summaryAddress->setAddress( address.summaryAddressY() );
|
||||||
m_objectiveValuesSummaryAddresses.push_back( summaryAddress );
|
m_objectiveValuesSummaryAddresses.push_back( summaryAddress );
|
||||||
}
|
}
|
||||||
loadDataAndUpdate();
|
loadDataAndUpdate();
|
||||||
|
@ -808,7 +808,7 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
|||||||
if ( !curveSelection.empty() )
|
if ( !curveSelection.empty() )
|
||||||
{
|
{
|
||||||
m_yValuesSummaryCaseCollection = curveSelection[0].ensemble();
|
m_yValuesSummaryCaseCollection = curveSelection[0].ensemble();
|
||||||
m_yValuesSummaryAddress->setAddress( curveSelection[0].summaryAddress() );
|
m_yValuesSummaryAddress->setAddress( curveSelection[0].summaryAddressY() );
|
||||||
|
|
||||||
loadDataAndUpdate( true );
|
loadDataAndUpdate( true );
|
||||||
|
|
||||||
@ -846,7 +846,7 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
|||||||
for ( auto address : curveSelection )
|
for ( auto address : curveSelection )
|
||||||
{
|
{
|
||||||
RimSummaryAddress* summaryAddress = new RimSummaryAddress();
|
RimSummaryAddress* summaryAddress = new RimSummaryAddress();
|
||||||
summaryAddress->setAddress( address.summaryAddress() );
|
summaryAddress->setAddress( address.summaryAddressY() );
|
||||||
m_objectiveValuesSummaryAddresses.push_back( summaryAddress );
|
m_objectiveValuesSummaryAddresses.push_back( summaryAddress );
|
||||||
}
|
}
|
||||||
loadDataAndUpdate( true );
|
loadDataAndUpdate( true );
|
||||||
|
@ -284,8 +284,8 @@ std::vector<double> RimSummaryCurve::valuesY() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryCurve::applyCurveDefinitionY( const RiaSummaryCurveDefinition& curveDefinition )
|
void RimSummaryCurve::applyCurveDefinitionY( const RiaSummaryCurveDefinition& curveDefinition )
|
||||||
{
|
{
|
||||||
setSummaryCaseY( curveDefinition.summaryCase() );
|
setSummaryCaseY( curveDefinition.summaryCaseY() );
|
||||||
setSummaryAddressY( curveDefinition.summaryAddress() );
|
setSummaryAddressY( curveDefinition.summaryAddressY() );
|
||||||
setIsEnsembleCurve( curveDefinition.isEnsembleCurve() );
|
setIsEnsembleCurve( curveDefinition.isEnsembleCurve() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1124,8 +1124,8 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|||||||
auto curveSelection = dlg.curveSelection();
|
auto curveSelection = dlg.curveSelection();
|
||||||
if ( curveSelection.size() > 0 )
|
if ( curveSelection.size() > 0 )
|
||||||
{
|
{
|
||||||
m_yValuesSummaryCase = curveSelection[0].summaryCase();
|
m_yValuesSummaryCase = curveSelection[0].summaryCaseY();
|
||||||
m_yValuesSummaryAddress->setAddress( curveSelection[0].summaryAddress() );
|
m_yValuesSummaryAddress->setAddress( curveSelection[0].summaryAddressY() );
|
||||||
|
|
||||||
crossPlotTestForMatchingTimeSteps = true;
|
crossPlotTestForMatchingTimeSteps = true;
|
||||||
loadAndUpdate = true;
|
loadAndUpdate = true;
|
||||||
@ -1158,8 +1158,8 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|||||||
auto curveSelection = dlg.curveSelection();
|
auto curveSelection = dlg.curveSelection();
|
||||||
if ( curveSelection.size() > 0 )
|
if ( curveSelection.size() > 0 )
|
||||||
{
|
{
|
||||||
m_xValuesSummaryCase = curveSelection[0].summaryCase();
|
m_xValuesSummaryCase = curveSelection[0].summaryCaseY();
|
||||||
m_xValuesSummaryAddress->setAddress( curveSelection[0].summaryAddress() );
|
m_xValuesSummaryAddress->setAddress( curveSelection[0].summaryAddressY() );
|
||||||
|
|
||||||
crossPlotTestForMatchingTimeSteps = true;
|
crossPlotTestForMatchingTimeSteps = true;
|
||||||
loadAndUpdate = true;
|
loadAndUpdate = true;
|
||||||
|
@ -413,16 +413,16 @@ void RimSummaryCurveAppearanceCalculator::init( const std::vector<RiaSummaryCurv
|
|||||||
|
|
||||||
for ( const RiaSummaryCurveDefinition& curveDef : curveDefinitions )
|
for ( const RiaSummaryCurveDefinition& curveDef : curveDefinitions )
|
||||||
{
|
{
|
||||||
if ( curveDef.summaryCase() ) m_caseToAppearanceIdxMap[curveDef.summaryCase()] = -1;
|
if ( curveDef.summaryCaseY() ) m_caseToAppearanceIdxMap[curveDef.summaryCaseY()] = -1;
|
||||||
if ( !curveDef.summaryAddress().wellName().empty() ) m_welToAppearanceIdxMap[curveDef.summaryAddress().wellName()] = -1;
|
if ( !curveDef.summaryAddressY().wellName().empty() ) m_welToAppearanceIdxMap[curveDef.summaryAddressY().wellName()] = -1;
|
||||||
if ( !curveDef.summaryAddress().groupName().empty() ) m_grpToAppearanceIdxMap[curveDef.summaryAddress().groupName()] = -1;
|
if ( !curveDef.summaryAddressY().groupName().empty() ) m_grpToAppearanceIdxMap[curveDef.summaryAddressY().groupName()] = -1;
|
||||||
if ( !( curveDef.summaryAddress().regionNumber() == -1 ) ) m_regToAppearanceIdxMap[curveDef.summaryAddress().regionNumber()] = -1;
|
if ( !( curveDef.summaryAddressY().regionNumber() == -1 ) ) m_regToAppearanceIdxMap[curveDef.summaryAddressY().regionNumber()] = -1;
|
||||||
|
|
||||||
if ( !curveDef.summaryAddress().vectorName().empty() )
|
if ( !curveDef.summaryAddressY().vectorName().empty() )
|
||||||
{
|
{
|
||||||
std::string varname = curveDef.summaryAddress().vectorName();
|
std::string varname = curveDef.summaryAddressY().vectorName();
|
||||||
|
|
||||||
if ( curveDef.summaryAddress().isHistoryVector() )
|
if ( curveDef.summaryAddressY().isHistoryVector() )
|
||||||
{
|
{
|
||||||
varname = varname.substr( 0, varname.size() - 1 );
|
varname = varname.substr( 0, varname.size() - 1 );
|
||||||
}
|
}
|
||||||
|
@ -2307,28 +2307,28 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleAddressCollectionDrop( RimSummar
|
|||||||
for ( auto& curveDef : sourceCurveDefs )
|
for ( auto& curveDef : sourceCurveDefs )
|
||||||
{
|
{
|
||||||
auto newCurveDef = curveDef;
|
auto newCurveDef = curveDef;
|
||||||
auto curveAdr = newCurveDef.summaryAddress();
|
auto curveAdr = newCurveDef.summaryAddressY();
|
||||||
std::string objectIdentifierString;
|
std::string objectIdentifierString;
|
||||||
if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL ) &&
|
if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL ) &&
|
||||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL ) )
|
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL ) )
|
||||||
{
|
{
|
||||||
objectIdentifierString = curveAdr.wellName();
|
objectIdentifierString = curveAdr.wellName();
|
||||||
curveAdr.setWellName( droppedName );
|
curveAdr.setWellName( droppedName );
|
||||||
newCurveDef.setSummaryAddress( curveAdr );
|
newCurveDef.setSummaryAddressY( curveAdr );
|
||||||
}
|
}
|
||||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP ) &&
|
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP ) &&
|
||||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::GROUP ) )
|
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::GROUP ) )
|
||||||
{
|
{
|
||||||
objectIdentifierString = curveAdr.groupName();
|
objectIdentifierString = curveAdr.groupName();
|
||||||
curveAdr.setGroupName( droppedName );
|
curveAdr.setGroupName( droppedName );
|
||||||
newCurveDef.setSummaryAddress( curveAdr );
|
newCurveDef.setSummaryAddressY( curveAdr );
|
||||||
}
|
}
|
||||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_NETWORK ) &&
|
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_NETWORK ) &&
|
||||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::NETWORK ) )
|
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::NETWORK ) )
|
||||||
{
|
{
|
||||||
objectIdentifierString = curveAdr.networkName();
|
objectIdentifierString = curveAdr.networkName();
|
||||||
curveAdr.setNetworkName( droppedName );
|
curveAdr.setNetworkName( droppedName );
|
||||||
newCurveDef.setSummaryAddress( curveAdr );
|
newCurveDef.setSummaryAddressY( curveAdr );
|
||||||
}
|
}
|
||||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION ) &&
|
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION ) &&
|
||||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION ) )
|
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION ) )
|
||||||
@ -2338,7 +2338,7 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleAddressCollectionDrop( RimSummar
|
|||||||
int droppedRegion = std::stoi( droppedName );
|
int droppedRegion = std::stoi( droppedName );
|
||||||
|
|
||||||
curveAdr.setRegion( droppedRegion );
|
curveAdr.setRegion( droppedRegion );
|
||||||
newCurveDef.setSummaryAddress( curveAdr );
|
newCurveDef.setSummaryAddressY( curveAdr );
|
||||||
}
|
}
|
||||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_SEGMENT ) &&
|
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_SEGMENT ) &&
|
||||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_SEGMENT ) )
|
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_SEGMENT ) )
|
||||||
@ -2348,20 +2348,20 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleAddressCollectionDrop( RimSummar
|
|||||||
int droppedWellSegmentNumber = std::stoi( droppedName );
|
int droppedWellSegmentNumber = std::stoi( droppedName );
|
||||||
|
|
||||||
curveAdr.setWellSegmentNumber( droppedWellSegmentNumber );
|
curveAdr.setWellSegmentNumber( droppedWellSegmentNumber );
|
||||||
newCurveDef.setSummaryAddress( curveAdr );
|
newCurveDef.setSummaryAddressY( curveAdr );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !objectIdentifierString.empty() )
|
if ( !objectIdentifierString.empty() )
|
||||||
{
|
{
|
||||||
newCurveDefsWithObjectNames[newCurveDef].insert( objectIdentifierString );
|
newCurveDefsWithObjectNames[newCurveDef].insert( objectIdentifierString );
|
||||||
const auto& addr = curveDef.summaryAddress();
|
const auto& addr = curveDef.summaryAddressY();
|
||||||
if ( !addr.isHistoryVector() && RiaPreferencesSummary::current()->appendHistoryVectors() )
|
if ( !addr.isHistoryVector() && RiaPreferencesSummary::current()->appendHistoryVectors() )
|
||||||
{
|
{
|
||||||
auto historyAddr = addr;
|
auto historyAddr = addr;
|
||||||
historyAddr.setVectorName( addr.vectorName() + RifReaderEclipseSummary::historyIdentifier() );
|
historyAddr.setVectorName( addr.vectorName() + RifReaderEclipseSummary::historyIdentifier() );
|
||||||
|
|
||||||
auto historyCurveDef = newCurveDef;
|
auto historyCurveDef = newCurveDef;
|
||||||
historyCurveDef.setSummaryAddress( historyAddr );
|
historyCurveDef.setSummaryAddressY( historyAddr );
|
||||||
newCurveDefsWithObjectNames[historyCurveDef].insert( objectIdentifierString );
|
newCurveDefsWithObjectNames[historyCurveDef].insert( objectIdentifierString );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2375,17 +2375,17 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleAddressCollectionDrop( RimSummar
|
|||||||
if ( curveDef.ensemble() )
|
if ( curveDef.ensemble() )
|
||||||
{
|
{
|
||||||
auto addresses = curveDef.ensemble()->ensembleSummaryAddresses();
|
auto addresses = curveDef.ensemble()->ensembleSummaryAddresses();
|
||||||
if ( addresses.find( curveDef.summaryAddress() ) != addresses.end() )
|
if ( addresses.find( curveDef.summaryAddressY() ) != addresses.end() )
|
||||||
{
|
{
|
||||||
curveSetsToUpdate.push_back( addNewEnsembleCurveY( curveDef.summaryAddress(), curveDef.ensemble() ) );
|
curveSetsToUpdate.push_back( addNewEnsembleCurveY( curveDef.summaryAddressY(), curveDef.ensemble() ) );
|
||||||
newCurves++;
|
newCurves++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( curveDef.summaryCase() )
|
else if ( curveDef.summaryCaseY() )
|
||||||
{
|
{
|
||||||
if ( curveDef.summaryCase()->summaryReader() && curveDef.summaryCase()->summaryReader()->hasAddress( curveDef.summaryAddress() ) )
|
if ( curveDef.summaryCaseY()->summaryReader() && curveDef.summaryCaseY()->summaryReader()->hasAddress( curveDef.summaryAddressY() ) )
|
||||||
{
|
{
|
||||||
curves.push_back( addNewCurveY( curveDef.summaryAddress(), curveDef.summaryCase() ) );
|
curves.push_back( addNewCurveY( curveDef.summaryAddressY(), curveDef.summaryCaseY() ) );
|
||||||
newCurves++;
|
newCurves++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,11 +274,11 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const
|
|||||||
|
|
||||||
for ( const RiaSummaryCurveDefinition& curveDef : m_curveDefinitions )
|
for ( const RiaSummaryCurveDefinition& curveDef : m_curveDefinitions )
|
||||||
{
|
{
|
||||||
const RifEclipseSummaryAddress& sumAddress = curveDef.summaryAddress();
|
const RifEclipseSummaryAddress& sumAddress = curveDef.summaryAddressY();
|
||||||
std::string unitText;
|
std::string unitText;
|
||||||
if ( curveDef.summaryCase() && curveDef.summaryCase()->summaryReader() )
|
if ( curveDef.summaryCaseY() && curveDef.summaryCaseY()->summaryReader() )
|
||||||
{
|
{
|
||||||
unitText = curveDef.summaryCase()->summaryReader()->unitName( sumAddress );
|
unitText = curveDef.summaryCaseY()->summaryReader()->unitName( sumAddress );
|
||||||
}
|
}
|
||||||
else if ( curveDef.ensemble() )
|
else if ( curveDef.ensemble() )
|
||||||
{
|
{
|
||||||
@ -388,7 +388,7 @@ QString RimSummaryPlotAxisFormatter::createAxisObjectName() const
|
|||||||
|
|
||||||
for ( const RiaSummaryCurveDefinition& curveDef : m_curveDefinitions )
|
for ( const RiaSummaryCurveDefinition& curveDef : m_curveDefinitions )
|
||||||
{
|
{
|
||||||
const RifEclipseSummaryAddress& sumAddress = curveDef.summaryAddress();
|
const RifEclipseSummaryAddress& sumAddress = curveDef.summaryAddressY();
|
||||||
|
|
||||||
addVectorNames( sumAddress );
|
addVectorNames( sumAddress );
|
||||||
}
|
}
|
||||||
|
@ -639,11 +639,11 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
|
|||||||
std::set<SummaryCategory> categories;
|
std::set<SummaryCategory> categories;
|
||||||
for ( const auto& curveDef : curveDefinitions )
|
for ( const auto& curveDef : curveDefinitions )
|
||||||
{
|
{
|
||||||
if ( !( curveDef.summaryCase() || curveDef.isEnsembleCurve() ) ) continue;
|
if ( !( curveDef.summaryCaseY() || curveDef.isEnsembleCurve() ) ) continue;
|
||||||
|
|
||||||
RimSummaryCase* summaryCase = curveDef.summaryCase();
|
RimSummaryCase* summaryCase = curveDef.summaryCaseY();
|
||||||
|
|
||||||
RifEclipseSummaryAddress summaryAddress = curveDef.summaryAddress();
|
RifEclipseSummaryAddress summaryAddress = curveDef.summaryAddressY();
|
||||||
|
|
||||||
// Ignore ensemble statistics curves
|
// Ignore ensemble statistics curves
|
||||||
if ( summaryAddress.category() == SummaryCategory::SUMMARY_ENSEMBLE_STATISTICS ) continue;
|
if ( summaryAddress.category() == SummaryCategory::SUMMARY_ENSEMBLE_STATISTICS ) continue;
|
||||||
@ -677,11 +677,11 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( curveDef.summaryCase() && ( !curveDef.ensemble() || m_showIndividualEnsembleCases ) )
|
if ( curveDef.summaryCaseY() && ( !curveDef.ensemble() || m_showIndividualEnsembleCases ) )
|
||||||
{
|
{
|
||||||
if ( std::find( m_selectedSources.begin(), m_selectedSources.end(), curveDef.summaryCase() ) == m_selectedSources.end() )
|
if ( std::find( m_selectedSources.begin(), m_selectedSources.end(), curveDef.summaryCaseY() ) == m_selectedSources.end() )
|
||||||
{
|
{
|
||||||
m_selectedSources.push_back( curveDef.summaryCase() );
|
m_selectedSources.push_back( curveDef.summaryCaseY() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -713,7 +713,7 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
categories.insert( curveDef.summaryAddress().category() );
|
categories.insert( curveDef.summaryAddressY().category() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !categories.empty() )
|
if ( !categories.empty() )
|
||||||
|
Loading…
Reference in New Issue
Block a user