mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
wildcards for excludedPatches
This commit is contained in:
@ -83,12 +83,13 @@ Usage
|
|||||||
Combine all patches into a single file
|
Combine all patches into a single file
|
||||||
|
|
||||||
@param -excludePatches \<patchNames\>\n
|
@param -excludePatches \<patchNames\>\n
|
||||||
Specify patches to exclude. For example,
|
Specify patches (wildcards) to exclude. For example,
|
||||||
@verbatim
|
@verbatim
|
||||||
-excludePatches "( inlet_1 inlet_2 )"
|
-excludePatches '( inlet_1 inlet_2 "proc.*")'
|
||||||
@endverbatim
|
@endverbatim
|
||||||
The quoting is required to avoid shell expansions and to pass the
|
The quoting is required to avoid shell expansions and to pass the
|
||||||
information as a single argument.
|
information as a single argument. The double quotes denote a regular
|
||||||
|
expression.
|
||||||
|
|
||||||
@param -useTimeName \n
|
@param -useTimeName \n
|
||||||
use the time index in the VTK file name instead of the time index
|
use the time index in the VTK file name instead of the time index
|
||||||
@ -140,6 +141,7 @@ Note
|
|||||||
#include "faceZoneMesh.H"
|
#include "faceZoneMesh.H"
|
||||||
#include "Cloud.H"
|
#include "Cloud.H"
|
||||||
#include "passiveParticle.H"
|
#include "passiveParticle.H"
|
||||||
|
#include "stringListOps.H"
|
||||||
|
|
||||||
#include "vtkMesh.H"
|
#include "vtkMesh.H"
|
||||||
#include "readFields.H"
|
#include "readFields.H"
|
||||||
@ -192,7 +194,7 @@ void print(Ostream& os, const wordList& flds)
|
|||||||
labelList getSelectedPatches
|
labelList getSelectedPatches
|
||||||
(
|
(
|
||||||
const polyBoundaryMesh& patches,
|
const polyBoundaryMesh& patches,
|
||||||
const HashSet<word>& excludePatches
|
const List<wordRe>& excludePatches //HashSet<word>& excludePatches
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
DynamicList<label> patchIDs(patches.size());
|
DynamicList<label> patchIDs(patches.size());
|
||||||
@ -205,14 +207,19 @@ labelList getSelectedPatches
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
isA<emptyPolyPatch>(pp)
|
isType<emptyPolyPatch>(pp)
|
||||||
|| (Pstream::parRun() && isA<processorPolyPatch>(pp))
|
|| (Pstream::parRun() && isType<processorPolyPatch>(pp))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Info<< " discarding empty/processor patch " << patchI
|
Info<< " discarding empty/processor patch " << patchI
|
||||||
<< " " << pp.name() << endl;
|
<< " " << pp.name() << endl;
|
||||||
}
|
}
|
||||||
else if (!excludePatches.found(pp.name()))
|
else if (findStrings(excludePatches, pp.name()))
|
||||||
|
{
|
||||||
|
Info<< " excluding patch " << patchI
|
||||||
|
<< " " << pp.name() << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
patchIDs.append(patchI);
|
patchIDs.append(patchI);
|
||||||
Info<< " patch " << patchI << " " << pp.name() << endl;
|
Info<< " patch " << patchI << " " << pp.name() << endl;
|
||||||
@ -224,6 +231,8 @@ labelList getSelectedPatches
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Main program:
|
// Main program:
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
@ -283,7 +292,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
bool allPatches = args.optionFound("allPatches");
|
bool allPatches = args.optionFound("allPatches");
|
||||||
|
|
||||||
HashSet<word> excludePatches;
|
List<wordRe> excludePatches;
|
||||||
if (args.optionFound("excludePatches"))
|
if (args.optionFound("excludePatches"))
|
||||||
{
|
{
|
||||||
args.optionLookup("excludePatches")() >> excludePatches;
|
args.optionLookup("excludePatches")() >> excludePatches;
|
||||||
@ -771,7 +780,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
const polyPatch& pp = patches[patchI];
|
const polyPatch& pp = patches[patchI];
|
||||||
|
|
||||||
if (!excludePatches.found(pp.name()))
|
if (!findStrings(excludePatches, pp.name()))
|
||||||
{
|
{
|
||||||
mkDir(fvPath/pp.name());
|
mkDir(fvPath/pp.name());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user