mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
wildcards in selection
This commit is contained in:
@ -57,21 +57,36 @@ Foam::topoSetSource::addToUsageTable Foam::patchToFace::usage_
|
||||
|
||||
void Foam::patchToFace::combine(topoSet& set, const bool add) const
|
||||
{
|
||||
label patchI = mesh_.boundaryMesh().findPatchID(patchName_);
|
||||
bool hasMatched = false;
|
||||
|
||||
if (patchI != -1)
|
||||
forAll(mesh_.boundaryMesh(), patchI)
|
||||
{
|
||||
const polyPatch& pp = mesh_.boundaryMesh()[patchI];
|
||||
|
||||
for (label faceI = pp.start(); faceI < pp.start() + pp.size(); faceI++)
|
||||
if (patchName_.match(pp.name()))
|
||||
{
|
||||
addOrDelete(set, faceI, add);
|
||||
Info<< " Found matching patch " << pp.name()
|
||||
<< " with " << pp.size() << " faces." << endl;
|
||||
|
||||
hasMatched = true;
|
||||
|
||||
|
||||
for
|
||||
(
|
||||
label faceI = pp.start();
|
||||
faceI < pp.start() + pp.size();
|
||||
faceI++
|
||||
)
|
||||
{
|
||||
addOrDelete(set, faceI, add);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (!hasMatched)
|
||||
{
|
||||
WarningIn("patchToFace::combine(topoSet&, const bool)")
|
||||
<< "Cannot find patch named " << patchName_ << endl
|
||||
<< "Cannot find any patch named " << patchName_ << endl
|
||||
<< "Valid names are " << mesh_.boundaryMesh().names() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user