mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
parent
78aaa53b54
commit
567f16ad43
@ -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
|
||||
|
@ -164,10 +164,15 @@ void RigCaseData::computeWellCellsPrGrid()
|
||||
size_t gridIndex = wellCells.m_wellHead.m_gridIndex;
|
||||
size_t gridCellIndex = wellCells.m_wellHead.m_gridCellIndex;
|
||||
|
||||
if (gridIndex != cvf::UNDEFINED_SIZE_T && gridCellIndex != cvf::UNDEFINED_SIZE_T)
|
||||
if (gridIndex < m_wellCellsInGrid.size() && gridCellIndex < m_wellCellsInGrid[gridIndex]->size())
|
||||
{
|
||||
m_wellCellsInGrid[gridIndex]->set(gridCellIndex, true);
|
||||
m_gridCellToWellIndex[gridIndex]->set(gridCellIndex, static_cast<cvf::uint>(wIdx));
|
||||
size_t globalGridCellIndex = grids[gridIndex]->globalGridCellIndex(gridCellIndex);
|
||||
if (m_activeCellInfo->isActive(globalGridCellIndex)
|
||||
|| m_fractureActiveCellInfo->isActive(globalGridCellIndex))
|
||||
{
|
||||
m_wellCellsInGrid[gridIndex]->set(gridCellIndex, true);
|
||||
m_gridCellToWellIndex[gridIndex]->set(gridCellIndex, static_cast<cvf::uint>(wIdx));
|
||||
}
|
||||
}
|
||||
|
||||
size_t sIdx;
|
||||
|
Loading…
Reference in New Issue
Block a user