Fixed bug in IBM (Hrvoje Jasak)
This commit is contained in:
parent
8e436f6616
commit
76e22c7825
1 changed files with 9 additions and 5 deletions
|
@ -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];
|
||||||
|
|
Reference in a new issue