mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 16:32:12 -05:00
Whitespace
This commit is contained in:
1 parent
75833f491a
commit
3586988d1d
1 file changed
+86
-103
@@ -31,9 +31,9 @@
|
||||
#include "Rim3dView.h"
|
||||
#include "Rim3dWellLogCurve.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
#include "RimEclipseContourMapProjection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseContourMapProjection.h"
|
||||
#include "RimEclipseFaultColors.h"
|
||||
#include "RimEclipsePropertyFilter.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimPlotCurve.h"
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimViewLinker.h"
|
||||
#include "RimWellLogExtractionCurve.h"
|
||||
|
||||
@@ -51,24 +52,20 @@
|
||||
#include "cafPdmUiTreeSelectionEditor.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QList>
|
||||
#include "RimTools.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void RimEclipseResultDefinition::FlowTracerSelectionEnum::setUp()
|
||||
{
|
||||
template<>
|
||||
void RimEclipseResultDefinition::FlowTracerSelectionEnum::setUp()
|
||||
{
|
||||
addItem(RimEclipseResultDefinition::FLOW_TR_INJ_AND_PROD, "FLOW_TR_INJ_AND_PROD", "All Injectors and Producers");
|
||||
addItem(RimEclipseResultDefinition::FLOW_TR_PRODUCERS, "FLOW_TR_PRODUCERS", "All Producers");
|
||||
addItem(RimEclipseResultDefinition::FLOW_TR_INJECTORS, "FLOW_TR_INJECTORS", "All Injectors");
|
||||
addItem(RimEclipseResultDefinition::FLOW_TR_BY_SELECTION, "FLOW_TR_BY_SELECTION", "By Selection");
|
||||
|
||||
setDefault(RimEclipseResultDefinition::FLOW_TR_INJ_AND_PROD);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace caf
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimEclipseResultDefinition, "ResultDefinition");
|
||||
|
||||
@@ -85,7 +82,7 @@ RimEclipseResultDefinition::RimEclipseResultDefinition()
|
||||
CAF_PDM_InitFieldNoDefault(&m_porosityModel, "PorosityModelType", "Porosity", "", "", "");
|
||||
m_porosityModel.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&m_resultVariable, "ResultVariable", RiaDefines::undefinedResultName(), "Variable", "", "", "" );
|
||||
CAF_PDM_InitField(&m_resultVariable, "ResultVariable", RiaDefines::undefinedResultName(), "Variable", "", "", "");
|
||||
m_resultVariable.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_flowSolution, "FlowDiagSolution", "Solution", "", "", "");
|
||||
@@ -97,7 +94,6 @@ RimEclipseResultDefinition::RimEclipseResultDefinition()
|
||||
CAF_PDM_InitField(&m_timeLapseBaseTimestep, "TimeLapseBaseTimeStep", 0, "Base Time Step", "", "", "");
|
||||
m_timeLapseBaseTimestep.uiCapability()->setUiHidden(true);
|
||||
|
||||
|
||||
// One single tracer list has been split into injectors and producers.
|
||||
// The old list is defined as injectors and we'll have to move any producers in old projects.
|
||||
CAF_PDM_InitFieldNoDefault(&m_selectedTracers_OBSOLETE, "SelectedTracers", "Tracers", "", "", "");
|
||||
@@ -109,7 +105,6 @@ RimEclipseResultDefinition::RimEclipseResultDefinition()
|
||||
CAF_PDM_InitFieldNoDefault(&m_selectedProducerTracers, "SelectedProducerTracers", "Producer Tracers", "", "", "");
|
||||
m_selectedProducerTracers.uiCapability()->setUiHidden(true);
|
||||
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_selectedSouringTracers, "SelectedSouringTracers", "Tracers", "", "", "");
|
||||
m_selectedSouringTracers.uiCapability()->setUiHidden(true);
|
||||
|
||||
@@ -124,17 +119,23 @@ RimEclipseResultDefinition::RimEclipseResultDefinition()
|
||||
CAF_PDM_InitFieldNoDefault(&m_porosityModelUiField, "MPorosityModelType", "Porosity", "", "", "");
|
||||
m_porosityModelUiField.xmlCapability()->disableIO();
|
||||
|
||||
CAF_PDM_InitField(&m_resultVariableUiField, "MResultVariable", RiaDefines::undefinedResultName(), "Result Property", "", "", "" );
|
||||
CAF_PDM_InitField(
|
||||
&m_resultVariableUiField, "MResultVariable", RiaDefines::undefinedResultName(), "Result Property", "", "", "");
|
||||
m_resultVariableUiField.xmlCapability()->disableIO();
|
||||
m_resultVariableUiField.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName());
|
||||
|
||||
CAF_PDM_InitField(&m_isTimeLapseResultUiField, "IsTimeLapseResultUI", false, "Enable Time Difference", "", "Use the difference with respect to a specific time step as the result variable to plot", "");
|
||||
CAF_PDM_InitField(&m_isTimeLapseResultUiField,
|
||||
"IsTimeLapseResultUI",
|
||||
false,
|
||||
"Enable Time Difference",
|
||||
"",
|
||||
"Use the difference with respect to a specific time step as the result variable to plot",
|
||||
"");
|
||||
m_isTimeLapseResultUiField.xmlCapability()->disableIO();
|
||||
|
||||
CAF_PDM_InitField(&m_timeLapseBaseTimestepUiField, "TimeLapseBaseTimeStepUI", 0, "Base Time Step", "", "", "");
|
||||
m_timeLapseBaseTimestepUiField.xmlCapability()->disableIO();
|
||||
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_flowSolutionUiField, "MFlowDiagSolution", "Solution", "", "", "");
|
||||
m_flowSolutionUiField.xmlCapability()->disableIO();
|
||||
m_flowSolutionUiField.uiCapability()->setUiHidden(true); // For now since there are only one to choose from
|
||||
@@ -145,7 +146,6 @@ RimEclipseResultDefinition::RimEclipseResultDefinition()
|
||||
CAF_PDM_InitField(&m_syncProducerToInjectorSelection, "MSyncSelectedProdInj", false, "<- Add Communicators", "", "", "");
|
||||
m_syncProducerToInjectorSelection.uiCapability()->setUiEditorTypeName(caf::PdmUiToolButtonEditor::uiEditorTypeName());
|
||||
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_selectedInjectorTracersUiField, "MSelectedInjectorTracers", "Injector Tracers", "", "", "");
|
||||
m_selectedInjectorTracersUiField.xmlCapability()->disableIO();
|
||||
m_selectedInjectorTracersUiField.uiCapability()->setUiEditorTypeName(caf::PdmUiTreeSelectionEditor::uiEditorTypeName());
|
||||
@@ -164,10 +164,7 @@ RimEclipseResultDefinition::RimEclipseResultDefinition()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseResultDefinition::~RimEclipseResultDefinition()
|
||||
{
|
||||
}
|
||||
|
||||
RimEclipseResultDefinition::~RimEclipseResultDefinition() {}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -195,13 +192,12 @@ void RimEclipseResultDefinition::setEclipseCase(RimEclipseCase* eclipseCase)
|
||||
assignFlowSolutionFromCase();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigCaseCellResultsData* RimEclipseResultDefinition::currentGridCellResults() const
|
||||
{
|
||||
if (!m_eclipseCase ) return nullptr;
|
||||
if (!m_eclipseCase) return nullptr;
|
||||
|
||||
return m_eclipseCase->results(m_porosityModel());
|
||||
}
|
||||
@@ -209,11 +205,11 @@ RigCaseCellResultsData* RimEclipseResultDefinition::currentGridCellResults() con
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
{
|
||||
if ( &m_flowSolutionUiField == changedField
|
||||
|| &m_resultTypeUiField == changedField
|
||||
|| &m_porosityModelUiField == changedField )
|
||||
if (&m_flowSolutionUiField == changedField || &m_resultTypeUiField == changedField || &m_porosityModelUiField == changedField)
|
||||
{
|
||||
// If the user are seeing the list with the actually selected result,
|
||||
// select that result in the list. Otherwise select nothing.
|
||||
@@ -222,10 +218,8 @@ void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
|
||||
bool isFlowDiagFieldsRelevant = (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS);
|
||||
|
||||
|
||||
if ( ( m_flowSolutionUiField() == m_flowSolution() || !isFlowDiagFieldsRelevant)
|
||||
&& m_resultTypeUiField() == m_resultType()
|
||||
&& m_porosityModelUiField() == m_porosityModel() )
|
||||
if ((m_flowSolutionUiField() == m_flowSolution() || !isFlowDiagFieldsRelevant) &&
|
||||
m_resultTypeUiField() == m_resultType() && m_porosityModelUiField() == m_porosityModel())
|
||||
{
|
||||
if (varList.contains(resultVariable()))
|
||||
{
|
||||
@@ -287,8 +281,7 @@ void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
|
||||
if (&m_selectedInjectorTracersUiField == changedField )
|
||||
if (&m_selectedInjectorTracersUiField == changedField)
|
||||
{
|
||||
changedTracerSelectionField(true);
|
||||
}
|
||||
@@ -310,7 +303,6 @@ void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
m_syncProducerToInjectorSelection = false;
|
||||
}
|
||||
|
||||
|
||||
if (&m_selectedSouringTracersUiField == changedField)
|
||||
{
|
||||
if (!m_resultVariable().isEmpty())
|
||||
@@ -341,10 +333,9 @@ void RimEclipseResultDefinition::changedTracerSelectionField(bool injector)
|
||||
{
|
||||
m_flowSolution = m_flowSolutionUiField();
|
||||
|
||||
std::vector<QString>& selectedTracers = injector ? m_selectedInjectorTracers.v()
|
||||
: m_selectedProducerTracers.v();
|
||||
std::vector<QString>& selectedTracersUi = injector ? m_selectedInjectorTracersUiField.v()
|
||||
: m_selectedProducerTracersUiField.v();
|
||||
std::vector<QString>& selectedTracers = injector ? m_selectedInjectorTracers.v() : m_selectedProducerTracers.v();
|
||||
std::vector<QString>& selectedTracersUi =
|
||||
injector ? m_selectedInjectorTracersUiField.v() : m_selectedProducerTracersUiField.v();
|
||||
|
||||
selectedTracers = selectedTracersUi;
|
||||
|
||||
@@ -510,15 +501,16 @@ void RimEclipseResultDefinition::loadDataAndUpdate()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
if ( fieldNeedingOptions == &m_resultTypeUiField )
|
||||
if (fieldNeedingOptions == &m_resultTypeUiField)
|
||||
{
|
||||
bool hasSourSimRLFile = false;
|
||||
RimEclipseResultCase* eclResCase = dynamic_cast<RimEclipseResultCase*>(m_eclipseCase.p());
|
||||
if ( eclResCase && eclResCase->eclipseCaseData() )
|
||||
if (eclResCase && eclResCase->eclipseCaseData())
|
||||
{
|
||||
hasSourSimRLFile = eclResCase->hasSourSimFile();
|
||||
}
|
||||
@@ -543,26 +535,23 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
}
|
||||
#endif /* ENABLE_SOURING */
|
||||
|
||||
|
||||
RimGridTimeHistoryCurve* timeHistoryCurve;
|
||||
this->firstAncestorOrThisOfType(timeHistoryCurve);
|
||||
|
||||
// Do not include flow diagnostics results if it is a time history curve
|
||||
// Do not include SourSimRL if no SourSim file is loaded
|
||||
if ( timeHistoryCurve != nullptr || !hasSourSimRLFile || !enableSouring )
|
||||
if (timeHistoryCurve != nullptr || !hasSourSimRLFile || !enableSouring)
|
||||
{
|
||||
using ResCatEnum = caf::AppEnum< RiaDefines::ResultCatType >;
|
||||
for ( size_t i = 0; i < ResCatEnum::size(); ++i )
|
||||
using ResCatEnum = caf::AppEnum<RiaDefines::ResultCatType>;
|
||||
for (size_t i = 0; i < ResCatEnum::size(); ++i)
|
||||
{
|
||||
RiaDefines::ResultCatType resType = ResCatEnum::fromIndex(i);
|
||||
if ( resType == RiaDefines::FLOW_DIAGNOSTICS
|
||||
&& (timeHistoryCurve) )
|
||||
if (resType == RiaDefines::FLOW_DIAGNOSTICS && (timeHistoryCurve))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( resType == RiaDefines::SOURSIMRL
|
||||
&& (!hasSourSimRLFile ) )
|
||||
if (resType == RiaDefines::SOURSIMRL && (!hasSourSimRLFile))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -578,9 +567,9 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_resultTypeUiField() == RiaDefines::FLOW_DIAGNOSTICS )
|
||||
if (m_resultTypeUiField() == RiaDefines::FLOW_DIAGNOSTICS)
|
||||
{
|
||||
if ( fieldNeedingOptions == &m_resultVariableUiField )
|
||||
if (fieldNeedingOptions == &m_resultVariableUiField)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(timeOfFlightString(false), RIG_FLD_TOF_RESNAME));
|
||||
if (m_phaseSelection() == RigFlowDiagResultAddress::PHASE_ALL)
|
||||
@@ -622,8 +611,7 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
|
||||
for (const QString& resultName : dynamicResultNames)
|
||||
{
|
||||
if (!resultName.endsWith("F") ||
|
||||
resultName == RiaDefines::completionTypeResultName())
|
||||
if (!resultName.endsWith("F") || resultName == RiaDefines::completionTypeResultName())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -638,7 +626,7 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( fieldNeedingOptions == &m_resultVariableUiField )
|
||||
if (fieldNeedingOptions == &m_resultVariableUiField)
|
||||
{
|
||||
options = calcOptionsForVariableUiFieldStandard();
|
||||
}
|
||||
@@ -646,20 +634,19 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
{
|
||||
std::vector<QDateTime> stepDates;
|
||||
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
|
||||
if(gridCellResults)
|
||||
if (gridCellResults)
|
||||
{
|
||||
stepDates = gridCellResults->timeStepDates();
|
||||
}
|
||||
|
||||
for (size_t stepIdx = 0; stepIdx < stepDates.size(); ++stepIdx)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(stepDates[stepIdx].toString(RimTools::dateFormatString()),
|
||||
static_cast<int>(stepIdx)));
|
||||
options.push_back(
|
||||
caf::PdmOptionItemInfo(stepDates[stepIdx].toString(RimTools::dateFormatString()), static_cast<int>(stepIdx)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
(*useOptionsOnly) = true;
|
||||
|
||||
return options;
|
||||
@@ -673,7 +660,7 @@ RigEclipseResultAddress RimEclipseResultDefinition::eclipseResultAddress() const
|
||||
if (isFlowDiagOrInjectionFlooding()) return RigEclipseResultAddress();
|
||||
|
||||
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
|
||||
if (gridCellResults )
|
||||
if (gridCellResults)
|
||||
{
|
||||
if (m_isTimeLapseResult())
|
||||
return RigEclipseResultAddress(m_resultType(), m_resultVariable(), m_timeLapseBaseTimestep());
|
||||
@@ -848,7 +835,6 @@ void RimEclipseResultDefinition::loadResult()
|
||||
|
||||
gridCellResults->ensureKnownResultLoaded(this->eclipseResultAddress());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -862,7 +848,7 @@ bool RimEclipseResultDefinition::hasStaticResult() const
|
||||
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
|
||||
RigEclipseResultAddress gridScalarResultIndex = this->eclipseResultAddress();
|
||||
|
||||
if (hasResult() && gridCellResults->timeStepCount(gridScalarResultIndex) == 1 )
|
||||
if (hasResult() && gridCellResults->timeStepCount(gridScalarResultIndex) == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -881,7 +867,7 @@ bool RimEclipseResultDefinition::hasResult() const
|
||||
{
|
||||
if (m_flowSolution() && !m_resultVariable().isEmpty()) return true;
|
||||
}
|
||||
else if (this->currentGridCellResults() )
|
||||
else if (this->currentGridCellResults())
|
||||
{
|
||||
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
|
||||
|
||||
@@ -920,7 +906,7 @@ bool RimEclipseResultDefinition::hasDynamicResult() const
|
||||
{
|
||||
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
|
||||
RigEclipseResultAddress gridScalarResultIndex = this->eclipseResultAddress();
|
||||
if (gridCellResults->timeStepCount(gridScalarResultIndex) > 1 )
|
||||
if (gridCellResults->timeStepCount(gridScalarResultIndex) > 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -930,7 +916,6 @@ bool RimEclipseResultDefinition::hasDynamicResult() const
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1092,16 +1077,15 @@ bool RimEclipseResultDefinition::isCompletionTypeSelected() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseResultDefinition::hasCategoryResult() const
|
||||
{
|
||||
if (this->m_resultType() == RiaDefines::FORMATION_NAMES
|
||||
&& m_eclipseCase
|
||||
&& m_eclipseCase->eclipseCaseData()
|
||||
&& m_eclipseCase->eclipseCaseData()->activeFormationNames() ) return true;
|
||||
if (this->m_resultType() == RiaDefines::FORMATION_NAMES && m_eclipseCase && m_eclipseCase->eclipseCaseData() &&
|
||||
m_eclipseCase->eclipseCaseData()->activeFormationNames())
|
||||
return true;
|
||||
|
||||
if (this->m_resultType() == RiaDefines::DYNAMIC_NATIVE
|
||||
&& this->resultVariable() == RiaDefines::completionTypeResultName()) return true;
|
||||
if (this->m_resultType() == RiaDefines::DYNAMIC_NATIVE && this->resultVariable() == RiaDefines::completionTypeResultName())
|
||||
return true;
|
||||
|
||||
if (this->m_resultType() == RiaDefines::FLOW_DIAGNOSTICS
|
||||
&& m_resultVariable() == RIG_FLD_MAX_FRACTION_TRACER_RESNAME) return true;
|
||||
if (this->m_resultType() == RiaDefines::FLOW_DIAGNOSTICS && m_resultVariable() == RIG_FLD_MAX_FRACTION_TRACER_RESNAME)
|
||||
return true;
|
||||
|
||||
if (!this->hasStaticResult()) return false;
|
||||
|
||||
@@ -1133,8 +1117,7 @@ void RimEclipseResultDefinition::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
uiOrdering.add(&m_porosityModelUiField);
|
||||
}
|
||||
|
||||
|
||||
if ( m_resultTypeUiField() == RiaDefines::FLOW_DIAGNOSTICS )
|
||||
if (m_resultTypeUiField() == RiaDefines::FLOW_DIAGNOSTICS)
|
||||
{
|
||||
uiOrdering.add(&m_flowSolutionUiField);
|
||||
|
||||
@@ -1156,7 +1139,7 @@ void RimEclipseResultDefinition::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
|
||||
uiOrdering.add(&m_phaseSelection);
|
||||
|
||||
if ( m_flowSolution() == nullptr )
|
||||
if (m_flowSolution() == nullptr)
|
||||
{
|
||||
assignFlowSolutionFromCase();
|
||||
}
|
||||
@@ -1176,12 +1159,11 @@ void RimEclipseResultDefinition::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
uiOrdering.add(&m_resultVariableUiField);
|
||||
}
|
||||
|
||||
if ( m_resultTypeUiField() == RiaDefines::DYNAMIC_NATIVE )
|
||||
if (m_resultTypeUiField() == RiaDefines::DYNAMIC_NATIVE)
|
||||
{
|
||||
caf::PdmUiGroup * timeLapseGr = uiOrdering.addNewGroup("Time Difference Options");
|
||||
caf::PdmUiGroup* timeLapseGr = uiOrdering.addNewGroup("Time Difference Options");
|
||||
timeLapseGr->add(&m_isTimeLapseResultUiField);
|
||||
if ( m_isTimeLapseResultUiField() )
|
||||
timeLapseGr->add(&m_timeLapseBaseTimestepUiField);
|
||||
if (m_isTimeLapseResultUiField()) timeLapseGr->add(&m_timeLapseBaseTimestepUiField);
|
||||
}
|
||||
|
||||
uiOrdering.skipRemainingFields(true);
|
||||
@@ -1190,7 +1172,9 @@ void RimEclipseResultDefinition::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultDefinition::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
|
||||
void RimEclipseResultDefinition::defineEditorAttribute(const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute)
|
||||
{
|
||||
if (m_resultTypeUiField() == RiaDefines::FLOW_DIAGNOSTICS)
|
||||
{
|
||||
@@ -1202,8 +1186,7 @@ void RimEclipseResultDefinition::defineEditorAttribute(const caf::PdmFieldHandle
|
||||
listEditAttr->m_heightHint = 50;
|
||||
}
|
||||
}
|
||||
else if (field == &m_syncInjectorToProducerSelection ||
|
||||
field == &m_syncProducerToInjectorSelection)
|
||||
else if (field == &m_syncInjectorToProducerSelection || field == &m_syncProducerToInjectorSelection)
|
||||
{
|
||||
caf::PdmUiToolButtonEditorAttribute* toolButtonAttr = dynamic_cast<caf::PdmUiToolButtonEditorAttribute*>(attribute);
|
||||
if (toolButtonAttr)
|
||||
@@ -1291,8 +1274,7 @@ void RimEclipseResultDefinition::assignFlowSolutionFromCase()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseResultDefinition::hasDualPorFractureResult()
|
||||
{
|
||||
if (m_eclipseCase
|
||||
&& m_eclipseCase->eclipseCaseData())
|
||||
if (m_eclipseCase && m_eclipseCase->eclipseCaseData())
|
||||
{
|
||||
return m_eclipseCase->eclipseCaseData()->hasFractureResults();
|
||||
}
|
||||
@@ -1362,7 +1344,7 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calcOptionsForVariable
|
||||
|
||||
RigCaseCellResultsData* results = this->currentGridCellResults();
|
||||
|
||||
foreach(QString s, getResultNamesForCurrentUiResultType())
|
||||
foreach (QString s, getResultNamesForCurrentUiResultType())
|
||||
{
|
||||
if (s == RiaDefines::completionTypeResultName() && results->timeStepDates().empty()) continue;
|
||||
|
||||
@@ -1380,20 +1362,24 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calcOptionsForVariable
|
||||
cellFaceResultNames.sort();
|
||||
|
||||
// Cell Center result names
|
||||
foreach(QString s, cellCenterResultNames)
|
||||
foreach (QString s, cellCenterResultNames)
|
||||
{
|
||||
optionList.push_back(caf::PdmOptionItemInfo(convertToTimeDiffUiVarName(s), s));
|
||||
}
|
||||
|
||||
// Ternary Result
|
||||
bool hasAtLeastOneTernaryComponent = false;
|
||||
if (cellCenterResultNames.contains("SOIL")) hasAtLeastOneTernaryComponent = true;
|
||||
else if (cellCenterResultNames.contains("SGAS")) hasAtLeastOneTernaryComponent = true;
|
||||
else if (cellCenterResultNames.contains("SWAT")) hasAtLeastOneTernaryComponent = true;
|
||||
if (cellCenterResultNames.contains("SOIL"))
|
||||
hasAtLeastOneTernaryComponent = true;
|
||||
else if (cellCenterResultNames.contains("SGAS"))
|
||||
hasAtLeastOneTernaryComponent = true;
|
||||
else if (cellCenterResultNames.contains("SWAT"))
|
||||
hasAtLeastOneTernaryComponent = true;
|
||||
|
||||
if (m_resultTypeUiField == RiaDefines::DYNAMIC_NATIVE && hasAtLeastOneTernaryComponent)
|
||||
{
|
||||
optionList.push_front(caf::PdmOptionItemInfo(RiaDefines::ternarySaturationResultName(), RiaDefines::ternarySaturationResultName()));
|
||||
optionList.push_front(
|
||||
caf::PdmOptionItemInfo(RiaDefines::ternarySaturationResultName(), RiaDefines::ternarySaturationResultName()));
|
||||
}
|
||||
|
||||
// Cell Face result names
|
||||
@@ -1402,10 +1388,10 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calcOptionsForVariable
|
||||
RimEclipseFaultColors* rimEclipseFaultColors = nullptr;
|
||||
this->firstAncestorOrThisOfType(rimEclipseFaultColors);
|
||||
|
||||
if ( rimEclipseFaultColors ) showDerivedResultsFirstInList = true;
|
||||
if (rimEclipseFaultColors) showDerivedResultsFirstInList = true;
|
||||
}
|
||||
|
||||
foreach(QString s, cellFaceResultNames)
|
||||
foreach (QString s, cellFaceResultNames)
|
||||
{
|
||||
if (showDerivedResultsFirstInList)
|
||||
{
|
||||
@@ -1430,7 +1416,7 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calcOptionsForVariable
|
||||
RimCellEdgeColors* cellEdge = nullptr;
|
||||
this->firstAncestorOrThisOfType(cellEdge);
|
||||
|
||||
if ( propFilter || curve || cellEdge )
|
||||
if (propFilter || curve || cellEdge)
|
||||
{
|
||||
removePerCellFaceOptionItems(optionList);
|
||||
}
|
||||
@@ -1497,8 +1483,8 @@ QString RimEclipseResultDefinition::timeOfFlightString(bool shorter) const
|
||||
tofString = shorter ? "TOF" : "Time Of Flight";
|
||||
}
|
||||
|
||||
multipleSelected = multipleSelected ||
|
||||
injectorSelectionState() >= MULTIPLE_SELECTED || producerSelectionState() >= MULTIPLE_SELECTED;
|
||||
multipleSelected =
|
||||
multipleSelected || injectorSelectionState() >= MULTIPLE_SELECTED || producerSelectionState() >= MULTIPLE_SELECTED;
|
||||
|
||||
if (multipleSelected && !shorter)
|
||||
{
|
||||
@@ -1516,14 +1502,12 @@ QString RimEclipseResultDefinition::maxFractionTracerString(bool shorter) const
|
||||
if (injectorSelectionState() >= ONE_SELECTED && producerSelectionState() == NONE_SELECTED)
|
||||
{
|
||||
mfString = shorter ? "FloodReg" : "Flooding Region";
|
||||
if (injectorSelectionState() >= MULTIPLE_SELECTED)
|
||||
mfString += "s";
|
||||
if (injectorSelectionState() >= MULTIPLE_SELECTED) mfString += "s";
|
||||
}
|
||||
else if (injectorSelectionState() == NONE_SELECTED && producerSelectionState() >= ONE_SELECTED)
|
||||
{
|
||||
mfString = shorter ? "DrainReg" : "Drainage Region";
|
||||
if (producerSelectionState() >= MULTIPLE_SELECTED)
|
||||
mfString += "s";
|
||||
if (producerSelectionState() >= MULTIPLE_SELECTED) mfString += "s";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1700,11 +1684,11 @@ RimEclipseResultDefinition::FlowTracerSelectionState RimEclipseResultDefinition:
|
||||
{
|
||||
return ALL_SELECTED;
|
||||
}
|
||||
else if (m_selectedInjectorTracers().size() == (size_t) 1)
|
||||
else if (m_selectedInjectorTracers().size() == (size_t)1)
|
||||
{
|
||||
return ONE_SELECTED;
|
||||
}
|
||||
else if (m_selectedInjectorTracers().size() > (size_t) 1)
|
||||
else if (m_selectedInjectorTracers().size() > (size_t)1)
|
||||
{
|
||||
return MULTIPLE_SELECTED;
|
||||
}
|
||||
@@ -1727,17 +1711,16 @@ RimEclipseResultDefinition::FlowTracerSelectionState RimEclipseResultDefinition:
|
||||
{
|
||||
return ALL_SELECTED;
|
||||
}
|
||||
else if (m_selectedProducerTracers().size() == (size_t) 1)
|
||||
else if (m_selectedProducerTracers().size() == (size_t)1)
|
||||
{
|
||||
return ONE_SELECTED;
|
||||
}
|
||||
else if (m_selectedProducerTracers().size() > (size_t) 1)
|
||||
else if (m_selectedProducerTracers().size() > (size_t)1)
|
||||
{
|
||||
return MULTIPLE_SELECTED;
|
||||
}
|
||||
}
|
||||
return NONE_SELECTED;
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user