mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6957 Data source stepping : Add stepping on aquifer
This commit is contained in:
parent
34fe05ba33
commit
f336dfec97
@ -169,6 +169,14 @@ std::set<std::string> RiaSummaryCurveAnalyzer::blocks() const
|
||||
return m_blocks;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<int> RiaSummaryCurveAnalyzer::aquifers() const
|
||||
{
|
||||
return m_aquifers;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -229,6 +237,13 @@ std::vector<QString> RiaSummaryCurveAnalyzer::identifierTexts( RifEclipseSummary
|
||||
identifierStrings.push_back( QString::fromStdString( conn ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_AQUIFER )
|
||||
{
|
||||
for ( const auto& aquifer : m_aquifers )
|
||||
{
|
||||
identifierStrings.push_back( QString::number( aquifer ) );
|
||||
}
|
||||
}
|
||||
|
||||
return identifierStrings;
|
||||
}
|
||||
@ -284,6 +299,7 @@ void RiaSummaryCurveAnalyzer::clear()
|
||||
m_wellCompletions.clear();
|
||||
m_wellSegmentNumbers.clear();
|
||||
m_blocks.clear();
|
||||
m_aquifers.clear();
|
||||
|
||||
m_quantitiesNoMatchingHistory.clear();
|
||||
m_quantitiesWithMatchingHistory.clear();
|
||||
@ -378,6 +394,10 @@ void RiaSummaryCurveAnalyzer::analyzeSingleAddress( const RifEclipseSummaryAddre
|
||||
auto text = address.blockAsString();
|
||||
m_blocks.insert( text );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SUMMARY_AQUIFER )
|
||||
{
|
||||
m_aquifers.insert( address.aquiferNumber() );
|
||||
}
|
||||
|
||||
if ( address.category() != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
{
|
||||
|
@ -55,6 +55,7 @@ public:
|
||||
std::set<std::string> wellCompletions( const std::string& wellName ) const;
|
||||
std::set<int> wellSegmentNumbers( const std::string& wellName ) const;
|
||||
std::set<std::string> blocks() const;
|
||||
std::set<int> aquifers() const;
|
||||
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> categories() const;
|
||||
|
||||
@ -84,6 +85,7 @@ private:
|
||||
std::set<std::pair<std::string, std::string>> m_wellCompletions;
|
||||
std::set<std::pair<std::string, int>> m_wellSegmentNumbers;
|
||||
std::set<std::string> m_blocks;
|
||||
std::set<int> m_aquifers;
|
||||
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> m_categories;
|
||||
};
|
||||
|
@ -71,6 +71,7 @@ RimSummaryPlotSourceStepping::RimSummaryPlotSourceStepping()
|
||||
CAF_PDM_InitFieldNoDefault( &m_cellBlock, "CellBlock", "Block", "", "", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_segment, "Segment", "Segment", "", "", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_completion, "Completion", "Completion", "", "", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_aquifer, "Aquifer", "Aquifer", "", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_ensemble, "Ensemble", "Ensemble", "", "", "" );
|
||||
|
||||
@ -312,6 +313,10 @@ QList<caf::PdmOptionItemInfo>
|
||||
secondaryIdentifier = m_wellName().toStdString();
|
||||
category = RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION;
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_aquifer )
|
||||
{
|
||||
category = RifEclipseSummaryAddress::SUMMARY_AQUIFER;
|
||||
}
|
||||
|
||||
std::vector<QString> identifierTexts;
|
||||
|
||||
@ -496,6 +501,10 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
{
|
||||
summaryCategoryToModify = RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION;
|
||||
}
|
||||
else if ( changedField == &m_aquifer )
|
||||
{
|
||||
summaryCategoryToModify = RifEclipseSummaryAddress::SUMMARY_AQUIFER;
|
||||
}
|
||||
|
||||
if ( summaryCategoryToModify != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
{
|
||||
@ -737,6 +746,7 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
m_cellBlock.uiCapability()->setUiHidden( true );
|
||||
m_segment.uiCapability()->setUiHidden( true );
|
||||
m_completion.uiCapability()->setUiHidden( true );
|
||||
m_aquifer.uiCapability()->setUiHidden( true );
|
||||
|
||||
std::vector<caf::PdmFieldHandle*> fields;
|
||||
|
||||
@ -858,6 +868,14 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
fieldsCommonForAllCurves.push_back( &m_completion );
|
||||
}
|
||||
|
||||
if ( analyzer.aquifers().size() == 1 )
|
||||
{
|
||||
m_aquifer = *( analyzer.aquifers().begin() );
|
||||
m_aquifer.uiCapability()->setUiHidden( false );
|
||||
|
||||
fieldsCommonForAllCurves.push_back( &m_aquifer );
|
||||
}
|
||||
|
||||
if ( !analyzer.quantityNameForTitle().empty() )
|
||||
{
|
||||
QString txt = QString::fromStdString( analyzer.quantityNameForTitle() );
|
||||
@ -972,6 +990,18 @@ bool RimSummaryPlotSourceStepping::updateAddressIfMatching( const QVariant&
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_AQUIFER )
|
||||
{
|
||||
int oldInt = oldValue.toInt();
|
||||
int newInt = newValue.toInt();
|
||||
|
||||
if ( adr->aquiferNumber() == oldInt )
|
||||
{
|
||||
adr->setAquiferNumber( newInt );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_WELL_GROUP )
|
||||
{
|
||||
std::string oldString = oldValue.toString().toStdString();
|
||||
|
@ -120,6 +120,8 @@ private:
|
||||
caf::PdmField<QString> m_segment;
|
||||
caf::PdmField<QString> m_completion;
|
||||
|
||||
caf::PdmField<int> m_aquifer;
|
||||
|
||||
caf::PdmField<bool> m_includeEnsembleCasesForCaseStepping;
|
||||
|
||||
SourceSteppingType m_sourceSteppingType;
|
||||
|
Loading…
Reference in New Issue
Block a user