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()
|
||||
: m_summaryCase( nullptr )
|
||||
: m_summaryCaseY( nullptr )
|
||||
, m_summaryCaseX( nullptr )
|
||||
, m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
||||
, m_ensemble( nullptr )
|
||||
@ -44,8 +44,8 @@ RiaSummaryCurveDefinition::RiaSummaryCurveDefinition()
|
||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCase* summaryCase,
|
||||
const RifEclipseSummaryAddress& summaryAddress,
|
||||
bool isEnsembleCurve )
|
||||
: m_summaryCase( summaryCase )
|
||||
, m_summaryAddress( summaryAddress )
|
||||
: m_summaryCaseY( summaryCase )
|
||||
, m_summaryAddressY( summaryAddress )
|
||||
, m_summaryCaseX( nullptr )
|
||||
, m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
||||
, m_ensemble( nullptr )
|
||||
@ -57,8 +57,8 @@ RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCase*
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddress )
|
||||
: m_summaryCase( nullptr )
|
||||
, m_summaryAddress( summaryAddress )
|
||||
: m_summaryCaseY( nullptr )
|
||||
, m_summaryAddressY( summaryAddress )
|
||||
, m_summaryCaseX( nullptr )
|
||||
, m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
||||
, 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 ) )
|
||||
{
|
||||
m_summaryAddress.setWellName( name );
|
||||
m_summaryAddressY.setWellName( name );
|
||||
m_summaryAddressX.setWellName( name );
|
||||
}
|
||||
|
||||
@ -154,16 +154,16 @@ void RiaSummaryCurveDefinition::setIdentifierText( SummaryCategory category, con
|
||||
switch ( category )
|
||||
{
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_AQUIFER:
|
||||
m_summaryAddress.setAquiferNumber( id );
|
||||
m_summaryAddressY.setAquiferNumber( id );
|
||||
m_summaryAddressX.setAquiferNumber( id );
|
||||
break;
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION_2_REGION:
|
||||
m_summaryAddress.setRegion( id );
|
||||
m_summaryAddressY.setRegion( id );
|
||||
m_summaryAddressX.setRegion( id );
|
||||
break;
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP:
|
||||
m_summaryAddress.setGroupName( name );
|
||||
m_summaryAddressY.setGroupName( name );
|
||||
m_summaryAddressX.setGroupName( name );
|
||||
break;
|
||||
default:
|
||||
@ -176,13 +176,13 @@ void RiaSummaryCurveDefinition::setIdentifierText( SummaryCategory category, con
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& curveDefinition, gsl::not_null<std::vector<double>*> values )
|
||||
{
|
||||
if ( !curveDefinition.summaryAddress().isValid() ) return;
|
||||
if ( !curveDefinition.summaryCase() ) return;
|
||||
if ( !curveDefinition.summaryAddressY().isValid() ) return;
|
||||
if ( !curveDefinition.summaryCaseY() ) return;
|
||||
|
||||
RifSummaryReaderInterface* reader = curveDefinition.summaryCase()->summaryReader();
|
||||
RifSummaryReaderInterface* reader = curveDefinition.summaryCaseY()->summaryReader();
|
||||
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 )
|
||||
{
|
||||
if ( !curveDefinition.summaryAddress().isValid() ) return {};
|
||||
if ( !curveDefinition.summaryCase() ) return {};
|
||||
if ( !curveDefinition.summaryAddressY().isValid() ) return {};
|
||||
if ( !curveDefinition.summaryCaseY() ) return {};
|
||||
|
||||
RifSummaryReaderInterface* reader = curveDefinition.summaryCase()->summaryReader();
|
||||
RifSummaryReaderInterface* reader = curveDefinition.summaryCaseY()->summaryReader();
|
||||
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 caseName;
|
||||
if ( summaryCase() )
|
||||
caseName = summaryCase()->displayCaseName();
|
||||
if ( summaryCaseY() )
|
||||
caseName = summaryCaseY()->displayCaseName();
|
||||
else if ( ensemble() )
|
||||
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();
|
||||
}
|
||||
|
||||
if ( m_summaryCase != other.summaryCase() )
|
||||
if ( m_summaryCaseY != other.summaryCaseY() )
|
||||
{
|
||||
QString summaryCaseName;
|
||||
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
|
||||
@ -279,12 +279,12 @@ bool RiaSummaryCurveDefinition::operator<( const RiaSummaryCurveDefinition& othe
|
||||
}
|
||||
|
||||
// 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();
|
||||
@ -308,20 +308,20 @@ void RiaSummaryCurveDefinitionAnalyser::setCurveDefinitions( const std::vector<R
|
||||
m_ensembles.insert( curveDef.ensemble() );
|
||||
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;
|
||||
}
|
||||
|
||||
if ( valid )
|
||||
{
|
||||
const RifEclipseSummaryAddress& address = curveDef.summaryAddress();
|
||||
const RifEclipseSummaryAddress& address = curveDef.summaryAddressY();
|
||||
|
||||
m_vectorNames.insert( address.vectorName() );
|
||||
m_summaryAdresses.insert( address );
|
||||
|
@ -42,11 +42,11 @@ public:
|
||||
explicit RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddress );
|
||||
|
||||
// Y Axis
|
||||
RimSummaryCase* summaryCase() const;
|
||||
const RifEclipseSummaryAddress& summaryAddress() const;
|
||||
RimSummaryCaseCollection* ensemble() const;
|
||||
bool isEnsembleCurve() const;
|
||||
void setSummaryAddress( const RifEclipseSummaryAddress& address );
|
||||
RimSummaryCase* summaryCaseY() const;
|
||||
RifEclipseSummaryAddress summaryAddressY() const;
|
||||
RimSummaryCaseCollection* ensemble() const;
|
||||
bool isEnsembleCurve() const;
|
||||
void setSummaryAddressY( const RifEclipseSummaryAddress& address );
|
||||
|
||||
// X Axis
|
||||
void setSummaryCaseX( RimSummaryCase* summaryCase );
|
||||
@ -67,8 +67,8 @@ public:
|
||||
static QString curveDefinitionText( const QString& caseName, const RifEclipseSummaryAddress& summaryAddress );
|
||||
|
||||
private:
|
||||
RimSummaryCase* m_summaryCase;
|
||||
RifEclipseSummaryAddress m_summaryAddress;
|
||||
RimSummaryCase* m_summaryCaseY;
|
||||
RifEclipseSummaryAddress m_summaryAddressY;
|
||||
RimSummaryCase* m_summaryCaseX;
|
||||
RifEclipseSummaryAddress m_summaryAddressX;
|
||||
RimSummaryCaseCollection* m_ensemble;
|
||||
|
@ -481,7 +481,7 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std:
|
||||
std::map<RimSummaryCurve*, std::pair<bool, bool>> stashedErrorBarsAndLegendVisibility;
|
||||
for ( const auto& curveDef : curveDefsToAdd )
|
||||
{
|
||||
RimSummaryCase* currentCase = curveDef.summaryCase();
|
||||
RimSummaryCase* currentCase = curveDef.summaryCaseY();
|
||||
|
||||
if ( curveDef.isEnsembleCurve() )
|
||||
{
|
||||
@ -489,7 +489,7 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std:
|
||||
RimEnsembleCurveSet* curveSet = nullptr;
|
||||
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;
|
||||
break;
|
||||
@ -503,7 +503,7 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std:
|
||||
|
||||
// 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.
|
||||
curveSet->setSummaryAddress( curveDef.summaryAddress() );
|
||||
curveSet->setSummaryAddress( curveDef.summaryAddressY() );
|
||||
|
||||
// Set single curve set color
|
||||
auto allCurveSets = m_previewPlot->ensembleCurveSetCollection()->curveSets();
|
||||
@ -543,7 +543,7 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std:
|
||||
curve->setShowInLegend( false );
|
||||
}
|
||||
curve->setSummaryCaseY( currentCase );
|
||||
curve->setSummaryAddressYAndApplyInterpolation( curveDef.summaryAddress() );
|
||||
curve->setSummaryAddressYAndApplyInterpolation( curveDef.summaryAddressY() );
|
||||
curve->applyCurveAutoNameSettings( *m_curveNameConfig() );
|
||||
if ( currentCase && currentCase->isObservedData() ) curve->setSymbolSkipDistance( 0 );
|
||||
|
||||
|
@ -952,15 +952,15 @@ QString RimAnalysisPlot::assignGroupingText( RimAnalysisPlot::SortGroupType sor
|
||||
{
|
||||
case RimAnalysisPlot::SUMMARY_ITEM:
|
||||
{
|
||||
RifEclipseSummaryAddress addr = dataEntry.summaryAddress();
|
||||
RifEclipseSummaryAddress addr = dataEntry.summaryAddressY();
|
||||
groupingText = QString::fromStdString( addr.itemUiText() );
|
||||
}
|
||||
break;
|
||||
case RimAnalysisPlot::CASE:
|
||||
{
|
||||
if ( dataEntry.summaryCase() )
|
||||
if ( dataEntry.summaryCaseY() )
|
||||
{
|
||||
groupingText = dataEntry.summaryCase()->displayCaseName();
|
||||
groupingText = dataEntry.summaryCaseY()->displayCaseName();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -974,7 +974,7 @@ QString RimAnalysisPlot::assignGroupingText( RimAnalysisPlot::SortGroupType sor
|
||||
break;
|
||||
case RimAnalysisPlot::VECTOR:
|
||||
{
|
||||
RifEclipseSummaryAddress addr = dataEntry.summaryAddress();
|
||||
RifEclipseSummaryAddress addr = dataEntry.summaryAddressY();
|
||||
|
||||
groupingText = QString::fromStdString( addr.vectorName() );
|
||||
}
|
||||
@ -1030,11 +1030,11 @@ std::vector<RiaSummaryCurveDefinition> RimAnalysisPlot::filteredCurveDefs()
|
||||
|
||||
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
|
||||
filteredSummaryItems.insert( address );
|
||||
@ -1054,8 +1054,8 @@ std::vector<RiaSummaryCurveDefinition> RimAnalysisPlot::filteredCurveDefs()
|
||||
|
||||
for ( const RiaSummaryCurveDefinition& curveDefCandidate : dataDefinitions )
|
||||
{
|
||||
RimSummaryCase* sumCase = curveDefCandidate.summaryCase();
|
||||
RifEclipseSummaryAddress addr = curveDefCandidate.summaryAddress();
|
||||
RimSummaryCase* sumCase = curveDefCandidate.summaryCaseY();
|
||||
RifEclipseSummaryAddress addr = curveDefCandidate.summaryAddressY();
|
||||
addr.setVectorName( "" );
|
||||
|
||||
if ( filteredSumCases.count( sumCase ) && filteredSummaryItems.count( addr ) )
|
||||
@ -1421,8 +1421,8 @@ void RimAnalysisPlot::addDataToChartBuilder( RiuGroupedBarChartBuilder& chartBui
|
||||
|
||||
for ( const RiaSummaryCurveDefinition& curveDef : barDataDefinitions )
|
||||
{
|
||||
if ( !curveDef.summaryCase() ) continue;
|
||||
RifSummaryReaderInterface* reader = curveDef.summaryCase()->summaryReader();
|
||||
if ( !curveDef.summaryCaseY() ) continue;
|
||||
RifSummaryReaderInterface* reader = curveDef.summaryCaseY()->summaryReader();
|
||||
|
||||
if ( !reader ) continue;
|
||||
|
||||
@ -1437,15 +1437,15 @@ void RimAnalysisPlot::addDataToChartBuilder( RiuGroupedBarChartBuilder& chartBui
|
||||
referenceCaseReader,
|
||||
-1,
|
||||
DerivedSummaryOperator::DERIVED_OPERATOR_SUB,
|
||||
curveDef.summaryAddress() );
|
||||
curveDef.summaryAddressY() );
|
||||
timeSteps.swap( timeAndValues.first );
|
||||
values.swap( timeAndValues.second );
|
||||
}
|
||||
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;
|
||||
@ -1500,17 +1500,17 @@ void RimAnalysisPlot::addDataToChartBuilder( RiuGroupedBarChartBuilder& chartBui
|
||||
QStringList barTextComponents;
|
||||
if ( m_useVectorNameInBarText )
|
||||
{
|
||||
barTextComponents += QString::fromStdString( curveDef.summaryAddress().vectorName() );
|
||||
barTextComponents += QString::fromStdString( curveDef.summaryAddressY().vectorName() );
|
||||
}
|
||||
|
||||
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() )
|
||||
|
@ -63,12 +63,12 @@ RimAnalysisPlotDataEntry::~RimAnalysisPlotDataEntry()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimAnalysisPlotDataEntry::setFromCurveDefinition( const RiaSummaryCurveDefinition& curveDef )
|
||||
{
|
||||
m_summaryAddress->setAddress( curveDef.summaryAddress() );
|
||||
m_summaryAddress->setAddress( curveDef.summaryAddressY() );
|
||||
if ( curveDef.ensemble() )
|
||||
{
|
||||
m_ensemble = curveDef.ensemble();
|
||||
}
|
||||
m_summaryCase = curveDef.summaryCase();
|
||||
m_summaryCase = curveDef.summaryCaseY();
|
||||
m_isEnsembleCurve = curveDef.isEnsembleCurve();
|
||||
}
|
||||
|
||||
|
@ -511,7 +511,7 @@ void RimCorrelationMatrixPlot::createMatrix()
|
||||
for ( auto curveDef : curveDefs )
|
||||
{
|
||||
auto ensemble = curveDef.ensemble();
|
||||
auto address = curveDef.summaryAddress();
|
||||
auto address = curveDef.summaryAddressY();
|
||||
|
||||
if ( ensemble )
|
||||
{
|
||||
|
@ -323,7 +323,7 @@ void RimCorrelationPlotCollection::applyFirstEnsembleFieldAddressesToReport( Rim
|
||||
|
||||
time_t timeStep = *( plot->matrixPlot()->allAvailableTimeSteps().rbegin() );
|
||||
auto correlationSortedEnsembleParameters =
|
||||
ensembles.front()->correlationSortedEnsembleParameters( curveDefsTornadoAndCrossPlot.front().summaryAddress(), timeStep );
|
||||
ensembles.front()->correlationSortedEnsembleParameters( curveDefsTornadoAndCrossPlot.front().summaryAddressY(), timeStep );
|
||||
if ( !correlationSortedEnsembleParameters.empty() )
|
||||
{
|
||||
QString crossPlotEnsembleParameterName = correlationSortedEnsembleParameters.front().first.name;
|
||||
@ -369,7 +369,7 @@ void RimCorrelationPlotCollection::applyEnsembleFieldAndTimeStepToReport( RimCor
|
||||
plot->crossPlot()->setTimeStep( timeStep );
|
||||
|
||||
auto correlationSortedEnsembleParameters =
|
||||
ensemble->correlationSortedEnsembleParameters( curveDefsTornadoAndCrossPlot.front().summaryAddress(), timeStep );
|
||||
ensemble->correlationSortedEnsembleParameters( curveDefsTornadoAndCrossPlot.front().summaryAddressY(), timeStep );
|
||||
QString crossPlotEnsembleParameterName = correlationSortedEnsembleParameters.front().first.name;
|
||||
plot->crossPlot()->setEnsembleParameter( crossPlotEnsembleParameterName );
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ void RimCustomObjectiveFunctionWeight::fieldChangedByUi( const caf::PdmFieldHand
|
||||
for ( auto address : curveSelection )
|
||||
{
|
||||
RimSummaryAddress* summaryAddress = new RimSummaryAddress();
|
||||
summaryAddress->setAddress( address.summaryAddress() );
|
||||
summaryAddress->setAddress( address.summaryAddressY() );
|
||||
m_objectiveValuesSummaryAddresses.push_back( summaryAddress );
|
||||
}
|
||||
}
|
||||
|
@ -77,8 +77,8 @@ void RimSummaryCalculationVariable::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
std::vector<RiaSummaryCurveDefinition> curveSelection = dlg.curveSelection();
|
||||
if ( curveSelection.size() > 0 )
|
||||
{
|
||||
m_case = curveSelection[0].summaryCase();
|
||||
m_summaryAddress->setAddress( curveSelection[0].summaryAddress() );
|
||||
m_case = curveSelection[0].summaryCaseY();
|
||||
m_summaryAddress->setAddress( curveSelection[0].summaryAddressY() );
|
||||
|
||||
writeDataToApplicationStore();
|
||||
|
||||
|
@ -391,7 +391,7 @@ void RimEnsembleCurveFilter::fieldChangedByUi( const caf::PdmFieldHandle* change
|
||||
for ( auto address : curveSelection )
|
||||
{
|
||||
RimSummaryAddress* summaryAddress = new RimSummaryAddress();
|
||||
summaryAddress->setAddress( address.summaryAddress() );
|
||||
summaryAddress->setAddress( address.summaryAddressY() );
|
||||
m_objectiveValuesSummaryAddresses.push_back( summaryAddress );
|
||||
}
|
||||
loadDataAndUpdate();
|
||||
|
@ -808,7 +808,7 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
||||
if ( !curveSelection.empty() )
|
||||
{
|
||||
m_yValuesSummaryCaseCollection = curveSelection[0].ensemble();
|
||||
m_yValuesSummaryAddress->setAddress( curveSelection[0].summaryAddress() );
|
||||
m_yValuesSummaryAddress->setAddress( curveSelection[0].summaryAddressY() );
|
||||
|
||||
loadDataAndUpdate( true );
|
||||
|
||||
@ -846,7 +846,7 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
||||
for ( auto address : curveSelection )
|
||||
{
|
||||
RimSummaryAddress* summaryAddress = new RimSummaryAddress();
|
||||
summaryAddress->setAddress( address.summaryAddress() );
|
||||
summaryAddress->setAddress( address.summaryAddressY() );
|
||||
m_objectiveValuesSummaryAddresses.push_back( summaryAddress );
|
||||
}
|
||||
loadDataAndUpdate( true );
|
||||
|
@ -284,8 +284,8 @@ std::vector<double> RimSummaryCurve::valuesY() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCurve::applyCurveDefinitionY( const RiaSummaryCurveDefinition& curveDefinition )
|
||||
{
|
||||
setSummaryCaseY( curveDefinition.summaryCase() );
|
||||
setSummaryAddressY( curveDefinition.summaryAddress() );
|
||||
setSummaryCaseY( curveDefinition.summaryCaseY() );
|
||||
setSummaryAddressY( curveDefinition.summaryAddressY() );
|
||||
setIsEnsembleCurve( curveDefinition.isEnsembleCurve() );
|
||||
}
|
||||
|
||||
@ -1124,8 +1124,8 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
auto curveSelection = dlg.curveSelection();
|
||||
if ( curveSelection.size() > 0 )
|
||||
{
|
||||
m_yValuesSummaryCase = curveSelection[0].summaryCase();
|
||||
m_yValuesSummaryAddress->setAddress( curveSelection[0].summaryAddress() );
|
||||
m_yValuesSummaryCase = curveSelection[0].summaryCaseY();
|
||||
m_yValuesSummaryAddress->setAddress( curveSelection[0].summaryAddressY() );
|
||||
|
||||
crossPlotTestForMatchingTimeSteps = true;
|
||||
loadAndUpdate = true;
|
||||
@ -1158,8 +1158,8 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
auto curveSelection = dlg.curveSelection();
|
||||
if ( curveSelection.size() > 0 )
|
||||
{
|
||||
m_xValuesSummaryCase = curveSelection[0].summaryCase();
|
||||
m_xValuesSummaryAddress->setAddress( curveSelection[0].summaryAddress() );
|
||||
m_xValuesSummaryCase = curveSelection[0].summaryCaseY();
|
||||
m_xValuesSummaryAddress->setAddress( curveSelection[0].summaryAddressY() );
|
||||
|
||||
crossPlotTestForMatchingTimeSteps = true;
|
||||
loadAndUpdate = true;
|
||||
|
@ -413,16 +413,16 @@ void RimSummaryCurveAppearanceCalculator::init( const std::vector<RiaSummaryCurv
|
||||
|
||||
for ( const RiaSummaryCurveDefinition& curveDef : curveDefinitions )
|
||||
{
|
||||
if ( curveDef.summaryCase() ) m_caseToAppearanceIdxMap[curveDef.summaryCase()] = -1;
|
||||
if ( !curveDef.summaryAddress().wellName().empty() ) m_welToAppearanceIdxMap[curveDef.summaryAddress().wellName()] = -1;
|
||||
if ( !curveDef.summaryAddress().groupName().empty() ) m_grpToAppearanceIdxMap[curveDef.summaryAddress().groupName()] = -1;
|
||||
if ( !( curveDef.summaryAddress().regionNumber() == -1 ) ) m_regToAppearanceIdxMap[curveDef.summaryAddress().regionNumber()] = -1;
|
||||
if ( curveDef.summaryCaseY() ) m_caseToAppearanceIdxMap[curveDef.summaryCaseY()] = -1;
|
||||
if ( !curveDef.summaryAddressY().wellName().empty() ) m_welToAppearanceIdxMap[curveDef.summaryAddressY().wellName()] = -1;
|
||||
if ( !curveDef.summaryAddressY().groupName().empty() ) m_grpToAppearanceIdxMap[curveDef.summaryAddressY().groupName()] = -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 );
|
||||
}
|
||||
|
@ -2307,28 +2307,28 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleAddressCollectionDrop( RimSummar
|
||||
for ( auto& curveDef : sourceCurveDefs )
|
||||
{
|
||||
auto newCurveDef = curveDef;
|
||||
auto curveAdr = newCurveDef.summaryAddress();
|
||||
auto curveAdr = newCurveDef.summaryAddressY();
|
||||
std::string objectIdentifierString;
|
||||
if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL ) &&
|
||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL ) )
|
||||
{
|
||||
objectIdentifierString = curveAdr.wellName();
|
||||
curveAdr.setWellName( droppedName );
|
||||
newCurveDef.setSummaryAddress( curveAdr );
|
||||
newCurveDef.setSummaryAddressY( curveAdr );
|
||||
}
|
||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP ) &&
|
||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::GROUP ) )
|
||||
{
|
||||
objectIdentifierString = curveAdr.groupName();
|
||||
curveAdr.setGroupName( droppedName );
|
||||
newCurveDef.setSummaryAddress( curveAdr );
|
||||
newCurveDef.setSummaryAddressY( curveAdr );
|
||||
}
|
||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_NETWORK ) &&
|
||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::NETWORK ) )
|
||||
{
|
||||
objectIdentifierString = curveAdr.networkName();
|
||||
curveAdr.setNetworkName( droppedName );
|
||||
newCurveDef.setSummaryAddress( curveAdr );
|
||||
newCurveDef.setSummaryAddressY( curveAdr );
|
||||
}
|
||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION ) &&
|
||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION ) )
|
||||
@ -2338,7 +2338,7 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleAddressCollectionDrop( RimSummar
|
||||
int droppedRegion = std::stoi( droppedName );
|
||||
|
||||
curveAdr.setRegion( droppedRegion );
|
||||
newCurveDef.setSummaryAddress( curveAdr );
|
||||
newCurveDef.setSummaryAddressY( curveAdr );
|
||||
}
|
||||
else if ( ( curveAdr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_SEGMENT ) &&
|
||||
( addressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_SEGMENT ) )
|
||||
@ -2348,20 +2348,20 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleAddressCollectionDrop( RimSummar
|
||||
int droppedWellSegmentNumber = std::stoi( droppedName );
|
||||
|
||||
curveAdr.setWellSegmentNumber( droppedWellSegmentNumber );
|
||||
newCurveDef.setSummaryAddress( curveAdr );
|
||||
newCurveDef.setSummaryAddressY( curveAdr );
|
||||
}
|
||||
|
||||
if ( !objectIdentifierString.empty() )
|
||||
{
|
||||
newCurveDefsWithObjectNames[newCurveDef].insert( objectIdentifierString );
|
||||
const auto& addr = curveDef.summaryAddress();
|
||||
const auto& addr = curveDef.summaryAddressY();
|
||||
if ( !addr.isHistoryVector() && RiaPreferencesSummary::current()->appendHistoryVectors() )
|
||||
{
|
||||
auto historyAddr = addr;
|
||||
historyAddr.setVectorName( addr.vectorName() + RifReaderEclipseSummary::historyIdentifier() );
|
||||
|
||||
auto historyCurveDef = newCurveDef;
|
||||
historyCurveDef.setSummaryAddress( historyAddr );
|
||||
historyCurveDef.setSummaryAddressY( historyAddr );
|
||||
newCurveDefsWithObjectNames[historyCurveDef].insert( objectIdentifierString );
|
||||
}
|
||||
}
|
||||
@ -2375,17 +2375,17 @@ RimSummaryPlot::CurveInfo RimSummaryPlot::handleAddressCollectionDrop( RimSummar
|
||||
if ( curveDef.ensemble() )
|
||||
{
|
||||
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++;
|
||||
}
|
||||
}
|
||||
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++;
|
||||
}
|
||||
}
|
||||
|
@ -274,11 +274,11 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const
|
||||
|
||||
for ( const RiaSummaryCurveDefinition& curveDef : m_curveDefinitions )
|
||||
{
|
||||
const RifEclipseSummaryAddress& sumAddress = curveDef.summaryAddress();
|
||||
const RifEclipseSummaryAddress& sumAddress = curveDef.summaryAddressY();
|
||||
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() )
|
||||
{
|
||||
@ -388,7 +388,7 @@ QString RimSummaryPlotAxisFormatter::createAxisObjectName() const
|
||||
|
||||
for ( const RiaSummaryCurveDefinition& curveDef : m_curveDefinitions )
|
||||
{
|
||||
const RifEclipseSummaryAddress& sumAddress = curveDef.summaryAddress();
|
||||
const RifEclipseSummaryAddress& sumAddress = curveDef.summaryAddressY();
|
||||
|
||||
addVectorNames( sumAddress );
|
||||
}
|
||||
|
@ -639,11 +639,11 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
|
||||
std::set<SummaryCategory> categories;
|
||||
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
|
||||
if ( summaryAddress.category() == SummaryCategory::SUMMARY_ENSEMBLE_STATISTICS ) continue;
|
||||
@ -677,11 +677,11 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
|
||||
}
|
||||
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() )
|
||||
|
Loading…
Reference in New Issue
Block a user