#1788 Create preliminary user interface to show Flooded PV

This commit is contained in:
Bjørnar Grip Fjær 2017-08-31 16:22:50 +02:00
parent c5ed9ccaa6
commit a335fd0f21
13 changed files with 233 additions and 90 deletions

View File

@ -35,6 +35,7 @@ namespace caf
addItem(RiaDefines::INPUT_PROPERTY, "INPUT_PROPERTY", "Input Property");
addItem(RiaDefines::FORMATION_NAMES, "FORMATION_NAMES", "Formation Names");
addItem(RiaDefines::FLOW_DIAGNOSTICS, "FLOW_DIAGNOSTICS", "Flow Diagnostics");
addItem(RiaDefines::INJECTION_FLOODING, "INJECTION_FLOODING", "Injection Flooding");
setDefault(RiaDefines::DYNAMIC_NATIVE);
}

View File

@ -33,6 +33,7 @@ namespace RiaDefines
INPUT_PROPERTY,
FORMATION_NAMES,
FLOW_DIAGNOSTICS,
INJECTION_FLOODING,
REMOVED
};

View File

@ -188,6 +188,10 @@ if (RESINSIGHT_FOUND_HDF5)
add_definitions(-DUSE_HDF5)
endif()
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_SOURING)
add_definitions(-DENABLE_SOURING)
endif()
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
add_definitions(-DUSE_PROTOTYPE_FEATURE_FRACTURES)

View File

@ -298,7 +298,7 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
}
}
}
else if (eclipseView->cellResult()->resultType() == RiaDefines::FLOW_DIAGNOSTICS)
else if (eclipseView->cellResult()->resultType() == RiaDefines::FLOW_DIAGNOSTICS || eclipseView->cellResult->resultType() == RiaDefines::INJECTION_FLOODING)
{
if ( m_statisticsTimeRange == CURRENT_TIMESTEP || m_statisticsTimeRange == ALL_TIMESTEPS) // All timesteps is ignored
{

View File

@ -273,7 +273,7 @@ public :
//--------------------------------------------------------------------------------------------------
void RimEclipseCellColors::updateLegendData(size_t currentTimeStep)
{
if (this->resultType() == RiaDefines::FLOW_DIAGNOSTICS)
if (this->resultType() == RiaDefines::FLOW_DIAGNOSTICS || this->resultType() == RiaDefines::INJECTION_FLOODING)
{
double globalMin, globalMax;
double globalPosClosestToZero, globalNegClosestToZero;

View File

@ -252,7 +252,7 @@ void RimEclipsePropertyFilter::updateReadOnlyStateOfAllFields()
//--------------------------------------------------------------------------------------------------
void RimEclipsePropertyFilter::updateRangeLabel()
{
if (resultDefinition->resultType() == RiaDefines::FLOW_DIAGNOSTICS)
if (resultDefinition->resultType() == RiaDefines::FLOW_DIAGNOSTICS || resultDefinition->resultType() == RiaDefines::INJECTION_FLOODING)
{
m_rangeLabelText = "Current Timestep";
}
@ -348,7 +348,7 @@ void RimEclipsePropertyFilter::computeResultValueRange()
clearCategories();
if (resultDefinition->resultType() == RiaDefines::FLOW_DIAGNOSTICS)
if (resultDefinition->resultType() == RiaDefines::FLOW_DIAGNOSTICS || resultDefinition->resultType() == RiaDefines::INJECTION_FLOODING)
{
RimView* 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 (resultDefinition->resultType() != RiaDefines::FLOW_DIAGNOSTICS)
if (resultDefinition->resultType() != RiaDefines::FLOW_DIAGNOSTICS && resultDefinition->resultType() != RiaDefines::INJECTION_FLOODING)
{
return;
}

View File

@ -82,6 +82,9 @@ RimEclipseResultDefinition::RimEclipseResultDefinition()
CAF_PDM_InitFieldNoDefault(&m_selectedTracers, "SelectedTracers", "Tracers", "", "", "");
m_selectedTracers.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_selectedSouringTracers, "SelectedSouringTracers", "Tracers", "", "", "");
m_selectedSouringTracers.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_flowTracerSelectionMode, "FlowTracerSelectionMode", "Tracers", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_phaseSelection, "PhaseSelection", "Phases", "", "", "");
@ -110,6 +113,11 @@ RimEclipseResultDefinition::RimEclipseResultDefinition()
m_selectedTracersUiField.xmlCapability()->setIOReadable(false);
m_selectedTracersUiField.xmlCapability()->setIOWritable(false);
m_selectedTracersUiField.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName());
CAF_PDM_InitFieldNoDefault(&m_selectedSouringTracersUiField, "MSelectedSouringTracers", "Tracers", "", "", "");
m_selectedSouringTracersUiField.xmlCapability()->setIOReadable(false);
m_selectedSouringTracersUiField.xmlCapability()->setIOWritable(false);
m_selectedSouringTracersUiField.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName());
CAF_PDM_InitFieldNoDefault(&m_selectedTracersUiFieldFilter, "SelectedTracersFilter", "Filter", "", "", "");
}
@ -132,6 +140,7 @@ void RimEclipseResultDefinition::simpleCopy(const RimEclipseResultDefinition* ot
this->setResultType(other->resultType());
this->setFlowSolution(other->m_flowSolution());
this->setSelectedTracers(other->m_selectedTracers());
this->setSelectedSouringTracers(other->m_selectedSouringTracers());
m_flowTracerSelectionMode = other->m_flowTracerSelectionMode();
m_phaseSelection = other->m_phaseSelection;
}
@ -204,6 +213,10 @@ void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
m_flowSolution = m_flowSolutionUiField();
m_selectedTracers = m_selectedTracersUiField();
}
else if (m_resultTypeUiField() == RiaDefines::INJECTION_FLOODING)
{
m_selectedSouringTracers = m_selectedSouringTracersUiField();
}
loadDataAndUpdate();
}
@ -240,6 +253,16 @@ void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
loadDataAndUpdate();
}
if (&m_selectedSouringTracersUiField == changedField)
{
if (!m_resultVariable().isEmpty())
{
m_resultType = m_resultTypeUiField();
m_selectedSouringTracers = m_selectedSouringTracersUiField();
loadDataAndUpdate();
}
}
if (&m_phaseSelection == changedField)
{
if (m_phaseSelection() != RigFlowDiagResultAddress::PHASE_ALL)
@ -433,13 +456,19 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
hasSourSimRLFile = false;
#endif
bool enableSouring = false;
#ifdef ENABLE_SOURING
enableSouring = true;
#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 )
if ( timeHistoryCurve != nullptr || !hasSourSimRLFile || !enableSouring )
{
using ResCatEnum = caf::AppEnum< RiaDefines::ResultCatType >;
for ( size_t i = 0; i < ResCatEnum::size(); ++i )
@ -457,20 +486,18 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
continue;
}
if (resType == RiaDefines::INJECTION_FLOODING && !enableSouring)
{
continue;
}
QString uiString = ResCatEnum::uiTextFromIndex(i);
options.push_back(caf::PdmOptionItemInfo(uiString, resType));
}
}
}
if ( m_resultTypeUiField() != RiaDefines::FLOW_DIAGNOSTICS )
{
if ( fieldNeedingOptions == &m_resultVariableUiField )
{
options = calcOptionsForVariableUiFieldStandard();
}
}
else
if ( m_resultTypeUiField() == RiaDefines::FLOW_DIAGNOSTICS )
{
if ( fieldNeedingOptions == &m_resultVariableUiField )
{
@ -523,6 +550,45 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
}
}
}
else if (m_resultTypeUiField() == RiaDefines::INJECTION_FLOODING)
{
if (fieldNeedingOptions == &m_selectedSouringTracersUiField)
{
RimReservoirCellResultsStorage* cellResultsStorage = currentGridCellResults();
if (cellResultsStorage && cellResultsStorage->cellResults())
{
QStringList dynamicResultNames = cellResultsStorage->cellResults()->resultNames(RiaDefines::DYNAMIC_NATIVE);
for (const QString& resultName : dynamicResultNames)
{
if (resultName == "SOIL" ||
resultName == "SWAT" ||
resultName == "SGAS" ||
resultName == "PRESSURE" ||
resultName.startsWith("FLRWAT") ||
resultName.startsWith("FLROIL") ||
resultName.startsWith("FLRGAS") ||
resultName == RiaDefines::completionTypeResultName())
{
continue;
}
options.push_back(caf::PdmOptionItemInfo(resultName, resultName));
}
}
}
else if (fieldNeedingOptions == &m_resultVariableUiField)
{
options.push_back(caf::PdmOptionItemInfo(RIG_NUM_FLOODED_PV, RIG_NUM_FLOODED_PV));
}
}
else
{
if ( fieldNeedingOptions == &m_resultVariableUiField )
{
options = calcOptionsForVariableUiFieldStandard();
}
}
(*useOptionsOnly) = true;
@ -535,7 +601,7 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calcOptionsForVariableUiFieldStandard()
{
CVF_ASSERT(m_resultTypeUiField() != RiaDefines::FLOW_DIAGNOSTICS);
CVF_ASSERT(m_resultTypeUiField() != RiaDefines::FLOW_DIAGNOSTICS && m_resultTypeUiField() != RiaDefines::INJECTION_FLOODING);
if (this->currentGridCellResults())
{
@ -655,7 +721,7 @@ size_t RimEclipseResultDefinition::scalarResultIndex() const
{
size_t gridScalarResultIndex = cvf::UNDEFINED_SIZE_T;
if (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS) return cvf::UNDEFINED_SIZE_T;
if (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS || m_resultType() == RiaDefines::INJECTION_FLOODING) return cvf::UNDEFINED_SIZE_T;
const RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults();
if (gridCellResults && gridCellResults->cellResults())
@ -671,71 +737,83 @@ size_t RimEclipseResultDefinition::scalarResultIndex() const
//--------------------------------------------------------------------------------------------------
RigFlowDiagResultAddress RimEclipseResultDefinition::flowDiagResAddress() const
{
CVF_ASSERT(m_resultType() == RiaDefines::FLOW_DIAGNOSTICS);
CVF_ASSERT(m_resultType() == RiaDefines::FLOW_DIAGNOSTICS || m_resultType() == RiaDefines::INJECTION_FLOODING);
size_t timeStep = 0;
RimView* rimView = nullptr;
this->firstAncestorOrThisOfType(rimView);
if (rimView)
if (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS)
{
timeStep = rimView->currentTimeStep();
}
RimWellLogExtractionCurve* wellLogExtractionCurve = nullptr;
this->firstAncestorOrThisOfType(wellLogExtractionCurve);
if (wellLogExtractionCurve)
{
timeStep = static_cast<size_t>(wellLogExtractionCurve->currentTimeStep());
}
size_t timeStep = 0;
// Time history curves are not supported, since it requires the time
// step to access to be supplied.
RimGridTimeHistoryCurve* timeHistoryCurve = nullptr;
this->firstAncestorOrThisOfType(timeHistoryCurve);
CVF_ASSERT(timeHistoryCurve == nullptr);
std::set<std::string> selTracerNames;
if (m_flowTracerSelectionMode == FLOW_TR_BY_SELECTION)
{
for (const QString& tName : m_selectedTracers())
RimView* rimView = nullptr;
this->firstAncestorOrThisOfType(rimView);
if (rimView)
{
selTracerNames.insert(tName.toStdString());
timeStep = rimView->currentTimeStep();
}
RimWellLogExtractionCurve* wellLogExtractionCurve = nullptr;
this->firstAncestorOrThisOfType(wellLogExtractionCurve);
if (wellLogExtractionCurve)
{
timeStep = static_cast<size_t>(wellLogExtractionCurve->currentTimeStep());
}
// Time history curves are not supported, since it requires the time
// step to access to be supplied.
RimGridTimeHistoryCurve* timeHistoryCurve = nullptr;
this->firstAncestorOrThisOfType(timeHistoryCurve);
CVF_ASSERT(timeHistoryCurve == nullptr);
std::set<std::string> selTracerNames;
if (m_flowTracerSelectionMode == FLOW_TR_BY_SELECTION)
{
for (const QString& tName : m_selectedTracers())
{
selTracerNames.insert(tName.toStdString());
}
}
else
{
RimFlowDiagSolution* flowSol = m_flowSolution();
if (flowSol)
{
std::vector<QString> tracerNames = flowSol->tracerNames();
if (m_flowTracerSelectionMode == FLOW_TR_INJECTORS || m_flowTracerSelectionMode == FLOW_TR_INJ_AND_PROD)
{
for (const QString& tracerName : tracerNames)
{
RimFlowDiagSolution::TracerStatusType status = flowSol->tracerStatusInTimeStep(tracerName, timeStep);
if (status == RimFlowDiagSolution::INJECTOR)
{
selTracerNames.insert(tracerName.toStdString());
}
}
}
if (m_flowTracerSelectionMode == FLOW_TR_PRODUCERS || m_flowTracerSelectionMode == FLOW_TR_INJ_AND_PROD)
{
for (const QString& tracerName : tracerNames)
{
RimFlowDiagSolution::TracerStatusType status = flowSol->tracerStatusInTimeStep(tracerName, timeStep);
if (status == RimFlowDiagSolution::PRODUCER)
{
selTracerNames.insert(tracerName.toStdString());
}
}
}
}
}
return RigFlowDiagResultAddress(m_resultVariable().toStdString(), m_phaseSelection(), selTracerNames);
}
else
{
RimFlowDiagSolution* flowSol = m_flowSolution();
if (flowSol)
std::set<std::string> selTracerNames;
for (const QString& selectedTracerName : m_selectedSouringTracers())
{
std::vector<QString> tracerNames = flowSol->tracerNames();
if (m_flowTracerSelectionMode == FLOW_TR_INJECTORS || m_flowTracerSelectionMode == FLOW_TR_INJ_AND_PROD)
{
for (const QString& tracerName : tracerNames)
{
RimFlowDiagSolution::TracerStatusType status = flowSol->tracerStatusInTimeStep(tracerName, timeStep);
if (status == RimFlowDiagSolution::INJECTOR)
{
selTracerNames.insert(tracerName.toStdString());
}
}
}
if (m_flowTracerSelectionMode == FLOW_TR_PRODUCERS || m_flowTracerSelectionMode == FLOW_TR_INJ_AND_PROD)
{
for (const QString& tracerName : tracerNames)
{
RimFlowDiagSolution::TracerStatusType status = flowSol->tracerStatusInTimeStep(tracerName, timeStep);
if (status == RimFlowDiagSolution::PRODUCER)
{
selTracerNames.insert(tracerName.toStdString());
}
}
}
selTracerNames.insert(selectedTracerName.toUtf8().constData());
}
return RigFlowDiagResultAddress(RIG_NUM_FLOODED_PV, RigFlowDiagResultAddress::PHASE_ALL, selTracerNames);
}
return RigFlowDiagResultAddress(m_resultVariable().toStdString(), m_phaseSelection(), selTracerNames);
}
//--------------------------------------------------------------------------------------------------
@ -810,7 +888,7 @@ QString RimEclipseResultDefinition::resultVariableUiShortName() const
//--------------------------------------------------------------------------------------------------
void RimEclipseResultDefinition::loadResult()
{
if (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS) return; // Will load automatically on access
if (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS || this->resultType() == RiaDefines::INJECTION_FLOODING) return; // Will load automatically on access
RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults();
if (gridCellResults)
@ -826,7 +904,7 @@ void RimEclipseResultDefinition::loadResult()
//--------------------------------------------------------------------------------------------------
bool RimEclipseResultDefinition::hasStaticResult() const
{
if (this->resultType() == RiaDefines::FLOW_DIAGNOSTICS) return false;
if (this->resultType() == RiaDefines::FLOW_DIAGNOSTICS || this->resultType() == RiaDefines::INJECTION_FLOODING) return false;
const RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults();
size_t gridScalarResultIndex = this->scalarResultIndex();
@ -846,7 +924,7 @@ bool RimEclipseResultDefinition::hasStaticResult() const
//--------------------------------------------------------------------------------------------------
bool RimEclipseResultDefinition::hasResult() const
{
if (this->resultType() == RiaDefines::FLOW_DIAGNOSTICS)
if (this->resultType() == RiaDefines::FLOW_DIAGNOSTICS || this->resultType() == RiaDefines::INJECTION_FLOODING)
{
if (m_flowSolution() && !m_resultVariable().isEmpty()) return true;
}
@ -880,6 +958,10 @@ bool RimEclipseResultDefinition::hasDynamicResult() const
{
return true;
}
else if (m_resultType() == RiaDefines::INJECTION_FLOODING)
{
return true;
}
if (this->currentGridCellResults() && this->currentGridCellResults()->cellResults())
{
@ -964,6 +1046,15 @@ void RimEclipseResultDefinition::setSelectedTracers(const std::vector<QString>&
this->m_selectedTracersUiField = selectedTracers;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEclipseResultDefinition::setSelectedSouringTracers(const std::vector<QString>& selectedTracers)
{
this->m_selectedSouringTracers = selectedTracers;
this->m_selectedSouringTracersUiField = selectedTracers;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -1053,6 +1144,12 @@ void RimEclipseResultDefinition::defineUiOrdering(QString uiConfigName, caf::Pdm
assignFlowSolutionFromCase();
}
}
if (m_resultTypeUiField() == RiaDefines::INJECTION_FLOODING)
{
uiOrdering.add(&m_selectedSouringTracersUiField);
}
uiOrdering.add(&m_resultVariableUiField);
uiOrdering.skipRemainingFields(true);

View File

@ -96,6 +96,7 @@ public:
void setTofAndSelectTracer(const QString& tracerName);
void setSelectedTracers(const std::vector<QString>& selectedTracers);
void setSelectedSouringTracers(const std::vector<QString>& selectedTracers);
protected:
@ -115,6 +116,8 @@ protected:
caf::PdmPtrField<RimFlowDiagSolution*> m_flowSolution;
caf::PdmField<std::vector<QString> > m_selectedTracers;
caf::PdmField<std::vector<QString> > m_selectedSouringTracers;
friend class RimEclipsePropertyFilter;
friend class RimEclipseFaultColors;
friend class RimWellLogExtractionCurve;
@ -132,6 +135,8 @@ protected:
caf::PdmField<QString> m_selectedTracersUiFieldFilter;
caf::PdmField<std::vector<QString> > m_selectedTracersUiField;
caf::PdmField<std::vector<QString> > m_selectedSouringTracersUiField;
caf::PdmPointer<RimEclipseCase> m_eclipseCase;

View File

@ -26,6 +26,7 @@
#define RIG_FLD_CELL_FRACTION_RESNAME "Fraction"
#define RIG_FLD_MAX_FRACTION_TRACER_RESNAME "MaxFractionTracer"
#define RIG_FLD_COMMUNICATION_RESNAME "Communication"
#define RIG_NUM_FLOODED_PV "Number of Flooded PV"
#define RIG_FLOW_TOTAL_NAME "Total"
#define RIG_FLOW_OIL_NAME "Oil"

View File

@ -22,12 +22,15 @@
#include "RigEclipseCaseData.h"
#include "RigFlowDiagSolverInterface.h"
#include "RigFlowDiagStatCalc.h"
#include "RigEclipseCaseData.h"
#include "RigMainGrid.h"
#include "RimEclipseCase.h"
#include "RimEclipseResultCase.h"
#include "RimFlowDiagSolution.h"
#include "RigFlowDiagResultFrames.h"
#include "RigStatisticsDataCache.h"
#include "RigNumberOfFloodedPoreVolumesCalculator.h"
#include <cmath> // Needed for HUGE_VAL on Linux
@ -212,6 +215,10 @@ std::vector<double>* RigFlowDiagResults::calculateDerivedResult(const RigFlowDia
{
return calculateTracerWithMaxFractionResult(resVarAddr, frameIndex);
}
else if (resVarAddr.variableName == RIG_NUM_FLOODED_PV)
{
return calculateNumFloodedPV(resVarAddr, frameIndex);
}
return nullptr;
}
@ -418,6 +425,29 @@ std::vector<double>* RigFlowDiagResults::calculateCommunicationResult(const RigF
return &commPI;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<double>* RigFlowDiagResults::calculateNumFloodedPV(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex)
{
RimEclipseCase* eclipseCase;
m_flowDiagSolution->firstAncestorOrThisOfTypeAsserted(eclipseCase);
std::vector<QString> tracerNames;
for (const std::string& tracerName : resVarAddr.selectedTracerNames)
{
tracerNames.push_back(QString::fromUtf8(tracerName.c_str()));
}
RigNumberOfFloodedPoreVolumesCalculator calc(eclipseCase, tracerNames);
RigFlowDiagResultFrames* frames = this->createScalarResult(resVarAddr);
std::vector<double>& frame = frames->frameData(frameIndex);
frame = calc.numberOfFloodedPorevolumesAtTimeStep(frameIndex);
return &frame;
}
//--------------------------------------------------------------------------------------------------
///

View File

@ -105,6 +105,7 @@ private:
std::vector<double>* calculateSumOfFractionsResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex);
std::vector<double>* calculateTracerWithMaxFractionResult(const RigFlowDiagResultAddress &resVarAddr, size_t frameIndex);
std::vector<double>* calculateCommunicationResult(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex);
std::vector<double>* calculateNumFloodedPV(const RigFlowDiagResultAddress& resVarAddr, size_t frameIndex);
std::vector<const std::vector<double>* > findResultsForSelectedTracers(const RigFlowDiagResultAddress& resVarAddr,

View File

@ -221,23 +221,7 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromResultDefinition
size_t timeStepIndex,
RimEclipseResultDefinition* resultDefinition)
{
if (resultDefinition->resultType() != RiaDefines::FLOW_DIAGNOSTICS)
{
size_t adjustedTimeStepIndex = timeStepIndex;
if ( resultDefinition->hasStaticResult() )
{
adjustedTimeStepIndex = 0;
}
return RigResultAccessorFactory::createFromNameAndType(eclipseCase,
gridIndex,
resultDefinition->porosityModel(),
adjustedTimeStepIndex,
resultDefinition->resultVariable(),
resultDefinition->resultType());
}
else
if (resultDefinition->resultType() == RiaDefines::FLOW_DIAGNOSTICS || resultDefinition->resultType() == RiaDefines::INJECTION_FLOODING)
{
RimFlowDiagSolution* flowSol = resultDefinition->flowDiagSolution();
if (!flowSol) return new RigHugeValResultAccessor;;
@ -252,6 +236,21 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromResultDefinition
return object;
}
else
{
size_t adjustedTimeStepIndex = timeStepIndex;
if ( resultDefinition->hasStaticResult() )
{
adjustedTimeStepIndex = 0;
}
return RigResultAccessorFactory::createFromNameAndType(eclipseCase,
gridIndex,
resultDefinition->porosityModel(),
adjustedTimeStepIndex,
resultDefinition->resultVariable(),
resultDefinition->resultType());
}
}
//--------------------------------------------------------------------------------------------------

View File

@ -1125,6 +1125,10 @@ public:
resTypeNames.push_back("Generated");
resTypes.push_back(RiaDefines::INPUT_PROPERTY);
resTypeNames.push_back("Input");
#ifdef ENABLE_SOURING
resTypes.push_back(RiaDefines::INJECTION_FLOODING);
resTypeNames.push_back("Injection Flooding");
#endif /* ENABLE_SOURING */
for (size_t rtIdx = 0; rtIdx < resTypes.size(); ++rtIdx)
{