Removed Wellhead cell visualization if cell is not active

Issue #63
This commit is contained in:
Jacob Støren
2013-09-30 15:22:08 +02:00
parent 78aaa53b54
commit 567f16ad43
2 changed files with 15 additions and 6 deletions

View File

@@ -1431,12 +1431,16 @@ void RimReservoirView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibl
const std::vector< RigWellResultFrame >& wellResFrames = wres->m_wellCellsTimeSteps;
for (size_t wfIdx = 0; wfIdx < wellResFrames.size(); ++wfIdx)
{
// Add the wellhead cell
// Add the wellhead cell if it is active
if (wellResFrames[wfIdx].m_wellHead.m_gridIndex == grid->gridIndex())
{
size_t gridCellIndex = wellResFrames[wfIdx].m_wellHead.m_gridCellIndex;
(*visibleCells)[gridCellIndex] = true;
size_t globalGridCellIndex = grid->globalGridCellIndex(gridCellIndex);
if (activeCellInfo->isActive(globalGridCellIndex))
{
(*visibleCells)[gridCellIndex] = true;
}
}
// Add all the cells from the branches