From a5f26561ff4ae96e409c655cf42b90e12f55e9d4 Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Fri, 22 Aug 2014 15:28:39 +0100
Subject: [PATCH] BUG: uniformSet: construct cloud on all processors

---
 src/sampling/sampledSet/uniform/uniformSet.C | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/sampling/sampledSet/uniform/uniformSet.C b/src/sampling/sampledSet/uniform/uniformSet.C
index 706e3c11d0b..480d373fa2b 100644
--- a/src/sampling/sampledSet/uniform/uniformSet.C
+++ b/src/sampling/sampledSet/uniform/uniformSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -226,13 +226,16 @@ void Foam::uniformSet::calcSamples
             << exit(FatalError);
     }
 
+    // Dummy cloud to force cyclicAMI and min-tet decomposition construction
+    // even on those processors where there are no points
+    passiveParticleCloud dummyCloud(mesh());
+
+
     const vector offset = (end_ - start_)/(nPoints_ - 1);
     const vector normOffset = offset/mag(offset);
     const vector smallVec = tol*offset;
     const scalar smallDist = mag(smallVec);
 
-    // Force calculation of minimum-tet decomposition.
-    (void) mesh().tetBasePtIs();
 
     // Get all boundary intersections
     List<pointIndexHit> bHits = searchEngine().intersections
-- 
GitLab