#1693 Reroute all access to RigCaseCellResultsData away from RimReservoirCellResultsStorage

This commit is contained in:
Jacob Støren 2017-09-13 10:39:20 +02:00
parent bb098a241b
commit 7f07962187
25 changed files with 158 additions and 194 deletions

View File

@ -27,6 +27,7 @@
#include "RicExportFractureCompletionsImpl.h" #include "RicExportFractureCompletionsImpl.h"
#include "RigActiveCellInfo.h" #include "RigActiveCellInfo.h"
#include "RigCaseCellResultsData.h"
#include "RigEclipseCaseData.h" #include "RigEclipseCaseData.h"
#include "RigMainGrid.h" #include "RigMainGrid.h"
#include "RigResultAccessorFactory.h" #include "RigResultAccessorFactory.h"
@ -44,7 +45,6 @@
#include "RimPerforationCollection.h" #include "RimPerforationCollection.h"
#include "RimPerforationInterval.h" #include "RimPerforationInterval.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimReservoirCellResultsStorage.h"
#include "RimEclipseWell.h" #include "RimEclipseWell.h"
#include "RimEclipseWellCollection.h" #include "RimEclipseWellCollection.h"
#include "RimWellPath.h" #include "RimWellPath.h"
@ -940,11 +940,11 @@ CellDirection RicWellPathExportCompletionDataFeature::calculateDirectionInCell(R
{ {
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData(); RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DX"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DX");
cvf::ref<RigResultAccessor> dxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DX"); cvf::ref<RigResultAccessor> dxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DX");
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DY"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DY");
cvf::ref<RigResultAccessor> dyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DY"); cvf::ref<RigResultAccessor> dyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DY");
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ");
cvf::ref<RigResultAccessor> dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DZ"); cvf::ref<RigResultAccessor> dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DZ");
double xLengthFraction = abs(lengthsInCell.x() / dxAccessObject->cellScalarGlobIdx(cellIndex)); double xLengthFraction = abs(lengthsInCell.x() / dxAccessObject->cellScalarGlobIdx(cellIndex));
@ -979,18 +979,18 @@ double RicWellPathExportCompletionDataFeature::calculateTransmissibility(RimEcli
{ {
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData(); RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DX"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DX");
cvf::ref<RigResultAccessor> dxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DX"); cvf::ref<RigResultAccessor> dxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DX");
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DY"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DY");
cvf::ref<RigResultAccessor> dyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DY"); cvf::ref<RigResultAccessor> dyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DY");
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ");
cvf::ref<RigResultAccessor> dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DZ"); cvf::ref<RigResultAccessor> dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DZ");
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMX"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMX");
cvf::ref<RigResultAccessor> permxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMX"); cvf::ref<RigResultAccessor> permxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMX");
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMY"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMY");
cvf::ref<RigResultAccessor> permyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMY"); cvf::ref<RigResultAccessor> permyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMY");
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMZ"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMZ");
cvf::ref<RigResultAccessor> permzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMZ"); cvf::ref<RigResultAccessor> permzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMZ");
double dx = dxAccessObject->cellScalarGlobIdx(cellIndex); double dx = dxAccessObject->cellScalarGlobIdx(cellIndex);
@ -1028,18 +1028,18 @@ double RicWellPathExportCompletionDataFeature::calculateTransmissibilityAsEclips
{ {
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData(); RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DX"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DX");
cvf::ref<RigResultAccessor> dxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DX"); cvf::ref<RigResultAccessor> dxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DX");
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DY"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DY");
cvf::ref<RigResultAccessor> dyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DY"); cvf::ref<RigResultAccessor> dyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DY");
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ");
cvf::ref<RigResultAccessor> dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DZ"); cvf::ref<RigResultAccessor> dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DZ");
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMX"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMX");
cvf::ref<RigResultAccessor> permxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMX"); cvf::ref<RigResultAccessor> permxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMX");
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMY"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMY");
cvf::ref<RigResultAccessor> permyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMY"); cvf::ref<RigResultAccessor> permyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMY");
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMZ"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMZ");
cvf::ref<RigResultAccessor> permzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMZ"); cvf::ref<RigResultAccessor> permzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMZ");
double dx = dxAccessObject->cellScalarGlobIdx(cellIndex); double dx = dxAccessObject->cellScalarGlobIdx(cellIndex);

View File

@ -243,11 +243,11 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
{ {
if (m_statisticsTimeRange == ALL_TIMESTEPS) if (m_statisticsTimeRange == ALL_TIMESTEPS)
{ {
eclipseView->currentGridCellResults()->cellResults()->minMaxCellScalarValues(scalarIndex, min, max); eclipseView->currentGridCellResults()->minMaxCellScalarValues(scalarIndex, min, max);
eclipseView->currentGridCellResults()->cellResults()->p10p90CellScalarValues(scalarIndex, p10, p90); eclipseView->currentGridCellResults()->p10p90CellScalarValues(scalarIndex, p10, p90);
eclipseView->currentGridCellResults()->cellResults()->meanCellScalarValues(scalarIndex, mean); eclipseView->currentGridCellResults()->meanCellScalarValues(scalarIndex, mean);
eclipseView->currentGridCellResults()->cellResults()->sumCellScalarValues(scalarIndex, sum); eclipseView->currentGridCellResults()->sumCellScalarValues(scalarIndex, sum);
histogram = &(eclipseView->currentGridCellResults()->cellResults()->cellScalarValuesHistogram(scalarIndex)); histogram = &(eclipseView->currentGridCellResults()->cellScalarValuesHistogram(scalarIndex));
} }
else if (m_statisticsTimeRange == CURRENT_TIMESTEP ) else if (m_statisticsTimeRange == CURRENT_TIMESTEP )
{ {
@ -257,11 +257,11 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
currentTimeStep = 0; currentTimeStep = 0;
} }
eclipseView->currentGridCellResults()->cellResults()->minMaxCellScalarValues(scalarIndex, currentTimeStep, min, max); eclipseView->currentGridCellResults()->minMaxCellScalarValues(scalarIndex, currentTimeStep, min, max);
eclipseView->currentGridCellResults()->cellResults()->p10p90CellScalarValues(scalarIndex, currentTimeStep, p10, p90); eclipseView->currentGridCellResults()->p10p90CellScalarValues(scalarIndex, currentTimeStep, p10, p90);
eclipseView->currentGridCellResults()->cellResults()->meanCellScalarValues(scalarIndex, currentTimeStep, mean); eclipseView->currentGridCellResults()->meanCellScalarValues(scalarIndex, currentTimeStep, mean);
eclipseView->currentGridCellResults()->cellResults()->sumCellScalarValues(scalarIndex, currentTimeStep, sum); eclipseView->currentGridCellResults()->sumCellScalarValues(scalarIndex, currentTimeStep, sum);
histogram = &(eclipseView->currentGridCellResults()->cellResults()->cellScalarValuesHistogram(scalarIndex, currentTimeStep)); histogram = &(eclipseView->currentGridCellResults()->cellScalarValuesHistogram(scalarIndex, currentTimeStep));
} }
else else
{ {
@ -636,7 +636,7 @@ void Rim3dOverlayInfoConfig::updateVisCellStatsIfNeeded()
else else
{ {
size_t scalarIndex = eclipseView->cellResult()->scalarResultIndex(); size_t scalarIndex = eclipseView->cellResult()->scalarResultIndex();
calc = new RigEclipseNativeVisibleCellsStatCalc(eclipseView->currentGridCellResults()->cellResults(), calc = new RigEclipseNativeVisibleCellsStatCalc(eclipseView->currentGridCellResults(),
scalarIndex, scalarIndex,
eclipseView->currentTotalCellVisibility().p()); eclipseView->currentTotalCellVisibility().p());
} }

View File

@ -186,7 +186,7 @@ QList<caf::PdmOptionItemInfo> RimCellEdgeColors::calculateValueOptions(const caf
if (m_reservoirView && m_reservoirView->currentGridCellResults()) if (m_reservoirView && m_reservoirView->currentGridCellResults())
{ {
QStringList varList; QStringList varList;
varList = m_reservoirView->currentGridCellResults()->cellResults()->resultNames(RiaDefines::STATIC_NATIVE); varList = m_reservoirView->currentGridCellResults()->resultNames(RiaDefines::STATIC_NATIVE);
//TODO: Must also handle input properties //TODO: Must also handle input properties
//varList += m_reservoirView->gridCellResults()->resultNames(RiaDefines::INPUT_PROPERTY); //varList += m_reservoirView->gridCellResults()->resultNames(RiaDefines::INPUT_PROPERTY);
@ -295,7 +295,7 @@ QStringList RimCellEdgeColors::findResultVariableNames()
if (m_reservoirView && m_reservoirView->currentGridCellResults() && !m_resultVariable().isEmpty()) if (m_reservoirView && m_reservoirView->currentGridCellResults() && !m_resultVariable().isEmpty())
{ {
QStringList varList; QStringList varList;
varList = m_reservoirView->currentGridCellResults()->cellResults()->resultNames(RiaDefines::STATIC_NATIVE); varList = m_reservoirView->currentGridCellResults()->resultNames(RiaDefines::STATIC_NATIVE);
//TODO: Must handle Input properties //TODO: Must handle Input properties
int i; int i;
@ -458,7 +458,7 @@ void RimCellEdgeColors::minMaxCellEdgeValues(double& min, double& max)
{ {
double cMin, cMax; double cMin, cMax;
m_reservoirView->currentGridCellResults()->cellResults()->minMaxCellScalarValues(resultIndices[idx], cMin, cMax); m_reservoirView->currentGridCellResults()->minMaxCellScalarValues(resultIndices[idx], cMin, cMax);
globalMin = CVF_MIN(globalMin, cMin); globalMin = CVF_MIN(globalMin, cMin);
globalMax = CVF_MAX(globalMax, cMax); globalMax = CVF_MAX(globalMax, cMax);
@ -489,7 +489,7 @@ void RimCellEdgeColors::posNegClosestToZero(double& pos, double& neg)
{ {
double localPos, localNeg; double localPos, localNeg;
m_reservoirView->currentGridCellResults()->cellResults()->posNegClosestToZero(resultIndices[idx], localPos, localNeg); m_reservoirView->currentGridCellResults()->posNegClosestToZero(resultIndices[idx], localPos, localNeg);
if (localPos > 0 && localPos < pos) pos = localPos; if (localPos > 0 && localPos < pos) pos = localPos;
if (localNeg < 0 && localNeg > neg) neg = localNeg; if (localNeg < 0 && localNeg > neg) neg = localNeg;

View File

@ -258,7 +258,7 @@ RimEclipseView* RimEclipseCase::createCopyAndAddView(const RimEclipseView* sourc
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseCase::recalculateCompletionTypeAndRedrawAllViews() void RimEclipseCase::recalculateCompletionTypeAndRedrawAllViews()
{ {
m_matrixModelResults->cellResults()->clearScalarResult(RiaDefines::DYNAMIC_NATIVE, RiaDefines::completionTypeResultName()); results(RiaDefines::MATRIX_MODEL)->clearScalarResult(RiaDefines::DYNAMIC_NATIVE, RiaDefines::completionTypeResultName());
for (RimView* view : views()) for (RimView* view : views())
{ {
@ -576,28 +576,28 @@ bool RimEclipseCase::openReserviorCase()
} }
{ {
RimReservoirCellResultsStorage* results = this->resultsStorage(RiaDefines::MATRIX_MODEL); RigCaseCellResultsData* results = this->results(RiaDefines::MATRIX_MODEL);
if (results && results->cellResults()) if (results )
{ {
results->cellResults()->createPlaceholderResultEntries(); results->createPlaceholderResultEntries();
// After the placeholder result for combined transmissibility is created, // After the placeholder result for combined transmissibility is created,
// make sure the nnc transmissibilities can be addressed by this scalarResultIndex as well // make sure the nnc transmissibilities can be addressed by this scalarResultIndex as well
size_t combinedTransResIdx = results->cellResults()->findScalarResultIndex(RiaDefines::STATIC_NATIVE, RiaDefines::combinedTransmissibilityResultName()); size_t combinedTransResIdx = results->findScalarResultIndex(RiaDefines::STATIC_NATIVE, RiaDefines::combinedTransmissibilityResultName());
if (combinedTransResIdx != cvf::UNDEFINED_SIZE_T) if (combinedTransResIdx != cvf::UNDEFINED_SIZE_T)
{ {
eclipseCaseData()->mainGrid()->nncData()->setScalarResultIndex(RigNNCData::propertyNameCombTrans(), combinedTransResIdx); eclipseCaseData()->mainGrid()->nncData()->setScalarResultIndex(RigNNCData::propertyNameCombTrans(), combinedTransResIdx);
} }
size_t combinedWatFluxResIdx = results->cellResults()->findScalarResultIndex(RiaDefines::DYNAMIC_NATIVE, RiaDefines::combinedWaterFluxResultName()); size_t combinedWatFluxResIdx = results->findScalarResultIndex(RiaDefines::DYNAMIC_NATIVE, RiaDefines::combinedWaterFluxResultName());
if (combinedWatFluxResIdx != cvf::UNDEFINED_SIZE_T) if (combinedWatFluxResIdx != cvf::UNDEFINED_SIZE_T)
{ {
eclipseCaseData()->mainGrid()->nncData()->setScalarResultIndex(RigNNCData::propertyNameFluxWat(), combinedWatFluxResIdx); eclipseCaseData()->mainGrid()->nncData()->setScalarResultIndex(RigNNCData::propertyNameFluxWat(), combinedWatFluxResIdx);
} }
size_t combinedOilFluxResIdx = results->cellResults()->findScalarResultIndex(RiaDefines::DYNAMIC_NATIVE, RiaDefines::combinedOilFluxResultName()); size_t combinedOilFluxResIdx = results->findScalarResultIndex(RiaDefines::DYNAMIC_NATIVE, RiaDefines::combinedOilFluxResultName());
if (combinedOilFluxResIdx != cvf::UNDEFINED_SIZE_T) if (combinedOilFluxResIdx != cvf::UNDEFINED_SIZE_T)
{ {
eclipseCaseData()->mainGrid()->nncData()->setScalarResultIndex(RigNNCData::propertyNameFluxOil(), combinedOilFluxResIdx); eclipseCaseData()->mainGrid()->nncData()->setScalarResultIndex(RigNNCData::propertyNameFluxOil(), combinedOilFluxResIdx);
} }
size_t combinedGasFluxResIdx = results->cellResults()->findScalarResultIndex(RiaDefines::DYNAMIC_NATIVE, RiaDefines::combinedGasFluxResultName()); size_t combinedGasFluxResIdx = results->findScalarResultIndex(RiaDefines::DYNAMIC_NATIVE, RiaDefines::combinedGasFluxResultName());
if (combinedGasFluxResIdx != cvf::UNDEFINED_SIZE_T) if (combinedGasFluxResIdx != cvf::UNDEFINED_SIZE_T)
{ {
eclipseCaseData()->mainGrid()->nncData()->setScalarResultIndex(RigNNCData::propertyNameFluxGas(), combinedGasFluxResIdx); eclipseCaseData()->mainGrid()->nncData()->setScalarResultIndex(RigNNCData::propertyNameFluxGas(), combinedGasFluxResIdx);
@ -607,10 +607,10 @@ bool RimEclipseCase::openReserviorCase()
} }
{ {
RimReservoirCellResultsStorage* results = this->resultsStorage(RiaDefines::FRACTURE_MODEL); RigCaseCellResultsData* results = this->results(RiaDefines::FRACTURE_MODEL);
if (results && results->cellResults()) if (results)
{ {
results->cellResults()->createPlaceholderResultEntries(); results->createPlaceholderResultEntries();
} }
} }
@ -639,7 +639,7 @@ QStringList RimEclipseCase::timeStepStrings() const
{ {
QStringList stringList; QStringList stringList;
int timeStepCount = static_cast<int>(resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()->maxTimeStepCount()); int timeStepCount = static_cast<int>(results(RiaDefines::MATRIX_MODEL)->maxTimeStepCount());
for (int i = 0; i < timeStepCount; i++) for (int i = 0; i < timeStepCount; i++)
{ {
stringList += this->timeStepName(i); stringList += this->timeStepName(i);
@ -741,5 +741,5 @@ double RimEclipseCase::characteristicCellSize() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
std::vector<QDateTime> RimEclipseCase::timeStepDates() const std::vector<QDateTime> RimEclipseCase::timeStepDates() const
{ {
return resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()->timeStepDates(); return results(RiaDefines::MATRIX_MODEL)->timeStepDates();
} }

View File

@ -88,8 +88,8 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
if (fileNames.contains(RiaDefines::mockModelBasicInputCase())) if (fileNames.contains(RiaDefines::mockModelBasicInputCase()))
{ {
cvf::ref<RifReaderInterface> readerInterface = this->createMockModel(fileNames[0]); cvf::ref<RifReaderInterface> readerInterface = this->createMockModel(fileNames[0]);
resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()->setReaderInterface(readerInterface.p()); results(RiaDefines::MATRIX_MODEL)->setReaderInterface(readerInterface.p());
resultsStorage(RiaDefines::FRACTURE_MODEL)->cellResults()->setReaderInterface(readerInterface.p()); results(RiaDefines::FRACTURE_MODEL)->setReaderInterface(readerInterface.p());
eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL)->computeDerivedData(); eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL)->computeDerivedData();
eclipseCaseData()->activeCellInfo(RiaDefines::FRACTURE_MODEL)->computeDerivedData(); eclipseCaseData()->activeCellInfo(RiaDefines::FRACTURE_MODEL)->computeDerivedData();
@ -204,8 +204,8 @@ bool RimEclipseInputCase::openEclipseGridFile()
CVF_ASSERT(this->eclipseCaseData()); CVF_ASSERT(this->eclipseCaseData());
CVF_ASSERT(readerInterface.notNull()); CVF_ASSERT(readerInterface.notNull());
resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()->setReaderInterface(readerInterface.p()); results(RiaDefines::MATRIX_MODEL)->setReaderInterface(readerInterface.p());
resultsStorage(RiaDefines::FRACTURE_MODEL)->cellResults()->setReaderInterface(readerInterface.p()); results(RiaDefines::FRACTURE_MODEL)->setReaderInterface(readerInterface.p());
this->eclipseCaseData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis); this->eclipseCaseData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis);
@ -217,11 +217,8 @@ bool RimEclipseInputCase::openEclipseGridFile()
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
if (app->preferences()->autocomputeDepthRelatedProperties) if (app->preferences()->autocomputeDepthRelatedProperties)
{ {
RimReservoirCellResultsStorage* matrixResults = resultsStorage(RiaDefines::MATRIX_MODEL); results(RiaDefines::MATRIX_MODEL)->computeDepthRelatedResults();
RimReservoirCellResultsStorage* fractureResults = resultsStorage(RiaDefines::FRACTURE_MODEL); results(RiaDefines::FRACTURE_MODEL)->computeDepthRelatedResults();
matrixResults->cellResults()->computeDepthRelatedResults();
fractureResults->cellResults()->computeDepthRelatedResults();
} }
return true; return true;

View File

@ -372,10 +372,10 @@ void RimEclipsePropertyFilter::computeResultValueRange()
size_t scalarIndex = resultDefinition->scalarResultIndex(); size_t scalarIndex = resultDefinition->scalarResultIndex();
if ( scalarIndex != cvf::UNDEFINED_SIZE_T ) if ( scalarIndex != cvf::UNDEFINED_SIZE_T )
{ {
RimReservoirCellResultsStorage* results = resultDefinition->currentGridCellResults(); RigCaseCellResultsData* results = resultDefinition->currentGridCellResults();
if ( results ) if ( results )
{ {
results->cellResults()->minMaxCellScalarValues(scalarIndex, min, max); results->minMaxCellScalarValues(scalarIndex, min, max);
if ( resultDefinition->hasCategoryResult() ) if ( resultDefinition->hasCategoryResult() )
{ {
@ -398,7 +398,7 @@ void RimEclipsePropertyFilter::computeResultValueRange()
} }
else else
{ {
setCategoryValues(results->cellResults()->uniqueCellScalarValues(scalarIndex)); setCategoryValues(results->uniqueCellScalarValues(scalarIndex));
} }
} }
} }

View File

@ -179,8 +179,8 @@ bool RimEclipseResultCase::importGridAndResultMetaData(bool showTimeStepFilter)
readerInterface = readerEclipseOutput; readerInterface = readerEclipseOutput;
} }
resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()->setReaderInterface(readerInterface.p()); results(RiaDefines::MATRIX_MODEL)->setReaderInterface(readerInterface.p());
resultsStorage(RiaDefines::FRACTURE_MODEL)->cellResults()->setReaderInterface(readerInterface.p()); results(RiaDefines::FRACTURE_MODEL)->setReaderInterface(readerInterface.p());
progInfo.incrementProgress(); progInfo.incrementProgress();
@ -262,8 +262,8 @@ bool RimEclipseResultCase::openAndReadActiveCellData(RigEclipseCaseData* mainEcl
readerInterface = readerEclipseOutput; readerInterface = readerEclipseOutput;
} }
resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()->setReaderInterface(readerInterface.p()); results(RiaDefines::MATRIX_MODEL)->setReaderInterface(readerInterface.p());
resultsStorage(RiaDefines::FRACTURE_MODEL)->cellResults()->setReaderInterface(readerInterface.p()); results(RiaDefines::FRACTURE_MODEL)->setReaderInterface(readerInterface.p());
CVF_ASSERT(this->eclipseCaseData()); CVF_ASSERT(this->eclipseCaseData());
CVF_ASSERT(readerInterface.notNull()); CVF_ASSERT(readerInterface.notNull());
@ -280,9 +280,9 @@ bool RimEclipseResultCase::openAndReadActiveCellData(RigEclipseCaseData* mainEcl
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseResultCase::loadAndUpdateSourSimData() void RimEclipseResultCase::loadAndUpdateSourSimData()
{ {
if (!resultsStorage(RiaDefines::MATRIX_MODEL)) return; if (!results(RiaDefines::MATRIX_MODEL)) return;
resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()->setHdf5Filename(m_sourSimFileName); results(RiaDefines::MATRIX_MODEL)->setHdf5Filename(m_sourSimFileName);
if (!hasSourSimFile()) if (!hasSourSimFile())
{ {

View File

@ -159,11 +159,11 @@ void RimEclipseResultDefinition::setEclipseCase(RimEclipseCase* eclipseCase)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimReservoirCellResultsStorage* RimEclipseResultDefinition::currentGridCellResults() const RigCaseCellResultsData* RimEclipseResultDefinition::currentGridCellResults() const
{ {
if (!m_eclipseCase ) return nullptr; if (!m_eclipseCase ) return nullptr;
return m_eclipseCase->resultsStorage(m_porosityModel()); return m_eclipseCase->results(m_porosityModel());
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -553,10 +553,10 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
{ {
if (fieldNeedingOptions == &m_selectedSouringTracersUiField) if (fieldNeedingOptions == &m_selectedSouringTracersUiField)
{ {
RimReservoirCellResultsStorage* cellResultsStorage = currentGridCellResults(); RigCaseCellResultsData* cellResultsStorage = currentGridCellResults();
if (cellResultsStorage && cellResultsStorage->cellResults()) if (cellResultsStorage)
{ {
QStringList dynamicResultNames = cellResultsStorage->cellResults()->resultNames(RiaDefines::DYNAMIC_NATIVE); QStringList dynamicResultNames = cellResultsStorage->resultNames(RiaDefines::DYNAMIC_NATIVE);
for (const QString& resultName : dynamicResultNames) for (const QString& resultName : dynamicResultNames)
{ {
@ -694,13 +694,11 @@ QStringList RimEclipseResultDefinition::getResultNamesForCurrentUiResultType()
{ {
if ( m_resultTypeUiField() != RiaDefines::FLOW_DIAGNOSTICS ) if ( m_resultTypeUiField() != RiaDefines::FLOW_DIAGNOSTICS )
{ {
RimReservoirCellResultsStorage* cellResultsStorage = currentGridCellResults(); RigCaseCellResultsData* cellResultsStorage = currentGridCellResults();
if ( !cellResultsStorage ) return QStringList(); if ( !cellResultsStorage ) return QStringList();
if ( !cellResultsStorage->cellResults() ) return QStringList(); return cellResultsStorage->resultNames(m_resultTypeUiField());
return cellResultsStorage->cellResults()->resultNames(m_resultTypeUiField());
} }
else else
{ {
@ -722,10 +720,10 @@ size_t RimEclipseResultDefinition::scalarResultIndex() const
if (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS || m_resultType() == RiaDefines::INJECTION_FLOODING) 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(); const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
if (gridCellResults && gridCellResults->cellResults()) if (gridCellResults )
{ {
gridScalarResultIndex = gridCellResults->cellResults()->findScalarResultIndex(m_resultType(), m_resultVariable()); gridScalarResultIndex = gridCellResults->findScalarResultIndex(m_resultType(), m_resultVariable());
} }
return gridScalarResultIndex; return gridScalarResultIndex;
@ -889,7 +887,7 @@ void RimEclipseResultDefinition::loadResult()
{ {
if (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS || this->resultType() == RiaDefines::INJECTION_FLOODING) 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(); RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
if (gridCellResults) if (gridCellResults)
{ {
gridCellResults->findOrLoadScalarResult(m_resultType(), m_resultVariable); gridCellResults->findOrLoadScalarResult(m_resultType(), m_resultVariable);
@ -905,10 +903,10 @@ bool RimEclipseResultDefinition::hasStaticResult() const
{ {
if (this->resultType() == RiaDefines::FLOW_DIAGNOSTICS || this->resultType() == RiaDefines::INJECTION_FLOODING) return false; if (this->resultType() == RiaDefines::FLOW_DIAGNOSTICS || this->resultType() == RiaDefines::INJECTION_FLOODING) return false;
const RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults(); const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
size_t gridScalarResultIndex = this->scalarResultIndex(); size_t gridScalarResultIndex = this->scalarResultIndex();
if (hasResult() && gridCellResults->cellResults()->timeStepCount(gridScalarResultIndex) == 1 ) if (hasResult() && gridCellResults->timeStepCount(gridScalarResultIndex) == 1 )
{ {
return true; return true;
} }
@ -927,9 +925,9 @@ bool RimEclipseResultDefinition::hasResult() const
{ {
if (m_flowSolution() && !m_resultVariable().isEmpty()) return true; if (m_flowSolution() && !m_resultVariable().isEmpty()) return true;
} }
else if (this->currentGridCellResults() && this->currentGridCellResults()->cellResults()) else if (this->currentGridCellResults() )
{ {
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults()->cellResults(); const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
size_t gridScalarResultIndex = gridCellResults->findScalarResultIndex(m_resultType(), m_resultVariable()); size_t gridScalarResultIndex = gridCellResults->findScalarResultIndex(m_resultType(), m_resultVariable());
return gridScalarResultIndex != cvf::UNDEFINED_SIZE_T; return gridScalarResultIndex != cvf::UNDEFINED_SIZE_T;
} }
@ -962,9 +960,9 @@ bool RimEclipseResultDefinition::hasDynamicResult() const
return true; return true;
} }
if (this->currentGridCellResults() && this->currentGridCellResults()->cellResults()) if (this->currentGridCellResults())
{ {
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults()->cellResults(); const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
size_t gridScalarResultIndex = this->scalarResultIndex(); size_t gridScalarResultIndex = this->scalarResultIndex();
if (gridCellResults->timeStepCount(gridScalarResultIndex) > 1 ) if (gridCellResults->timeStepCount(gridScalarResultIndex) > 1 )
{ {

View File

@ -89,7 +89,7 @@ public:
bool isCompletionTypeSelected() const; bool isCompletionTypeSelected() const;
bool hasCategoryResult() const; bool hasCategoryResult() const;
RimReservoirCellResultsStorage* currentGridCellResults() const; RigCaseCellResultsData* currentGridCellResults() const;
void loadDataAndUpdate(); void loadDataAndUpdate();
void updateAnyFieldHasChanged(); void updateAnyFieldHasChanged();

View File

@ -218,15 +218,14 @@ void RimEclipseStatisticsCase::computeStatistics()
getSourceCases(sourceCases); getSourceCases(sourceCases);
if (sourceCases.size() == 0 if (sourceCases.size() == 0
|| !sourceCases.at(0)->resultsStorage(RiaDefines::MATRIX_MODEL) || !sourceCases.at(0)->results(RiaDefines::MATRIX_MODEL))
|| !sourceCases.at(0)->resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults())
{ {
return; return;
} }
// The first source has been read completely from disk, and contains grid and meta data // The first source has been read completely from disk, and contains grid and meta data
// Use this information for all cases in the case group // Use this information for all cases in the case group
size_t timeStepCount = sourceCases.at(0)->resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()->maxTimeStepCount(); size_t timeStepCount = sourceCases.at(0)->results(RiaDefines::MATRIX_MODEL)->maxTimeStepCount();
RimStatisticsConfig statisticsConfig; RimStatisticsConfig statisticsConfig;

View File

@ -44,7 +44,7 @@ void RimEclipseStatisticsCaseEvaluator::addNamedResult(RigCaseCellResultsData* d
// Use time step dates from first result in first source case // Use time step dates from first result in first source case
CVF_ASSERT(m_sourceCases.size() > 0); CVF_ASSERT(m_sourceCases.size() > 0);
std::vector<RigEclipseTimeStepInfo> sourceTimeStepInfos = m_sourceCases[0]->resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()->timeStepInfos(0); std::vector<RigEclipseTimeStepInfo> sourceTimeStepInfos = m_sourceCases[0]->results(RiaDefines::MATRIX_MODEL)->timeStepInfos(0);
size_t destinationScalarResultIndex = destinationCellResults->findOrCreateScalarResultIndex(resultType, resultName, true); size_t destinationScalarResultIndex = destinationCellResults->findOrCreateScalarResultIndex(resultType, resultName, true);
CVF_ASSERT(destinationScalarResultIndex != cvf::UNDEFINED_SIZE_T); CVF_ASSERT(destinationScalarResultIndex != cvf::UNDEFINED_SIZE_T);
@ -161,7 +161,7 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults(const QList<ResSpec>&
RimEclipseCase* sourceCase = m_sourceCases.at(caseIdx); RimEclipseCase* sourceCase = m_sourceCases.at(caseIdx);
// Trigger loading of dataset // Trigger loading of dataset
sourceCase->resultsStorage(poroModel)->findOrLoadScalarResultForTimeStep(resultType, resultName, dataAccessTimeStepIndex); sourceCase->results(poroModel)->findOrLoadScalarResultForTimeStep(resultType, resultName, dataAccessTimeStepIndex);
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromNameAndType(sourceCase->eclipseCaseData(), gridIdx, poroModel, dataAccessTimeStepIndex, resultName, resultType); cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromNameAndType(sourceCase->eclipseCaseData(), gridIdx, poroModel, dataAccessTimeStepIndex, resultName, resultType);
if (resultAccessor.notNull()) if (resultAccessor.notNull())
@ -301,8 +301,8 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults(const QList<ResSpec>&
if (!eclipseCase->reservoirViews.size()) if (!eclipseCase->reservoirViews.size())
{ {
eclipseCase->resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()->freeAllocatedResultsData(); eclipseCase->results(RiaDefines::MATRIX_MODEL)->freeAllocatedResultsData();
eclipseCase->resultsStorage(RiaDefines::FRACTURE_MODEL)->cellResults()->freeAllocatedResultsData(); eclipseCase->results(RiaDefines::FRACTURE_MODEL)->freeAllocatedResultsData();
} }
} }

View File

@ -179,11 +179,11 @@ RimEclipseView::~RimEclipseView()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::clampCurrentTimestep() void RimEclipseView::clampCurrentTimestep()
{ {
if (this->currentGridCellResults() && this->currentGridCellResults()->cellResults()) if (this->currentGridCellResults())
{ {
if (m_currentTimeStep() >= static_cast<int>(this->currentGridCellResults()->cellResults()->maxTimeStepCount())) if (m_currentTimeStep() >= static_cast<int>(this->currentGridCellResults()->maxTimeStepCount()))
{ {
m_currentTimeStep = static_cast<int>(this->currentGridCellResults()->cellResults()->maxTimeStepCount()) -1; m_currentTimeStep = static_cast<int>(this->currentGridCellResults()->maxTimeStepCount()) -1;
} }
} }
@ -289,7 +289,7 @@ void RimEclipseView::createDisplayModel()
CVF_ASSERT(currentGridCellResults()); CVF_ASSERT(currentGridCellResults());
size_t i; size_t i;
for (i = 0; i < currentGridCellResults()->cellResults()->maxTimeStepCount(); i++) for (i = 0; i < currentGridCellResults()->maxTimeStepCount(); i++)
{ {
timeStepIndices.push_back(i); timeStepIndices.push_back(i);
} }
@ -915,11 +915,11 @@ void RimEclipseView::updateDisplayModelVisibility()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Convenience for quick access to results /// Convenience for quick access to results
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimReservoirCellResultsStorage* RimEclipseView::currentGridCellResults() RigCaseCellResultsData* RimEclipseView::currentGridCellResults()
{ {
if (m_eclipseCase) if (m_eclipseCase)
{ {
return m_eclipseCase->resultsStorage(cellResult->porosityModel()); return m_eclipseCase->results(cellResult->porosityModel());
} }
return NULL; return NULL;
@ -1098,7 +1098,7 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R
size_t maxTimeStepCount = cellResultsData->maxTimeStepCount(); size_t maxTimeStepCount = cellResultsData->maxTimeStepCount();
if (resultColors->isTernarySaturationSelected() && maxTimeStepCount > 1) if (resultColors->isTernarySaturationSelected() && maxTimeStepCount > 1)
{ {
RimReservoirCellResultsStorage* gridCellResults = resultColors->currentGridCellResults(); RigCaseCellResultsData* gridCellResults = resultColors->currentGridCellResults();
{ {
size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL"); size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL");
if (scalarSetIndex != cvf::UNDEFINED_SIZE_T) if (scalarSetIndex != cvf::UNDEFINED_SIZE_T)

View File

@ -114,7 +114,7 @@ public:
const RimEclipsePropertyFilterCollection* eclipsePropertyFilterCollection() const; const RimEclipsePropertyFilterCollection* eclipsePropertyFilterCollection() const;
void setOverridePropertyFilterCollection(RimEclipsePropertyFilterCollection* pfc); void setOverridePropertyFilterCollection(RimEclipsePropertyFilterCollection* pfc);
RimReservoirCellResultsStorage* currentGridCellResults(); RigCaseCellResultsData* currentGridCellResults();
RigActiveCellInfo* currentActiveCellInfo(); RigActiveCellInfo* currentActiveCellInfo();
RimEclipseCellColors* currentFaultResultColors(); RimEclipseCellColors* currentFaultResultColors();

View File

@ -168,12 +168,15 @@ std::vector<double> RimGridTimeHistoryCurve::yValues() const
CVF_ASSERT(m_eclipseResultDefinition()); CVF_ASSERT(m_eclipseResultDefinition());
m_eclipseResultDefinition->loadResult(); m_eclipseResultDefinition->loadResult();
RimReservoirCellResultsStorage* cellResStorage = m_eclipseResultDefinition->currentGridCellResults(); RigCaseCellResultsData* cellResultsData = m_eclipseResultDefinition->currentGridCellResults();
RigCaseCellResultsData* cellResultsData = cellResStorage->cellResults();
std::vector<QDateTime> timeStepDates = cellResultsData->timeStepDates(); std::vector<QDateTime> timeStepDates = cellResultsData->timeStepDates();
values = RigTimeHistoryResultAccessor::timeHistoryValues(eclTopItem->eclipseCase()->eclipseCaseData(), m_eclipseResultDefinition(), gridIndex, cellIndex, timeStepDates.size()); values = RigTimeHistoryResultAccessor::timeHistoryValues(eclTopItem->eclipseCase()->eclipseCaseData(),
m_eclipseResultDefinition(),
gridIndex,
cellIndex,
timeStepDates.size());
} }
if (geoMechGeomSelectionItem() && geoMechGeomSelectionItem()->geoMechCase()) if (geoMechGeomSelectionItem() && geoMechGeomSelectionItem()->geoMechCase())
@ -366,8 +369,7 @@ std::vector<time_t> RimGridTimeHistoryCurve::timeStepValues() const
RimEclipseGeometrySelectionItem* eclTopItem = eclipseGeomSelectionItem(); RimEclipseGeometrySelectionItem* eclTopItem = eclipseGeomSelectionItem();
if (eclTopItem && eclTopItem->eclipseCase()) if (eclTopItem && eclTopItem->eclipseCase())
{ {
RimReservoirCellResultsStorage* cellResStorage = m_eclipseResultDefinition->currentGridCellResults(); RigCaseCellResultsData* cellResultsData = m_eclipseResultDefinition->currentGridCellResults();
RigCaseCellResultsData* cellResultsData = cellResStorage->cellResults();
std::vector<QDateTime> timeStepDates = cellResultsData->timeStepDates(); std::vector<QDateTime> timeStepDates = cellResultsData->timeStepDates();
@ -415,8 +417,7 @@ std::vector<double> RimGridTimeHistoryCurve::daysSinceSimulationStart() const
RimEclipseGeometrySelectionItem* eclTopItem = eclipseGeomSelectionItem(); RimEclipseGeometrySelectionItem* eclTopItem = eclipseGeomSelectionItem();
if (eclTopItem && eclTopItem->eclipseCase()) if (eclTopItem && eclTopItem->eclipseCase())
{ {
RimReservoirCellResultsStorage* cellResStorage = m_eclipseResultDefinition->currentGridCellResults(); RigCaseCellResultsData* cellResultsData = m_eclipseResultDefinition->currentGridCellResults();
RigCaseCellResultsData* cellResultsData = cellResStorage->cellResults();
daysSinceSimulationStart = cellResultsData->daysSinceSimulationStart(); daysSinceSimulationStart = cellResultsData->daysSinceSimulationStart();
} }

View File

@ -185,7 +185,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
CVF_ASSERT(rigCaseData); CVF_ASSERT(rigCaseData);
RiaDefines::PorosityModelType poroModel = RiaDefines::MATRIX_MODEL; RiaDefines::PorosityModelType poroModel = RiaDefines::MATRIX_MODEL;
mainCase->resultsStorage(poroModel)->cellResults()->createPlaceholderResultEntries(); mainCase->results(poroModel)->createPlaceholderResultEntries();
// Action A : Read active cell info // Action A : Read active cell info
@ -247,7 +247,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
RimEclipseResultCase* rimReservoir = dynamic_cast<RimEclipseResultCase*>(caseCollection()->reservoirs[i]); RimEclipseResultCase* rimReservoir = dynamic_cast<RimEclipseResultCase*>(caseCollection()->reservoirs[i]);
if (!rimReservoir) continue; // Input reservoir if (!rimReservoir) continue; // Input reservoir
RimReservoirCellResultsStorage* cellResultsStorage = rimReservoir->resultsStorage(poroModel); RigCaseCellResultsData* cellResultsStorage = rimReservoir->results(poroModel);
for (size_t resIdx = 0; resIdx < resultInfos.size(); resIdx++) for (size_t resIdx = 0; resIdx < resultInfos.size(); resIdx++)
{ {
@ -256,21 +256,21 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
bool needsToBeStored = resultInfos[resIdx].m_needsToBeStored; bool needsToBeStored = resultInfos[resIdx].m_needsToBeStored;
bool mustBeCalculated = resultInfos[resIdx].m_mustBeCalculated; bool mustBeCalculated = resultInfos[resIdx].m_mustBeCalculated;
size_t scalarResultIndex = cellResultsStorage->cellResults()->findScalarResultIndex(resultType, resultName); size_t scalarResultIndex = cellResultsStorage->findScalarResultIndex(resultType, resultName);
if (scalarResultIndex == cvf::UNDEFINED_SIZE_T) if (scalarResultIndex == cvf::UNDEFINED_SIZE_T)
{ {
size_t scalarResultIndex = cellResultsStorage->cellResults()->findOrCreateScalarResultIndex(resultType, resultName, needsToBeStored); size_t scalarResultIndex = cellResultsStorage->findOrCreateScalarResultIndex(resultType, resultName, needsToBeStored);
if (mustBeCalculated) cellResultsStorage->cellResults()->setMustBeCalculated(scalarResultIndex); if (mustBeCalculated) cellResultsStorage->setMustBeCalculated(scalarResultIndex);
cellResultsStorage->cellResults()->setTimeStepInfos(scalarResultIndex, timeStepInfos); cellResultsStorage->setTimeStepInfos(scalarResultIndex, timeStepInfos);
std::vector< std::vector<double> >& dataValues = cellResultsStorage->cellResults()->cellScalarResults(scalarResultIndex); std::vector< std::vector<double> >& dataValues = cellResultsStorage->cellScalarResults(scalarResultIndex);
dataValues.resize(timeStepInfos.size()); dataValues.resize(timeStepInfos.size());
} }
} }
cellResultsStorage->cellResults()->createPlaceholderResultEntries(); cellResultsStorage->createPlaceholderResultEntries();
} }
} }
@ -422,13 +422,13 @@ void RimIdenticalGridCaseGroup::clearStatisticsResults()
RimEclipseCase* rimStaticsCase = statisticsCaseCollection->reservoirs[i]; RimEclipseCase* rimStaticsCase = statisticsCaseCollection->reservoirs[i];
if (!rimStaticsCase) continue; if (!rimStaticsCase) continue;
if (rimStaticsCase->resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()) if (rimStaticsCase->results(RiaDefines::MATRIX_MODEL))
{ {
rimStaticsCase->resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()->clearAllResults(); rimStaticsCase->results(RiaDefines::MATRIX_MODEL)->clearAllResults();
} }
if (rimStaticsCase->resultsStorage(RiaDefines::FRACTURE_MODEL)->cellResults()) if (rimStaticsCase->results(RiaDefines::FRACTURE_MODEL))
{ {
rimStaticsCase->resultsStorage(RiaDefines::FRACTURE_MODEL)->cellResults()->clearAllResults(); rimStaticsCase->results(RiaDefines::FRACTURE_MODEL)->clearAllResults();
} }
for (size_t j = 0; j < rimStaticsCase->reservoirViews.size(); j++) for (size_t j = 0; j < rimStaticsCase->reservoirViews.size(); j++)

View File

@ -123,7 +123,7 @@ QList<caf::PdmOptionItemInfo> RimMultiSnapshotDefinition::calculateValueOptions(
if (rimEclipseView) if (rimEclipseView)
{ {
QStringList varList; QStringList varList;
varList = rimEclipseView->currentGridCellResults()->cellResults()->resultNames(eclipseResultType()); varList = rimEclipseView->currentGridCellResults()->resultNames(eclipseResultType());
options = toOptionList(varList); options = toOptionList(varList);
} }

View File

@ -211,32 +211,6 @@ QString RimReservoirCellResultsStorage::getCacheDirectoryPath()
return cacheDirPath; return cacheDirPath;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RimReservoirCellResultsStorage::findOrLoadScalarResult(const QString& resultName)
{
if (!m_cellResults) return cvf::UNDEFINED_SIZE_T;
return m_cellResults->findOrLoadScalarResult(resultName);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RimReservoirCellResultsStorage::findOrLoadScalarResult(RiaDefines::ResultCatType type, const QString& resultName)
{
if (!m_cellResults) return cvf::UNDEFINED_SIZE_T;
return m_cellResults->findOrLoadScalarResult(type, resultName);
}
size_t RimReservoirCellResultsStorage::findOrLoadScalarResultForTimeStep(RiaDefines::ResultCatType type, const QString& resultName, size_t timeStepIndex)
{
if (!m_cellResults) return cvf::UNDEFINED_SIZE_T;
return m_cellResults->findOrLoadScalarResultForTimeStep(type, resultName, timeStepIndex);
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///

View File

@ -46,15 +46,9 @@ public:
virtual ~RimReservoirCellResultsStorage(); virtual ~RimReservoirCellResultsStorage();
void setCellResults(RigCaseCellResultsData* cellResults); void setCellResults(RigCaseCellResultsData* cellResults);
RigCaseCellResultsData* cellResults() { return m_cellResults; }
const RigCaseCellResultsData* cellResults() const { return m_cellResults; }
size_t storedResultsCount(); size_t storedResultsCount();
size_t findOrLoadScalarResultForTimeStep(RiaDefines::ResultCatType type, const QString& resultName, size_t timeStepIndex);
size_t findOrLoadScalarResult(RiaDefines::ResultCatType type, const QString& resultName);
size_t findOrLoadScalarResult(const QString& resultName); ///< Simplified search. Assumes unique names across types.
protected: protected:
// Overridden methods from PdmObject // Overridden methods from PdmObject
virtual void setupBeforeSave(); virtual void setupBeforeSave();

View File

@ -230,9 +230,9 @@ void RimTimeStepFilter::updateSelectedTimeStepIndices()
std::vector<QDateTime> RimTimeStepFilter::allTimeSteps() const std::vector<QDateTime> RimTimeStepFilter::allTimeSteps() const
{ {
RimEclipseResultCase* rimEclipseResultCase = parentEclipseResultCase(); RimEclipseResultCase* rimEclipseResultCase = parentEclipseResultCase();
if (rimEclipseResultCase && rimEclipseResultCase->resultsStorage(RiaDefines::MATRIX_MODEL)) if (rimEclipseResultCase && rimEclipseResultCase->results(RiaDefines::MATRIX_MODEL))
{ {
return rimEclipseResultCase->resultsStorage(RiaDefines::MATRIX_MODEL)->cellResults()->allTimeStepDatesFromEclipseReader(); return rimEclipseResultCase->results(RiaDefines::MATRIX_MODEL)->allTimeStepDatesFromEclipseReader();
} }
return m_timeStepsFromFile; return m_timeStepsFromFile;

View File

@ -19,6 +19,7 @@
#include "RigEclipseToStimPlanCellTransmissibilityCalculator.h" #include "RigEclipseToStimPlanCellTransmissibilityCalculator.h"
#include "RigActiveCellInfo.h" #include "RigActiveCellInfo.h"
#include "RigCaseCellResultsData.h"
#include "RigCellGeometryTools.h" #include "RigCellGeometryTools.h"
#include "RigEclipseCaseData.h" #include "RigEclipseCaseData.h"
#include "RigFractureCell.h" #include "RigFractureCell.h"
@ -28,7 +29,6 @@
#include "RigHexIntersectionTools.h" #include "RigHexIntersectionTools.h"
#include "RimEclipseCase.h" #include "RimEclipseCase.h"
#include "RimReservoirCellResultsStorage.h"
#include "cvfGeometryTools.h" #include "cvfGeometryTools.h"
@ -235,7 +235,7 @@ cvf::ref<RigResultAccessor> RigEclipseToStimPlanCellTransmissibilityCalculator::
{ {
CVF_ASSERT(eclipseCase); CVF_ASSERT(eclipseCase);
RimReservoirCellResultsStorage* gridCellResults = eclipseCase->resultsStorage(porosityModel); RigCaseCellResultsData* gridCellResults = eclipseCase->results(porosityModel);
// Calling this function will force loading of result from file // Calling this function will force loading of result from file
gridCellResults->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, uiResultName); gridCellResults->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, uiResultName);

View File

@ -38,7 +38,7 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
const std::vector<double>* getResultIndexableStaticResult(RigActiveCellInfo* actCellInfo, const std::vector<double>* getResultIndexableStaticResult(RigActiveCellInfo* actCellInfo,
RimReservoirCellResultsStorage* gridCellResults, RigCaseCellResultsData* gridCellResults,
QString porvResultName, QString porvResultName,
std::vector<double> &activeCellsResultsTempContainer) std::vector<double> &activeCellsResultsTempContainer)
{ {
@ -49,9 +49,9 @@ const std::vector<double>* getResultIndexableStaticResult(RigActiveCellInfo* act
if (scalarResultIndexPorv == cvf::UNDEFINED_SIZE_T) return nullptr; if (scalarResultIndexPorv == cvf::UNDEFINED_SIZE_T) return nullptr;
const std::vector<double>* porvResults = &(gridCellResults->cellResults()->cellScalarResults(scalarResultIndexPorv, 0)); const std::vector<double>* porvResults = &(gridCellResults->cellScalarResults(scalarResultIndexPorv, 0));
if ( !gridCellResults->cellResults()->isUsingGlobalActiveIndex(scalarResultIndexPorv) ) if ( !gridCellResults->isUsingGlobalActiveIndex(scalarResultIndexPorv) )
{ {
// PORV is given for all cells // PORV is given for all cells
@ -79,7 +79,7 @@ RigNumberOfFloodedPoreVolumesCalculator::RigNumberOfFloodedPoreVolumesCalculator
RigMainGrid* mainGrid = caseToApply->eclipseCaseData()->mainGrid(); RigMainGrid* mainGrid = caseToApply->eclipseCaseData()->mainGrid();
RigEclipseCaseData* eclipseCaseData = caseToApply->eclipseCaseData(); RigEclipseCaseData* eclipseCaseData = caseToApply->eclipseCaseData();
RimReservoirCellResultsStorage* gridCellResults = caseToApply->resultsStorage(RiaDefines::MATRIX_MODEL); RigCaseCellResultsData* gridCellResults = caseToApply->results(RiaDefines::MATRIX_MODEL);
RigActiveCellInfo* actCellInfo = caseToApply->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL); RigActiveCellInfo* actCellInfo = caseToApply->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL);
size_t resultCellCount = actCellInfo->reservoirCellResultCount(); size_t resultCellCount = actCellInfo->reservoirCellResultCount();

View File

@ -46,7 +46,7 @@ RigTofAccumulatedPhaseFractionsCalculator::RigTofAccumulatedPhaseFractionsCalcul
{ {
RigEclipseCaseData* eclipseCaseData = caseToApply->eclipseCaseData(); RigEclipseCaseData* eclipseCaseData = caseToApply->eclipseCaseData();
RiaDefines::PorosityModelType porosityModel = RiaDefines::MATRIX_MODEL; RiaDefines::PorosityModelType porosityModel = RiaDefines::MATRIX_MODEL;
RimReservoirCellResultsStorage* gridCellResults = caseToApply->resultsStorage(porosityModel); RigCaseCellResultsData* gridCellResults = caseToApply->results(porosityModel);
size_t scalarResultIndexSwat = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SWAT"); size_t scalarResultIndexSwat = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SWAT");
size_t scalarResultIndexSoil = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL"); size_t scalarResultIndexSoil = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL");

View File

@ -341,15 +341,15 @@ public:
nncData->makeGeneratedConnectionScalarResult(propertyName, m_timeStepCountToRead); nncData->makeGeneratedConnectionScalarResult(propertyName, m_timeStepCountToRead);
} }
if (rimCase && rimCase->resultsStorage(m_porosityModelEnum)) if (rimCase && rimCase->results(m_porosityModelEnum))
{ {
bool ok = createIJKCellResults(rimCase->resultsStorage(m_porosityModelEnum), propertyName); bool ok = createIJKCellResults(rimCase->results(m_porosityModelEnum), propertyName);
if (!ok) if (!ok)
{ {
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + RiaSocketServer::tr("Could not find the property named: \"%2\"").arg(propertyName)); server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + RiaSocketServer::tr("Could not find the property named: \"%2\"").arg(propertyName));
return true; return true;
} }
size_t scalarResultIndex = rimCase->resultsStorage(m_porosityModelEnum)->findOrLoadScalarResult(QString("%1IJK").arg(propertyName)); size_t scalarResultIndex = rimCase->results(m_porosityModelEnum)->findOrLoadScalarResult(QString("%1IJK").arg(propertyName));
nncData->setScalarResultIndex(propertyName, scalarResultIndex); nncData->setScalarResultIndex(propertyName, scalarResultIndex);
} }
@ -408,7 +408,7 @@ public:
return false; return false;
} }
static bool createIJKCellResults(RimReservoirCellResultsStorage* results, QString propertyName) static bool createIJKCellResults(RigCaseCellResultsData* results, QString propertyName)
{ {
bool ok; bool ok;
ok = scalarResultExistsOrCreate(results, QString("%1IJK").arg(propertyName)); ok = scalarResultExistsOrCreate(results, QString("%1IJK").arg(propertyName));
@ -422,19 +422,19 @@ public:
return ok; return ok;
} }
static bool scalarResultExistsOrCreate(RimReservoirCellResultsStorage* results, QString propertyName) static bool scalarResultExistsOrCreate(RigCaseCellResultsData* results, QString propertyName)
{ {
size_t scalarResultIndex = results->findOrLoadScalarResult(propertyName); size_t scalarResultIndex = results->findOrLoadScalarResult(propertyName);
if (scalarResultIndex == cvf::UNDEFINED_SIZE_T) if (scalarResultIndex == cvf::UNDEFINED_SIZE_T)
{ {
scalarResultIndex = results->cellResults()->findOrCreateScalarResultIndex(RiaDefines::GENERATED, propertyName, true); scalarResultIndex = results->findOrCreateScalarResultIndex(RiaDefines::GENERATED, propertyName, true);
} }
if (scalarResultIndex != cvf::UNDEFINED_SIZE_T) if (scalarResultIndex != cvf::UNDEFINED_SIZE_T)
{ {
std::vector< std::vector<double> >* scalarResultFrames = nullptr; std::vector< std::vector<double> >* scalarResultFrames = nullptr;
scalarResultFrames = &(results->cellResults()->cellScalarResults(scalarResultIndex)); scalarResultFrames = &(results->cellScalarResults(scalarResultIndex));
size_t timeStepCount = results->cellResults()->maxTimeStepCount(); size_t timeStepCount = results->maxTimeStepCount();
scalarResultFrames->resize(timeStepCount); scalarResultFrames->resize(timeStepCount);
return true; return true;
} }

View File

@ -75,20 +75,21 @@ public:
size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T; size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T;
std::vector< std::vector<double> >* scalarResultFrames = NULL; std::vector< std::vector<double> >* scalarResultFrames = NULL;
if (rimCase && rimCase->resultsStorage(porosityModelEnum)) if (rimCase && rimCase->results(porosityModelEnum))
{ {
scalarResultIndex = rimCase->resultsStorage(porosityModelEnum)->findOrLoadScalarResult(propertyName); scalarResultIndex = rimCase->results(porosityModelEnum)->findOrLoadScalarResult(propertyName);
if (scalarResultIndex != cvf::UNDEFINED_SIZE_T) if (scalarResultIndex != cvf::UNDEFINED_SIZE_T)
{ {
scalarResultFrames = &(rimCase->resultsStorage(porosityModelEnum)->cellResults()->cellScalarResults(scalarResultIndex)); scalarResultFrames = &(rimCase->results(porosityModelEnum)->cellScalarResults(scalarResultIndex));
} }
} }
if (scalarResultFrames == NULL) if (scalarResultFrames == NULL)
{ {
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + RiaSocketServer::tr("Could not find the %1 model property named: \"%2\"").arg(porosityModelName).arg(propertyName)); server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n")
+ RiaSocketServer::tr("Could not find the %1 model property named: \"%2\"").arg(porosityModelName).arg(propertyName));
} }
// Write data back : timeStepCount, bytesPrTimestep, dataForTimestep0 ... dataForTimestepN // Write data back : timeStepCount, bytesPrTimestep, dataForTimestep0 ... dataForTimestepN
@ -253,9 +254,9 @@ public:
else else
{ {
// Find the requested data // Find the requested data
if (rimCase && rimCase->resultsStorage(porosityModelEnum)) if (rimCase && rimCase->results(porosityModelEnum))
{ {
scalarResultIndex = rimCase->resultsStorage(porosityModelEnum)->findOrLoadScalarResult(propertyName); scalarResultIndex = rimCase->results(porosityModelEnum)->findOrLoadScalarResult(propertyName);
} }
} }
@ -276,7 +277,7 @@ public:
if (args.size() <= 5) if (args.size() <= 5)
{ {
// Select all // Select all
for (size_t tsIdx = 0; tsIdx < rimCase->resultsStorage(porosityModelEnum)->cellResults()->timeStepCount(scalarResultIndex); ++tsIdx) for (size_t tsIdx = 0; tsIdx < rimCase->results(porosityModelEnum)->timeStepCount(scalarResultIndex); ++tsIdx)
{ {
requestedTimesteps.push_back(tsIdx); requestedTimesteps.push_back(tsIdx);
} }
@ -409,24 +410,24 @@ public:
size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T; size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T;
std::vector< std::vector<double> >* scalarResultFrames = NULL; std::vector< std::vector<double> >* scalarResultFrames = NULL;
if (rimCase && rimCase->resultsStorage(m_porosityModelEnum)) if (rimCase && rimCase->results(m_porosityModelEnum))
{ {
scalarResultIndex = rimCase->resultsStorage(m_porosityModelEnum)->findOrLoadScalarResult(RiaDefines::GENERATED, propertyName); scalarResultIndex = rimCase->results(m_porosityModelEnum)->findOrLoadScalarResult(RiaDefines::GENERATED, propertyName);
if (scalarResultIndex == cvf::UNDEFINED_SIZE_T) if (scalarResultIndex == cvf::UNDEFINED_SIZE_T)
{ {
scalarResultIndex = rimCase->resultsStorage(m_porosityModelEnum)->cellResults()->findOrCreateScalarResultIndex(RiaDefines::GENERATED, propertyName, true); scalarResultIndex = rimCase->results(m_porosityModelEnum)->findOrCreateScalarResultIndex(RiaDefines::GENERATED, propertyName, true);
size_t scalarResWithMostTimeSteps = cvf::UNDEFINED_SIZE_T; size_t scalarResWithMostTimeSteps = cvf::UNDEFINED_SIZE_T;
rimCase->resultsStorage(m_porosityModelEnum)->cellResults()->maxTimeStepCount(&scalarResWithMostTimeSteps); rimCase->results(m_porosityModelEnum)->maxTimeStepCount(&scalarResWithMostTimeSteps);
const std::vector<RigEclipseTimeStepInfo> timeStepInfos = rimCase->resultsStorage(m_porosityModelEnum)->cellResults()->timeStepInfos(scalarResWithMostTimeSteps); const std::vector<RigEclipseTimeStepInfo> timeStepInfos = rimCase->results(m_porosityModelEnum)->timeStepInfos(scalarResWithMostTimeSteps);
rimCase->resultsStorage(m_porosityModelEnum)->cellResults()->setTimeStepInfos(scalarResultIndex, timeStepInfos); rimCase->results(m_porosityModelEnum)->setTimeStepInfos(scalarResultIndex, timeStepInfos);
} }
if (scalarResultIndex != cvf::UNDEFINED_SIZE_T) if (scalarResultIndex != cvf::UNDEFINED_SIZE_T)
{ {
scalarResultFrames = &(rimCase->resultsStorage(m_porosityModelEnum)->cellResults()->cellScalarResults(scalarResultIndex)); scalarResultFrames = &(rimCase->results(m_porosityModelEnum)->cellScalarResults(scalarResultIndex));
size_t timeStepCount = rimCase->resultsStorage(m_porosityModelEnum)->cellResults()->maxTimeStepCount(); size_t timeStepCount = rimCase->results(m_porosityModelEnum)->maxTimeStepCount();
scalarResultFrames->resize(timeStepCount); scalarResultFrames->resize(timeStepCount);
m_currentScalarIndex = scalarResultIndex; m_currentScalarIndex = scalarResultIndex;
@ -660,7 +661,7 @@ public:
if (m_requestedTimesteps.size() == 1 && m_currentScalarIndex != cvf::UNDEFINED_SIZE_T) if (m_requestedTimesteps.size() == 1 && m_currentScalarIndex != cvf::UNDEFINED_SIZE_T)
{ {
std::vector< std::vector<double> >* scalarResultFrames = NULL; std::vector< std::vector<double> >* scalarResultFrames = NULL;
scalarResultFrames = &(m_currentReservoir->resultsStorage(m_porosityModelEnum)->cellResults()->cellScalarResults(m_currentScalarIndex)); scalarResultFrames = &(m_currentReservoir->results(m_porosityModelEnum)->cellScalarResults(m_currentScalarIndex));
size_t lastIndexWithDataPresent = cvf::UNDEFINED_SIZE_T; size_t lastIndexWithDataPresent = cvf::UNDEFINED_SIZE_T;
for (size_t i = 0; i < scalarResultFrames->size(); i++) for (size_t i = 0; i < scalarResultFrames->size(); i++)
{ {
@ -802,19 +803,19 @@ public:
size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T; size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T;
std::vector< std::vector<double> >* scalarResultFrames = NULL; std::vector< std::vector<double> >* scalarResultFrames = NULL;
if (rimCase && rimCase->resultsStorage(m_porosityModelEnum)) if (rimCase && rimCase->results(m_porosityModelEnum))
{ {
scalarResultIndex = rimCase->resultsStorage(m_porosityModelEnum)->findOrLoadScalarResult(RiaDefines::GENERATED, propertyName); scalarResultIndex = rimCase->results(m_porosityModelEnum)->findOrLoadScalarResult(RiaDefines::GENERATED, propertyName);
if (scalarResultIndex == cvf::UNDEFINED_SIZE_T) if (scalarResultIndex == cvf::UNDEFINED_SIZE_T)
{ {
scalarResultIndex = rimCase->resultsStorage(m_porosityModelEnum)->cellResults()->findOrCreateScalarResultIndex(RiaDefines::GENERATED, propertyName, true); scalarResultIndex = rimCase->results(m_porosityModelEnum)->findOrCreateScalarResultIndex(RiaDefines::GENERATED, propertyName, true);
} }
if (scalarResultIndex != cvf::UNDEFINED_SIZE_T) if (scalarResultIndex != cvf::UNDEFINED_SIZE_T)
{ {
scalarResultFrames = &(rimCase->resultsStorage(m_porosityModelEnum)->cellResults()->cellScalarResults(scalarResultIndex)); scalarResultFrames = &(rimCase->results(m_porosityModelEnum)->cellScalarResults(scalarResultIndex));
size_t timeStepCount = rimCase->resultsStorage(m_porosityModelEnum)->cellResults()->maxTimeStepCount(); size_t timeStepCount = rimCase->results(m_porosityModelEnum)->maxTimeStepCount();
scalarResultFrames->resize(timeStepCount); scalarResultFrames->resize(timeStepCount);
m_currentScalarIndex = scalarResultIndex; m_currentScalarIndex = scalarResultIndex;
@ -1023,7 +1024,7 @@ public:
if (m_requestedTimesteps.size() == 1 && m_currentScalarIndex != cvf::UNDEFINED_SIZE_T) if (m_requestedTimesteps.size() == 1 && m_currentScalarIndex != cvf::UNDEFINED_SIZE_T)
{ {
std::vector< std::vector<double> >* scalarResultFrames = NULL; std::vector< std::vector<double> >* scalarResultFrames = NULL;
scalarResultFrames = &(m_currentReservoir->resultsStorage(m_porosityModelEnum)->cellResults()->cellScalarResults(m_currentScalarIndex)); scalarResultFrames = &(m_currentReservoir->results(m_porosityModelEnum)->cellScalarResults(m_currentScalarIndex));
size_t lastIndexWithDataPresent = cvf::UNDEFINED_SIZE_T; size_t lastIndexWithDataPresent = cvf::UNDEFINED_SIZE_T;
for (size_t i = 0; i < scalarResultFrames->size(); i++) for (size_t i = 0; i < scalarResultFrames->size(); i++)
{ {
@ -1194,16 +1195,16 @@ public:
} }
size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T; size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T;
if (rimCase && rimCase->resultsStorage(porosityModel)) if (rimCase && rimCase->results(porosityModel))
{ {
scalarResultIndex = rimCase->resultsStorage(porosityModel)->findOrLoadScalarResult(propertyName); scalarResultIndex = rimCase->results(porosityModel)->findOrLoadScalarResult(propertyName);
} }
std::vector<size_t> requestedTimesteps; std::vector<size_t> requestedTimesteps;
if (args.size() < 5) if (args.size() < 5)
{ {
// Select all // Select all
for (size_t tsIdx = 0; tsIdx < rimCase->resultsStorage(porosityModel)->cellResults()->timeStepCount(scalarResultIndex); ++tsIdx) for (size_t tsIdx = 0; tsIdx < rimCase->results(porosityModel)->timeStepCount(scalarResultIndex); ++tsIdx)
{ {
requestedTimesteps.push_back(tsIdx); requestedTimesteps.push_back(tsIdx);
} }
@ -1256,7 +1257,7 @@ public:
for (size_t timeStep : requestedTimesteps) for (size_t timeStep : requestedTimesteps)
{ {
const std::vector<double>& scalarResults = rimCase->resultsStorage(porosityModel)->cellResults()->cellScalarResults(scalarResultIndex, timeStep); const std::vector<double>& scalarResults = rimCase->results(porosityModel)->cellScalarResults(scalarResultIndex, timeStep);
for (const std::pair<size_t, size_t> selectedCell : selectedCells) for (const std::pair<size_t, size_t> selectedCell : selectedCells)

View File

@ -386,7 +386,7 @@ void RiuResultTextBuilder::appendTextFromResultColors(RigEclipseCaseData* eclips
RiaDefines::PorosityModelType porosityModel = resultColors->porosityModel(); RiaDefines::PorosityModelType porosityModel = resultColors->porosityModel();
if (resultColors->isTernarySaturationSelected()) if (resultColors->isTernarySaturationSelected())
{ {
RimReservoirCellResultsStorage* gridCellResults = resultColors->currentGridCellResults(); RigCaseCellResultsData* gridCellResults = resultColors->currentGridCellResults();
if (gridCellResults) if (gridCellResults)
{ {
size_t soilScalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL"); size_t soilScalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL");
@ -666,7 +666,7 @@ QString RiuResultTextBuilder::cellResultText(RimEclipseCellColors* resultColors)
if (resultColors->isTernarySaturationSelected()) if (resultColors->isTernarySaturationSelected())
{ {
RimReservoirCellResultsStorage* gridCellResults = m_reservoirView->cellResult()->currentGridCellResults(); RigCaseCellResultsData* gridCellResults = m_reservoirView->cellResult()->currentGridCellResults();
if (gridCellResults) if (gridCellResults)
{ {
size_t soilScalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL"); size_t soilScalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL");