mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
MswRollUp: Made neighbour calculations handle cells on edge
This is an intermediate commit and does not compile p4#: 22219
This commit is contained in:
@@ -267,12 +267,17 @@ bool RigCaseData::findSharedSourceFace(cvf::StructGridInterface::FaceType& share
|
||||
|
||||
size_t ni, nj, nk;
|
||||
grid->neighborIJKAtCellFace(i, j, k, sourceFace, &ni, &nj, &nk);
|
||||
size_t neighborCellIndex = grid->cellIndexFromIJK(ni, nj, nk);
|
||||
|
||||
if (neighborCellIndex == otherGridCellIndex)
|
||||
if (grid->isCellValid(ni, nj, nk))
|
||||
{
|
||||
sharedSourceFace = sourceFace;
|
||||
return true;
|
||||
|
||||
size_t neighborCellIndex = grid->cellIndexFromIJK(ni, nj, nk);
|
||||
|
||||
if (neighborCellIndex == otherGridCellIndex)
|
||||
{
|
||||
sharedSourceFace = sourceFace;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user