fix mastercell calculation

This commit is contained in:
mattijs
2009-09-29 20:31:24 +01:00
parent 98dd8ff0f6
commit 821635d186

View File

@ -134,16 +134,24 @@ void Foam::faceZone::calcCellLayers() const
forAll (mf, faceI) forAll (mf, faceI)
{ {
label ownCellI = own[mf[faceI]];
label neiCellI =
(
zoneMesh().mesh().isInternalFace(mf[faceI])
? nei[mf[faceI]]
: -1
);
if (!faceFlip[faceI]) if (!faceFlip[faceI])
{ {
// Face is oriented correctly, no flip needed // Face is oriented correctly, no flip needed
mc[faceI] = nei[mf[faceI]]; mc[faceI] = neiCellI;
sc[faceI] = own[mf[faceI]]; sc[faceI] = ownCellI;
} }
else else
{ {
mc[faceI] = own[mf[faceI]]; mc[faceI] = ownCellI;
sc[faceI] = nei[mf[faceI]]; sc[faceI] = neiCellI;
} }
} }
//Info << "masterCells: " << mc << endl; //Info << "masterCells: " << mc << endl;