#3958 Refactoring: RigCaseCellResultsData: Remove the final result index based interface

This commit is contained in:
Jacob Støren
2019-01-28 16:18:28 +01:00
parent a185929826
commit dbb2a564a2
32 changed files with 271 additions and 251 deletions

View File

@@ -153,10 +153,10 @@ bool RiuPvtPlotUpdater::queryDataAndUpdatePlot(const RimEclipseView& eclipseView
// The following calls will read results from file in preparation for the queries below
RigCaseCellResultsData* cellResultsData = eclipseCaseData->results(RiaDefines::MATRIX_MODEL);
cellResultsData->findOrLoadKnownScalarResult(RiaDefines::DYNAMIC_NATIVE, "RS");
cellResultsData->findOrLoadKnownScalarResult(RiaDefines::DYNAMIC_NATIVE, "RV");
cellResultsData->findOrLoadKnownScalarResult(RiaDefines::DYNAMIC_NATIVE, "PRESSURE");
cellResultsData->findOrLoadKnownScalarResult(RiaDefines::STATIC_NATIVE, "PVTNUM");
cellResultsData->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "RS"));
cellResultsData->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "RV"));
cellResultsData->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "PRESSURE"));
cellResultsData->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::STATIC_NATIVE, "PVTNUM"));
cvf::ref<RigResultAccessor> rsAccessor = RigResultAccessorFactory::createFromNameAndType(eclipseCaseData, gridIndex, RiaDefines::MATRIX_MODEL, timeStepIndex, "RS", RiaDefines::DYNAMIC_NATIVE);
cvf::ref<RigResultAccessor> rvAccessor = RigResultAccessorFactory::createFromNameAndType(eclipseCaseData, gridIndex, RiaDefines::MATRIX_MODEL, timeStepIndex, "RV", RiaDefines::DYNAMIC_NATIVE);

View File

@@ -150,9 +150,9 @@ bool RiuRelativePermeabilityPlotUpdater::queryDataAndUpdatePlot(const RimEclipse
// Make sure we load the results that we'll query below
RigCaseCellResultsData* cellResultsData = eclipseCaseData->results(RiaDefines::MATRIX_MODEL);
cellResultsData->findOrLoadKnownScalarResult(RiaDefines::DYNAMIC_NATIVE, "SWAT");
cellResultsData->findOrLoadKnownScalarResult(RiaDefines::DYNAMIC_NATIVE, "SGAS");
cellResultsData->findOrLoadKnownScalarResult(RiaDefines::STATIC_NATIVE, "SATNUM");
cellResultsData->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SWAT"));
cellResultsData->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SGAS"));
cellResultsData->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::STATIC_NATIVE, "SATNUM"));
// Fetch SWAT and SGAS cell values for the selected cell
const size_t timeStepIndex = static_cast<size_t>(eclipseView.currentTimeStep());

View File

@@ -470,13 +470,13 @@ void RiuResultTextBuilder::appendTextFromResultColors(RigEclipseCaseData* eclips
RigCaseCellResultsData* gridCellResults = resultColors->currentGridCellResults();
if (gridCellResults)
{
gridCellResults->findOrLoadKnownScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL");
gridCellResults->findOrLoadKnownScalarResult(RiaDefines::DYNAMIC_NATIVE, "SGAS");
gridCellResults->findOrLoadKnownScalarResult(RiaDefines::DYNAMIC_NATIVE, "SWAT");
gridCellResults->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SOIL"));
gridCellResults->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SGAS"));
gridCellResults->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SWAT"));
cvf::ref<RigResultAccessor> dataAccessObjectX = RigResultAccessorFactory::createFromResultIdx(eclipseCase, gridIndex, porosityModel, timeStepIndex, RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SOIL"));
cvf::ref<RigResultAccessor> dataAccessObjectY = RigResultAccessorFactory::createFromResultIdx(eclipseCase, gridIndex, porosityModel, timeStepIndex, RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SGAS"));
cvf::ref<RigResultAccessor> dataAccessObjectZ = RigResultAccessorFactory::createFromResultIdx(eclipseCase, gridIndex, porosityModel, timeStepIndex, RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SWAT"));
cvf::ref<RigResultAccessor> dataAccessObjectX = RigResultAccessorFactory::createFromResultAddress(eclipseCase, gridIndex, porosityModel, timeStepIndex, RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SOIL"));
cvf::ref<RigResultAccessor> dataAccessObjectY = RigResultAccessorFactory::createFromResultAddress(eclipseCase, gridIndex, porosityModel, timeStepIndex, RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SGAS"));
cvf::ref<RigResultAccessor> dataAccessObjectZ = RigResultAccessorFactory::createFromResultAddress(eclipseCase, gridIndex, porosityModel, timeStepIndex, RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SWAT"));
double scalarValue = 0.0;
@@ -628,7 +628,7 @@ QString RiuResultTextBuilder::cellEdgeResultDetails()
}
RiaDefines::PorosityModelType porosityModel = m_reservoirView->cellResult()->porosityModel();
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromResultIdx(m_reservoirView->eclipseCase()->eclipseCaseData(),
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromResultAddress(m_reservoirView->eclipseCase()->eclipseCaseData(),
m_gridIndex,
porosityModel,
adjustedTimeStep,
@@ -753,15 +753,15 @@ QString RiuResultTextBuilder::cellResultText(RimEclipseCellColors* resultColors)
RigCaseCellResultsData* gridCellResults = m_reservoirView->cellResult()->currentGridCellResults();
if (gridCellResults)
{
gridCellResults->findOrLoadKnownScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL");
gridCellResults->findOrLoadKnownScalarResult(RiaDefines::DYNAMIC_NATIVE, "SGAS");
gridCellResults->findOrLoadKnownScalarResult(RiaDefines::DYNAMIC_NATIVE, "SWAT");
gridCellResults->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SOIL"));
gridCellResults->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SGAS"));
gridCellResults->ensureKnownResultLoaded(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SWAT"));
RiaDefines::PorosityModelType porosityModel = resultColors->porosityModel();
cvf::ref<RigResultAccessor> dataAccessObjectX = RigResultAccessorFactory::createFromResultIdx(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SOIL"));
cvf::ref<RigResultAccessor> dataAccessObjectY = RigResultAccessorFactory::createFromResultIdx(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SGAS"));
cvf::ref<RigResultAccessor> dataAccessObjectZ = RigResultAccessorFactory::createFromResultIdx(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SWAT"));
cvf::ref<RigResultAccessor> dataAccessObjectX = RigResultAccessorFactory::createFromResultAddress(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SOIL"));
cvf::ref<RigResultAccessor> dataAccessObjectY = RigResultAccessorFactory::createFromResultAddress(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SGAS"));
cvf::ref<RigResultAccessor> dataAccessObjectZ = RigResultAccessorFactory::createFromResultAddress(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, "SWAT"));
double scalarValue = 0.0;