mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7761 Objective Function : Change formula and add several options
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "RiaSummaryCurveDefinition.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifReaderEclipseSummary.h"
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
||||
#include "RimCalculatedSummaryCase.h"
|
||||
@@ -383,6 +384,10 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
|
||||
m_hideEnsembles = false;
|
||||
m_hideSummaryCases = false;
|
||||
|
||||
m_hideDifferenceVectors = false;
|
||||
m_hideHistoryVectors = false;
|
||||
m_hideVectorsWithoutHistory = false;
|
||||
|
||||
m_prevCurveCount = 0;
|
||||
m_prevCurveSetCount = 0;
|
||||
}
|
||||
@@ -566,6 +571,30 @@ void RiuSummaryVectorSelectionUi::enableIndividualEnsembleCaseSelection( bool en
|
||||
m_showIndividualEnsembleCases = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryVectorSelectionUi::hideDifferenceVectors( bool hide )
|
||||
{
|
||||
m_hideDifferenceVectors = hide;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryVectorSelectionUi::hideHistoryVectors( bool hide )
|
||||
{
|
||||
m_hideHistoryVectors = hide;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryVectorSelectionUi::hideVectorsWithoutHistory( bool hide )
|
||||
{
|
||||
m_hideVectorsWithoutHistory = hide;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1128,6 +1157,40 @@ std::set<RifEclipseSummaryAddress>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_hideHistoryVectors || m_hideDifferenceVectors )
|
||||
{
|
||||
std::set<RifEclipseSummaryAddress> filteredAddresses;
|
||||
|
||||
for ( const auto& adr : addrUnion )
|
||||
{
|
||||
if ( m_hideHistoryVectors && adr.isHistoryQuantity() ) continue;
|
||||
|
||||
if ( m_hideDifferenceVectors )
|
||||
{
|
||||
const auto diffText = RifReaderEclipseSummary::differenceIdentifier();
|
||||
if ( RiaStdStringTools::endsWith( adr.quantityName(), diffText ) ) continue;
|
||||
}
|
||||
|
||||
if ( m_hideVectorsWithoutHistory )
|
||||
{
|
||||
auto candidateName = adr.quantityName() + RifReaderEclipseSummary::historyIdentifier();
|
||||
|
||||
bool found = false;
|
||||
for ( const auto& ad : addrUnion )
|
||||
{
|
||||
if ( ad.quantityName() == candidateName ) found = true;
|
||||
}
|
||||
|
||||
if ( !found ) continue;
|
||||
}
|
||||
|
||||
filteredAddresses.insert( adr );
|
||||
}
|
||||
|
||||
addrUnion.swap( filteredAddresses );
|
||||
}
|
||||
|
||||
return addrUnion;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user