From 7890705ccd39fb74b33c528d5c9d33096e7e36da Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 6 Aug 2016 08:42:36 +0200 Subject: [PATCH] Renamed function name --- .../RivCellEdgeGeometryUtils.cpp | 18 +++++++++++++----- .../RivCellEdgeGeometryUtils.h | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.cpp b/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.cpp index 5a9200deaf..cddb66fc48 100644 --- a/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.cpp +++ b/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.cpp @@ -60,7 +60,7 @@ void RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo( // Create result access objects cvf::ref cellCenterDataAccessObject = createCellCenterResultAccessor(cellResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex)); - cvf::ref cellEdgeResultAccessor = createCellEdgeCenterResultAccessor(cellResultColors, cellEdgeResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex)); + cvf::ref cellEdgeResultAccessor = createCellEdgeResultAccessor(cellResultColors, cellEdgeResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex)); size_t vertexCount = geo->vertexArray()->size(); size_t quadCount = vertexCount / 4; @@ -201,7 +201,7 @@ void RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(size_t tim RigCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->reservoirData(); CVF_ASSERT(eclipseCase != NULL); - cvf::ref cellEdgeResultAccessor = createCellEdgeCenterResultAccessor(cellResultColors, cellEdgeResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex)); + cvf::ref cellEdgeResultAccessor = createCellEdgeResultAccessor(cellResultColors, cellEdgeResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex)); size_t vertexCount = geo->vertexArray()->size(); size_t quadCount = vertexCount / 4; @@ -289,7 +289,7 @@ void RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(size_t tim //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::ref RivCellEdgeGeometryUtils::createCellEdgeCenterResultAccessor( +cvf::ref RivCellEdgeGeometryUtils::createCellEdgeResultAccessor( RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors, size_t timeStepIndex, @@ -302,11 +302,19 @@ cvf::ref RivCellEdgeGeometryUtils::createCellEdgeCenterResult cellEdgeResultColors->gridScalarIndices(resultIndices); RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel()); + std::vector metaData; + cellEdgeResultColors->cellEdgeMetaData(&metaData); + size_t cubeFaceIdx; for (cubeFaceIdx = 0; cubeFaceIdx < 6; cubeFaceIdx++) { - // Assuming static values to be mapped onto cell edge, always using time step zero - cvf::ref daObj = RigResultAccessorFactory::createResultAccessor(eclipseCase, grid->gridIndex(), porosityModel, 0, resultIndices[cubeFaceIdx]); + size_t adjustedTimeStep = timeStepIndex; + if (metaData[cubeFaceIdx].m_isStatic) + { + adjustedTimeStep = 0; + } + + cvf::ref daObj = RigResultAccessorFactory::createResultAccessor(eclipseCase, grid->gridIndex(), porosityModel, adjustedTimeStep, resultIndices[cubeFaceIdx]); cellEdgeResultAccessor->setDataAccessObjectForFace(static_cast(cubeFaceIdx), daObj.p()); } } diff --git a/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.h b/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.h index e8cacb67d0..6dbdc7f7f7 100644 --- a/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.h +++ b/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.h @@ -63,7 +63,7 @@ private: RigCaseData* eclipseCase, const RigGridBase* grid); - static cvf::ref createCellEdgeCenterResultAccessor( + static cvf::ref createCellEdgeResultAccessor( RimEclipseCellColors* cellResultColors, RimCellEdgeColors* cellEdgeResultColors, size_t timeStepIndex,