From 2b5ce48500bd002607bc1c3789f914bd3e3f4b89 Mon Sep 17 00:00:00 2001 From: graham Date: Thu, 7 Oct 2010 15:50:05 +0100 Subject: [PATCH] BUG: Comms mismatch when some procs have no particles and others have some. --- src/lagrangian/basic/Cloud/CloudIO.C | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lagrangian/basic/Cloud/CloudIO.C b/src/lagrangian/basic/Cloud/CloudIO.C index bc0e7defd2..87b23e4538 100644 --- a/src/lagrangian/basic/Cloud/CloudIO.C +++ b/src/lagrangian/basic/Cloud/CloudIO.C @@ -121,12 +121,16 @@ void Foam::Cloud::initCloud(const bool checkClass) } else { - WarningIn("Cloud::initCloud(const bool checkClass)") - << "Cannot read particle positions file " << nl + Pout<< "Cannot read particle positions file " << nl << " " << ioP.path() << nl << " assuming the initial cloud contains 0 particles." << endl; } + // Ask for the tetBasePtIs to trigger all processors to build + // them, otherwise, if some processors have no particles then + // there is a comms mismatch. + polyMesh_.tetBasePtIs(); + forAllIter(typename Cloud, *this, pIter) { ParticleType& p = pIter();