Added owner-neighbour check
This commit is contained in:
parent
7e04c9bcb9
commit
00797389d9
1 changed files with 33 additions and 2 deletions
|
@ -166,14 +166,45 @@ bool Foam::primitiveMesh::checkClosedCells
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if a face has got the same cell as owner and neighbour
|
||||||
|
// HJ, 25/May/2011
|
||||||
|
const labelList& own = faceOwner();
|
||||||
|
const labelList& nei = faceNeighbour();
|
||||||
|
|
||||||
|
label nErrorOwnNei = 0;
|
||||||
|
|
||||||
|
// Check internal faces only
|
||||||
|
forAll (nei, faceI)
|
||||||
|
{
|
||||||
|
if (own[faceI] == nei[faceI])
|
||||||
|
{
|
||||||
|
if (setPtr)
|
||||||
|
{
|
||||||
|
setPtr->insert(own[faceI]);
|
||||||
|
}
|
||||||
|
|
||||||
|
nErrorOwnNei++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nErrorOwnNei > 0)
|
||||||
|
{
|
||||||
|
if (debug || report)
|
||||||
|
{
|
||||||
|
Info<< " ***Faces declaring same cell as owner and neighbour "
|
||||||
|
<< "found, number of faces "
|
||||||
|
<< nErrorOwnNei << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Loop through cell faces and sum up the face area vectors for each cell.
|
// Loop through cell faces and sum up the face area vectors for each cell.
|
||||||
// This should be zero in all vector components
|
// This should be zero in all vector components
|
||||||
|
|
||||||
vectorField sumClosed(nCells(), vector::zero);
|
vectorField sumClosed(nCells(), vector::zero);
|
||||||
vectorField sumMagClosed(nCells(), vector::zero);
|
vectorField sumMagClosed(nCells(), vector::zero);
|
||||||
|
|
||||||
const labelList& own = faceOwner();
|
|
||||||
const labelList& nei = faceNeighbour();
|
|
||||||
const vectorField& areas = faceAreas();
|
const vectorField& areas = faceAreas();
|
||||||
|
|
||||||
forAll (own, faceI)
|
forAll (own, faceI)
|
||||||
|
|
Reference in a new issue