Commit bd2a5cc9 authored by Philippose Rajan's avatar Philippose Rajan Committed by Mark Olesen

Revert "STYLE: use findIndices instead of findStrings"

This reverts commit 0cb890e0.

- fixes regression noted in issue #6

- Note that this is not a style change, but a fundamental issue with
  how cfmesh is currently handling the patch names. In a few places
  the names are treated as regular expressions. A proper keyType or
  wordRe should have been used on the input, but needs to be addressed
  in the future.
parent 101a4d03
......@@ -29,7 +29,7 @@ License
#include "IOobjectList.H"
#include "faceSet.H"
#include "demandDrivenData.H"
#include "ListOps.H"
#include "stringListOps.H"
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
......@@ -268,15 +268,16 @@ Foam::labelList Foam::Module::polyMeshGenFaces::findPatches
const word& patchName
) const
{
const labelList ids = findIndices(patchNames(), patchName);
const labelList patchIDs =
findMatchingStrings(regExp(patchName), patchNames());
if (ids.empty())
if (patchIDs.empty())
{
WarningInFunction
<< "Cannot find any patch names matching " << patchName << endl;
}
return ids;
return patchIDs;
}
......
......@@ -27,7 +27,7 @@ License
#include "pointIOField.H"
#include "IOobjectList.H"
#include "pointSet.H"
#include "ListOps.H"
#include "stringListOps.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -89,17 +89,18 @@ Foam::labelList Foam::Module::triSurfFacets::findPatches
const word& patchName
) const
{
const labelList ids = findIndices(patchNames(), patchName);
const labelList patchIDs =
findMatchingStrings(regExp(patchName), patchNames());
# ifdef DEBUGtriSurf
if (ids.empty())
if (patchIDs.empty())
{
WarningInFunction
<< "Cannot find any patch names matching " << patchName << endl;
}
# endif
return ids;
return patchIDs;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment