From 63f60cef59e8e3633f594da6121d3b1bd5db47c2 Mon Sep 17 00:00:00 2001 From: Andrew Heather <a.heather@opencfd.co.uk> Date: Fri, 16 Mar 2018 11:01:04 +0000 Subject: [PATCH] BUG: Reinstated regex functionality for particle local interaction --- .../LocalInteraction/patchInteractionData.C | 2 +- .../LocalInteraction/patchInteractionData.H | 4 ++-- .../LocalInteraction/patchInteractionDataList.C | 7 ++----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C index 2f6d4f3f21d..1b54ba2c3cd 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C @@ -46,7 +46,7 @@ const Foam::word& Foam::patchInteractionData::interactionTypeName() const } -const Foam::word& Foam::patchInteractionData::patchName() const +const Foam::keyType& Foam::patchInteractionData::patchName() const { return patchName_; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.H index ed9309f8dbf..1c557764cd4 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.H @@ -61,7 +61,7 @@ class patchInteractionData word interactionTypeName_; //- Patch name - word patchName_; + keyType patchName_; //- Elasticity coefficient scalar e_; @@ -86,7 +86,7 @@ public: const word& interactionTypeName() const; //- Return const access to the patch name - const word& patchName() const; + const keyType& patchName() const; //- Return const access to the elasticity coefficient scalar e() const; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C index 3f3d468e864..79b0f11fe5a 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C @@ -24,7 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "patchInteractionDataList.H" -#include "stringListOps.H" #include "emptyPolyPatch.H" // * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // @@ -46,13 +45,11 @@ Foam::patchInteractionDataList::patchInteractionDataList patchGroupIDs_(this->size()) { const polyBoundaryMesh& bMesh = mesh.boundaryMesh(); - const wordList allPatchNames(bMesh.names()); - const List<patchInteractionData>& items = *this; forAllReverse(items, i) { - const word& patchName = items[i].patchName(); - labelList ids = findIndices(allPatchNames, patchName); + const keyType& patchName = items[i].patchName(); + labelList ids = bMesh.findIndices(patchName); if (ids.empty()) { -- GitLab