Skip to content
Snippets Groups Projects
Commit f9358d33 authored by Henry Weller's avatar Henry Weller
Browse files

pairPatchAgglomeration: Stop agglomeration loop if no further agglomeration is achieved

parent 57e5a110
No related branches found
No related tags found
No related merge requests found
...@@ -365,7 +365,7 @@ bool Foam::pairPatchAgglomeration::agglomeratePatch ...@@ -365,7 +365,7 @@ bool Foam::pairPatchAgglomeration::agglomeratePatch
} }
void Foam::pairPatchAgglomeration:: agglomerate() void Foam::pairPatchAgglomeration::agglomerate()
{ {
label nPairLevels = 0; label nPairLevels = 0;
label nCreatedLevels = 1; // 0 level is the base patch label nCreatedLevels = 1; // 0 level is the base patch
...@@ -380,13 +380,15 @@ void Foam::pairPatchAgglomeration:: agglomerate() ...@@ -380,13 +380,15 @@ void Foam::pairPatchAgglomeration:: agglomerate()
do do
{ {
label nCoarseFacesPrev = nCoarseFaces;
finalAgglomPtr = agglomerateOneLevel finalAgglomPtr = agglomerateOneLevel
( (
nCoarseFaces, nCoarseFaces,
patch patch
); );
if (nCoarseFaces > 0) if (nCoarseFaces > 0 && nCoarseFaces != nCoarseFacesPrev)
{ {
if if
( (
...@@ -524,7 +526,7 @@ Foam::tmp<Foam::labelField> Foam::pairPatchAgglomeration::agglomerateOneLevel ...@@ -524,7 +526,7 @@ Foam::tmp<Foam::labelField> Foam::pairPatchAgglomeration::agglomerateOneLevel
{ {
// if not create single-cell "clusters" for each // if not create single-cell "clusters" for each
coarseCellMap[facei] = nCoarseFaces; coarseCellMap[facei] = nCoarseFaces;
nCoarseFaces ++; nCoarseFaces++;
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment