From edda92182b110054a795fd7d7fd9af9b95026e81 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 25 Feb 2013 14:01:40 +0100 Subject: [PATCH] Use active cell info struct instead of RigCell member function p4#: 20613 --- ApplicationCode/ProjectDataModel/RimReservoirView.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/ProjectDataModel/RimReservoirView.cpp b/ApplicationCode/ProjectDataModel/RimReservoirView.cpp index 21959e1251..51ed1acdb3 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoirView.cpp +++ b/ApplicationCode/ProjectDataModel/RimReservoirView.cpp @@ -1185,6 +1185,13 @@ void RimReservoirView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibl // If all wells are forced off, return if (this->wellCollection()->wellCellVisibility() == RimWellCollection::FORCE_ALL_OFF) return; + RigActiveCellInfo* activeCellInfo = NULL; + if (eclipseCase() && eclipseCase()->reservoirData()) + { + activeCellInfo = eclipseCase()->reservoirData()->activeCellInfo(); + } + CVF_ASSERT(activeCellInfo); + // Loop over the wells and find their contribution for (size_t wIdx = 0; wIdx < this->wellCollection()->wells().size(); ++wIdx) { @@ -1249,7 +1256,9 @@ void RimReservoirView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibl for ( fIdx = 0; fIdx < cellCountFenceDirection; ++fIdx) { size_t fenceCellIndex = grid->cellIndexFromIJK(*pI,*pJ,*pK); - if (grid->cell(fenceCellIndex).isActiveInMatrixModel()) + size_t globalGridCellIndex = grid->globalGridCellIndex(fenceCellIndex); + + if (activeCellInfo && activeCellInfo->isActiveInMatrixModel(globalGridCellIndex)) { (*visibleCells)[fenceCellIndex] = true; }