Fixed bug in IBM (Hrvoje Jasak)

This commit is contained in:
Henrik Rusche 2016-11-18 14:04:48 +01:00
parent 8e436f6616
commit 76e22c7825

View file

@ -86,7 +86,7 @@ void Foam::immersedBoundaryFvPatch::makeTriAddressing() const
boolList visited(triPatch.size(), false); boolList visited(triPatch.size(), false);
register label curTri; label curTri = 0;
// Only search for tri faces in the mesh // Only search for tri faces in the mesh
forAll (triFacesInMesh, tfimI) forAll (triFacesInMesh, tfimI)
@ -125,13 +125,17 @@ void Foam::immersedBoundaryFvPatch::makeTriAddressing() const
// already visited faces // already visited faces
do do
{ {
curTri = nextToVisit.removeHead(); if (!nextToVisit.empty())
{
curTri = nextToVisit.removeHead();
}
else
{
break;
}
} }
while (visited[curTri]); while (visited[curTri]);
// Discard tri if already visited
if (visited[curTri]) continue;
visited[curTri] = true; visited[curTri] = true;
const triFace& curTriPoints = triPatch[curTri]; const triFace& curTriPoints = triPatch[curTri];