diff --git a/applications/test/checkDecomposePar/Test-checkDecomposePar.C b/applications/test/checkDecomposePar/Test-checkDecomposePar.C index d664615503..805b57b9ec 100644 --- a/applications/test/checkDecomposePar/Test-checkDecomposePar.C +++ b/applications/test/checkDecomposePar/Test-checkDecomposePar.C @@ -100,10 +100,7 @@ int main(int argc, char *argv[]) const wordList& regions = iter(); forAll(regions, i) { - if (!regionNames.found(regions[i])) - { - regionNames.append(regions[i]); - } + regionNames.appendUniq(regions[i]); } } regionDirs = regionNames; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 4a548c89ef..14a2f32fd5 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -894,15 +894,8 @@ void Foam::conformalVoronoiMesh::checkCellSizing() const label faceOwner = pMesh.faceOwner()[facei]; const label faceNeighbour = pMesh.faceNeighbour()[facei]; - if (!cellsToResizeMap.found(faceOwner)) - { - cellsToResizeMap.insert(faceOwner); - } - - if (!cellsToResizeMap.found(faceNeighbour)) - { - cellsToResizeMap.insert(faceNeighbour); - } + cellsToResizeMap.insert(faceOwner); + cellsToResizeMap.insert(faceNeighbour); } cellsToResizeMap += protrudingCells; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index 4affaa5758..fa734f5a18 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -727,11 +727,7 @@ Foam::label Foam::conformalVoronoiMesh::synchroniseSurfaceTrees if (nearest.hit() || nearestEdge.hit()) { nStoppedInsertion++; - - if (!hits[proci].found(peI)) - { - hits[proci].insert(peI); - } + hits[proci].insert(peI); } } } @@ -822,11 +818,7 @@ Foam::label Foam::conformalVoronoiMesh::synchroniseEdgeTrees // << endl; nStoppedInsertion++; - - if (!hits[proci].found(peI)) - { - hits[proci].insert(peI); - } + hits[proci].insert(peI); } } } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H index caac10dbc8..9d71ce889c 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2015 OpenFOAM Foundation + Copyright (C) 2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -467,15 +468,8 @@ inline Foam::List Foam::conformalVoronoiMesh::processorsAttached forAll(c1Procs, aPI) { - if (!procsAttached.found(c1Procs[aPI])) - { - procsAttached.append(c1Procs[aPI]); - } - - if (!procsAttached.found(c2Procs[aPI])) - { - procsAttached.append(c2Procs[aPI]); - } + procsAttached.appendUniq(c1Procs[aPI]); + procsAttached.appendUniq(c2Procs[aPI]); } return List