Fix of GH#43 Assertion Fail for localGridIndex

The grid number associated with an ert grid was an ID and not an index.
In addition: Fixed unrobustness handling wells with no data.
Now the /Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3.EGRID file loads( Have tested only two timesteps ).
p4#: 22321
This commit is contained in:
Jacob Støren
2013-09-05 13:03:53 +02:00
parent 3cf18d91fd
commit 97bb848b1d
7 changed files with 49 additions and 10 deletions

View File

@@ -188,10 +188,13 @@ bool RimWell::calculateWellPipeVisibility(size_t frameIndex)
size_t gridIndex = wrsf.m_wellHead.m_gridIndex;
size_t gridCellIndex = wrsf.m_wellHead.m_gridCellIndex;
cvf::cref<cvf::UByteArray> cellVisibility = rvMan->cellVisibility(visGridParts[gpIdx], gridIndex, frameIndex);
if ((*cellVisibility)[gridCellIndex])
if (gridIndex != cvf::UNDEFINED_SIZE_T && gridCellIndex != cvf::UNDEFINED_SIZE_T)
{
return true;
cvf::cref<cvf::UByteArray> cellVisibility = rvMan->cellVisibility(visGridParts[gpIdx], gridIndex, frameIndex);
if ((*cellVisibility)[gridCellIndex])
{
return true;
}
}
// Then check the rest of the well, with all the branches