mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
wildcards for patch spec
This commit is contained in:
@ -73,23 +73,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
label getPatch(const polyBoundaryMesh& patches, const word& patchName)
|
|
||||||
{
|
|
||||||
label patchI = patches.findPatchID(patchName);
|
|
||||||
|
|
||||||
if (patchI == -1)
|
|
||||||
{
|
|
||||||
FatalErrorIn("createPatch(const polyBoundaryMesh&, const word&)")
|
|
||||||
<< "Cannot find source patch " << patchName
|
|
||||||
<< endl << "Valid patch names are " << patches.names()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
return patchI;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void changePatchID
|
void changePatchID
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
@ -704,14 +687,12 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (sourceType == "patches")
|
if (sourceType == "patches")
|
||||||
{
|
{
|
||||||
wordList patchSources(dict.lookup("patches"));
|
labelHashSet patchSources(patches.patchSet(dict.lookup("patches")));
|
||||||
|
|
||||||
// Repatch faces of the patches.
|
// Repatch faces of the patches.
|
||||||
forAll(patchSources, sourceI)
|
forAllConstIter(labelHashSet, patchSources, iter)
|
||||||
{
|
{
|
||||||
label patchI = getPatch(patches, patchSources[sourceI]);
|
const polyPatch& pp = patches[iter.key()];
|
||||||
|
|
||||||
const polyPatch& pp = patches[patchI];
|
|
||||||
|
|
||||||
Info<< "Moving faces from patch " << pp.name()
|
Info<< "Moving faces from patch " << pp.name()
|
||||||
<< " to patch " << destPatchI << endl;
|
<< " to patch " << destPatchI << endl;
|
||||||
|
|||||||
@ -69,8 +69,8 @@ patches
|
|||||||
// How to construct: either from 'patches' or 'set'
|
// How to construct: either from 'patches' or 'set'
|
||||||
constructFrom patches;
|
constructFrom patches;
|
||||||
|
|
||||||
// If constructFrom = patches : names of patches
|
// If constructFrom = patches : names of patches. Wildcards allowed.
|
||||||
patches (periodic-1 periodic-2);
|
patches ("periodic.*");
|
||||||
|
|
||||||
// If constructFrom = set : name of faceSet
|
// If constructFrom = set : name of faceSet
|
||||||
set f0;
|
set f0;
|
||||||
|
|||||||
Reference in New Issue
Block a user