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:
parent
a7df748094
commit
77152f3f10
1 changed files with 14 additions and 10 deletions
|
|
@ -443,16 +443,6 @@ Foam::polyBoundaryMesh::groupPatchIDs() const
|
||||||
{
|
{
|
||||||
const word& name = groups[i];
|
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
|
HashTable<labelList, word>::iterator iter = groupPatchIDs.find
|
||||||
(
|
(
|
||||||
name
|
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_();
|
return groupPatchIDsPtr_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue