From b1ce027774fde39e3466451d44a29c94716210cd Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Wed, 6 Apr 2011 10:36:00 +0100 Subject: [PATCH] ENH: cellClassification: parallel running --- .../mesh/advanced/selectCells/selectCells.C | 5 ++-- src/meshTools/surfaceSets/surfaceSets.C | 23 +------------------ 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/applications/utilities/mesh/advanced/selectCells/selectCells.C b/applications/utilities/mesh/advanced/selectCells/selectCells.C index 7b4d17764cf..2fa0f20ada4 100644 --- a/applications/utilities/mesh/advanced/selectCells/selectCells.C +++ b/applications/utilities/mesh/advanced/selectCells/selectCells.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 @@ -388,7 +388,8 @@ int main(int argc, char *argv[]) { const point& outsidePoint = outsidePts[outsideI]; - if (queryMesh.findCell(outsidePoint, -1, false) == -1) + label cellI = queryMesh.findCell(outsidePoint, -1, false); + if (returnReduce(cellI, maxOp<label>()) == -1) { FatalErrorIn(args.executable()) << "outsidePoint " << outsidePoint diff --git a/src/meshTools/surfaceSets/surfaceSets.C b/src/meshTools/surfaceSets/surfaceSets.C index 99f47d68d9e..492cc33834a 100644 --- a/src/meshTools/surfaceSets/surfaceSets.C +++ b/src/meshTools/surfaceSets/surfaceSets.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 @@ -237,27 +237,6 @@ void Foam::surfaceSets::getSurfaceSets // Construct search engine on mesh meshSearch queryMesh(mesh, true); - - // Check all 'outside' points - forAll(outsidePts, outsideI) - { - const point& outsidePoint = outsidePts[outsideI]; - - // Find cell point is in. Linear search. - if (queryMesh.findCell(outsidePoint, -1, false) == -1) - { - FatalErrorIn - ( - "surfaceSets::getSurfaceSets" - "(const polyMesh&, const fileName&, const triSurface&" - ", const triSurfaceSearch&, const pointField&" - ", labelHashSet&, labelHashSet&, labelHashSet&)" - ) << "outsidePoint " << outsidePoint - << " is not inside any cell" - << exit(FatalError); - } - } - // Cut faces with surface and classify cells cellClassification cellType ( -- GitLab