From fe9fc5e51dcb88755f60f8fa7125481e77799083 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@Germany> Date: Fri, 18 Feb 2011 17:52:42 +0100 Subject: [PATCH] COMP: remove regExp dependency from polyBoundaryMesh --- .../mesh/manipulation/createPatch/createPatch.C | 11 +++++++++-- .../PV3FoamReader/PV3FoamReader/CMakeLists.txt | 1 - .../polyMesh/polyBoundaryMesh/polyBoundaryMesh.C | 2 +- .../polyMesh/polyBoundaryMesh/polyBoundaryMesh.H | 5 +++-- .../field/nearWallFields/nearWallFields.C | 11 ++++++----- .../functionObjects/forces/forces/forces.C | 6 +++++- 6 files changed, 24 insertions(+), 12 deletions(-) diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index db2649a6bd1..5a3a649f05e 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,6 +45,7 @@ Description #include "IOPtrList.H" #include "polyTopoChange.H" #include "polyModifyFace.H" +#include "wordReList.H" using namespace Foam; @@ -669,7 +670,13 @@ int main(int argc, char *argv[]) if (sourceType == "patches") { - labelHashSet patchSources(patches.patchSet(dict.lookup("patches"))); + labelHashSet patchSources + ( + patches.patchSet + ( + wordReList(dict.lookup("patches")) + ) + ); // Repatch faces of the patches. forAllConstIter(labelHashSet, patchSources, iter) diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/CMakeLists.txt index 2c4be8d2d01..93dc9f702ef 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/CMakeLists.txt @@ -18,7 +18,6 @@ LINK_DIRECTORIES( ) INCLUDE_DIRECTORIES( - $ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude $ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude $ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude ${PROJECT_SOURCE_DIR}/../vtkPV3Foam diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index 897e290b43f..9d37047635a 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -550,7 +550,7 @@ Foam::label Foam::polyBoundaryMesh::whichPatch(const label faceIndex) const Foam::labelHashSet Foam::polyBoundaryMesh::patchSet ( - const wordReList& patchNames, + const UList<wordRe>& patchNames, const bool warnNotFound ) const { diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H index 39fb5273685..f86295abb53 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H @@ -38,7 +38,6 @@ SourceFiles #include "polyPatchList.H" #include "regIOobject.H" #include "labelPair.H" -#include "wordReList.H" #include "HashSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,7 +45,9 @@ SourceFiles namespace Foam { +// Forward declaration of classes class polyMesh; +class wordRe; // Forward declaration of friend functions and operators @@ -171,7 +172,7 @@ public: // By default warns if given names are not found. labelHashSet patchSet ( - const wordReList& patchNames, + const UList<wordRe>& patchNames, const bool warnNotFound = true ) const; diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C index 2774396e4f2..485e27b5c89 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C @@ -24,16 +24,14 @@ License \*---------------------------------------------------------------------------*/ #include "nearWallFields.H" +#include "wordReList.H" //#include "volFields.H" //#include "selfContainedDirectMappedFixedValueFvPatchFields.H" //#include "interpolationCellPoint.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -namespace Foam -{ - defineTypeNameAndDebug(nearWallFields, 0); -} +defineTypeNameAndDebug(Foam::nearWallFields, 0); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -87,7 +85,10 @@ void Foam::nearWallFields::read(const dictionary& dict) const fvMesh& mesh = refCast<const fvMesh>(obr_); dict.lookup("fields") >> fieldSet_; - patchSet_ = mesh.boundaryMesh().patchSet(dict.lookup("patches")); + patchSet_ = mesh.boundaryMesh().patchSet + ( + wordReList(dict.lookup("patches")) + ); distance_ = readScalar(dict.lookup("distance")); diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index aacc6b1947e..6900d0da6a7 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -27,6 +27,7 @@ License #include "volFields.H" #include "dictionary.H" #include "Time.H" +#include "wordReList.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" #include "incompressible/RAS/RASModel/RASModel.H" @@ -229,7 +230,10 @@ void Foam::forces::read(const dictionary& dict) const fvMesh& mesh = refCast<const fvMesh>(obr_); - patchSet_ = mesh.boundaryMesh().patchSet(dict.lookup("patches")); + patchSet_ = mesh.boundaryMesh().patchSet + ( + wordReList(dict.lookup("patches")) + ); if (directForceDensity_) { -- GitLab