From 52b11e1129bafcd78c905532bcfb9c21654605ec Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 2 Apr 2013 18:06:45 +0100 Subject: [PATCH] ENH: PatchTools: merge using non-local points/faces --- src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H | 4 ++-- .../primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H index 439c120b45..36e792326d 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H +++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H @@ -254,8 +254,8 @@ public: ); - //- Gather points and faces onto master and merge (geometrically) into - // single patch. + //- Gather points and faces onto master and merge into single patch. + // Note: uses faces/points, not localFaces/localPoints. template < class Face, diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C index 89ffdec2ae..ee47e50a85 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,7 +52,8 @@ void Foam::PatchTools::gatherAndMerge labelList pointSizes; { List > gatheredPoints(Pstream::nProcs()); - gatheredPoints[Pstream::myProcNo()] = p.localPoints(); + gatheredPoints[Pstream::myProcNo()] = p.points(); + Pstream::gatherList(gatheredPoints); if (Pstream::master()) @@ -75,7 +76,7 @@ void Foam::PatchTools::gatherAndMerge // gathered points { List > gatheredFaces(Pstream::nProcs()); - gatheredFaces[Pstream::myProcNo()] = p.localFaces(); + gatheredFaces[Pstream::myProcNo()] = p; Pstream::gatherList(gatheredFaces); if (Pstream::master())