polyBoundaryMesh: Remove patchGroups which clash with patch names

This allows freedom in the naming of patches when patchGroup-based
boundary specification is not used.

Patch contributed by Mattijs Janssens
This commit is contained in:
Henry Weller
2016-09-04 10:35:19 +01:00
parent a7df748094
commit 77152f3f10

View File

@ -443,16 +443,6 @@ Foam::polyBoundaryMesh::groupPatchIDs() const
{
const word& name = groups[i];
if (findPatchID(name) != -1)
{
WarningInFunction
<< "Patch " << bm[patchi].name()
<< " specifies a group " << name
<< " which is also a patch name."
<< " This might give problems later on." << endl;
}
HashTable<labelList, word>::iterator iter = groupPatchIDs.find
(
name
@ -468,7 +458,21 @@ Foam::polyBoundaryMesh::groupPatchIDs() const
}
}
}
// Remove patch names from patchGroups
forAll(bm, patchi)
{
if (groupPatchIDs.erase(bm[patchi].name()))
{
WarningInFunction
<< "Removing patchGroup '" << bm[patchi].name()
<< "' which clashes with patch " << patchi
<< " of the same name."
<< endl;
}
}
}
return groupPatchIDsPtr_();
}