mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1986 Flooded PV: Add function isFlowDiagOrInjectionFlooding and replace
This commit is contained in:
@@ -300,7 +300,7 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (eclipseView->cellResult()->resultType() == RiaDefines::FLOW_DIAGNOSTICS || eclipseView->cellResult->resultType() == RiaDefines::INJECTION_FLOODING)
|
else if (eclipseView->cellResult()->isFlowDiagOrInjectionFlooding())
|
||||||
{
|
{
|
||||||
if (m_statisticsTimeRange == CURRENT_TIMESTEP || m_statisticsTimeRange == ALL_TIMESTEPS) // All timesteps is ignored
|
if (m_statisticsTimeRange == CURRENT_TIMESTEP || m_statisticsTimeRange == ALL_TIMESTEPS) // All timesteps is ignored
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ void RimEclipsePropertyFilter::updateReadOnlyStateOfAllFields()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipsePropertyFilter::updateRangeLabel()
|
void RimEclipsePropertyFilter::updateRangeLabel()
|
||||||
{
|
{
|
||||||
if (resultDefinition->resultType() == RiaDefines::FLOW_DIAGNOSTICS || resultDefinition->resultType() == RiaDefines::INJECTION_FLOODING)
|
if (resultDefinition->isFlowDiagOrInjectionFlooding())
|
||||||
{
|
{
|
||||||
m_rangeLabelText = "Current Timestep";
|
m_rangeLabelText = "Current Timestep";
|
||||||
}
|
}
|
||||||
@@ -348,7 +348,7 @@ void RimEclipsePropertyFilter::computeResultValueRange()
|
|||||||
|
|
||||||
clearCategories();
|
clearCategories();
|
||||||
|
|
||||||
if (resultDefinition->resultType() == RiaDefines::FLOW_DIAGNOSTICS || resultDefinition->resultType() == RiaDefines::INJECTION_FLOODING)
|
if (resultDefinition->isFlowDiagOrInjectionFlooding())
|
||||||
{
|
{
|
||||||
RimView* view;
|
RimView* view;
|
||||||
this->firstAncestorOrThisOfType(view);
|
this->firstAncestorOrThisOfType(view);
|
||||||
@@ -423,7 +423,7 @@ void RimEclipsePropertyFilter::updateFromCurrentTimeStep()
|
|||||||
//
|
//
|
||||||
// If the user manually has set a filter value, this value is left untouched
|
// If the user manually has set a filter value, this value is left untouched
|
||||||
|
|
||||||
if (resultDefinition->resultType() != RiaDefines::FLOW_DIAGNOSTICS && resultDefinition->resultType() != RiaDefines::INJECTION_FLOODING)
|
if (!resultDefinition->isFlowDiagOrInjectionFlooding())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -718,7 +718,7 @@ size_t RimEclipseResultDefinition::scalarResultIndex() const
|
|||||||
{
|
{
|
||||||
size_t gridScalarResultIndex = cvf::UNDEFINED_SIZE_T;
|
size_t gridScalarResultIndex = cvf::UNDEFINED_SIZE_T;
|
||||||
|
|
||||||
if (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS || m_resultType() == RiaDefines::INJECTION_FLOODING) return cvf::UNDEFINED_SIZE_T;
|
if (isFlowDiagOrInjectionFlooding()) return cvf::UNDEFINED_SIZE_T;
|
||||||
|
|
||||||
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
|
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
|
||||||
if (gridCellResults )
|
if (gridCellResults )
|
||||||
@@ -734,7 +734,7 @@ size_t RimEclipseResultDefinition::scalarResultIndex() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigFlowDiagResultAddress RimEclipseResultDefinition::flowDiagResAddress() const
|
RigFlowDiagResultAddress RimEclipseResultDefinition::flowDiagResAddress() const
|
||||||
{
|
{
|
||||||
CVF_ASSERT(m_resultType() == RiaDefines::FLOW_DIAGNOSTICS || m_resultType() == RiaDefines::INJECTION_FLOODING);
|
CVF_ASSERT(isFlowDiagOrInjectionFlooding());
|
||||||
|
|
||||||
if (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS)
|
if (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS)
|
||||||
{
|
{
|
||||||
@@ -885,7 +885,7 @@ QString RimEclipseResultDefinition::resultVariableUiShortName() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseResultDefinition::loadResult()
|
void RimEclipseResultDefinition::loadResult()
|
||||||
{
|
{
|
||||||
if (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS || this->resultType() == RiaDefines::INJECTION_FLOODING) return; // Will load automatically on access
|
if (isFlowDiagOrInjectionFlooding()) return; // Will load automatically on access
|
||||||
|
|
||||||
RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
|
RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
|
||||||
if (gridCellResults)
|
if (gridCellResults)
|
||||||
@@ -901,7 +901,7 @@ void RimEclipseResultDefinition::loadResult()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimEclipseResultDefinition::hasStaticResult() const
|
bool RimEclipseResultDefinition::hasStaticResult() const
|
||||||
{
|
{
|
||||||
if (this->resultType() == RiaDefines::FLOW_DIAGNOSTICS || this->resultType() == RiaDefines::INJECTION_FLOODING) return false;
|
if (isFlowDiagOrInjectionFlooding()) return false;
|
||||||
|
|
||||||
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
|
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
|
||||||
size_t gridScalarResultIndex = this->scalarResultIndex();
|
size_t gridScalarResultIndex = this->scalarResultIndex();
|
||||||
@@ -921,7 +921,7 @@ bool RimEclipseResultDefinition::hasStaticResult() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimEclipseResultDefinition::hasResult() const
|
bool RimEclipseResultDefinition::hasResult() const
|
||||||
{
|
{
|
||||||
if (this->resultType() == RiaDefines::FLOW_DIAGNOSTICS || this->resultType() == RiaDefines::INJECTION_FLOODING)
|
if (isFlowDiagOrInjectionFlooding())
|
||||||
{
|
{
|
||||||
if (m_flowSolution() && !m_resultVariable().isEmpty()) return true;
|
if (m_flowSolution() && !m_resultVariable().isEmpty()) return true;
|
||||||
}
|
}
|
||||||
@@ -1092,6 +1092,18 @@ bool RimEclipseResultDefinition::hasCategoryResult() const
|
|||||||
return this->resultVariable().contains("NUM", Qt::CaseInsensitive);
|
return this->resultVariable().contains("NUM", Qt::CaseInsensitive);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimEclipseResultDefinition::isFlowDiagOrInjectionFlooding() const
|
||||||
|
{
|
||||||
|
if (this->m_resultType() == RiaDefines::FLOW_DIAGNOSTICS || this->m_resultType() == RiaDefines::INJECTION_FLOODING)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ public:
|
|||||||
bool isTernarySaturationSelected() const;
|
bool isTernarySaturationSelected() const;
|
||||||
bool isCompletionTypeSelected() const;
|
bool isCompletionTypeSelected() const;
|
||||||
bool hasCategoryResult() const;
|
bool hasCategoryResult() const;
|
||||||
|
bool isFlowDiagOrInjectionFlooding() const;
|
||||||
|
|
||||||
RigCaseCellResultsData* currentGridCellResults() const;
|
RigCaseCellResultsData* currentGridCellResults() const;
|
||||||
|
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromResultDefinition
|
|||||||
size_t timeStepIndex,
|
size_t timeStepIndex,
|
||||||
RimEclipseResultDefinition* resultDefinition)
|
RimEclipseResultDefinition* resultDefinition)
|
||||||
{
|
{
|
||||||
if (resultDefinition->resultType() == RiaDefines::FLOW_DIAGNOSTICS || resultDefinition->resultType() == RiaDefines::INJECTION_FLOODING)
|
if (resultDefinition->isFlowDiagOrInjectionFlooding())
|
||||||
{
|
{
|
||||||
RimFlowDiagSolution* flowSol = resultDefinition->flowDiagSolution();
|
RimFlowDiagSolution* flowSol = resultDefinition->flowDiagSolution();
|
||||||
if (!flowSol) return new RigHugeValResultAccessor;;
|
if (!flowSol) return new RigHugeValResultAccessor;;
|
||||||
|
|||||||
Reference in New Issue
Block a user