diff --git a/src/sampling/sampledSet/lineFace/lineFace.C b/src/sampling/sampledSet/lineFace/lineFace.C index 0923f8011c..139f2679bf 100644 --- a/src/sampling/sampledSet/lineFace/lineFace.C +++ b/src/sampling/sampledSet/lineFace/lineFace.C @@ -56,6 +56,12 @@ void Foam::sampledSets::lineFace::calcSamples DynamicList& samplingCurveDist ) { + // Ask for the tetBasePtIs and oldCellCentres to trigger all processors to + // build them, otherwise, if some processors have no particles then there + // is a comms mismatch. + mesh.tetBasePtIs(); + mesh.oldCellCentres(); + // Create lists of initial positions from which to track, the faces and // cells associated with those positions, and whether the track propagates // forward (true) or backward (false) along the line from start to end diff --git a/src/sampling/sampledSet/lineUniform/lineUniform.C b/src/sampling/sampledSet/lineUniform/lineUniform.C index 6d8e23a743..9ac8c348c7 100644 --- a/src/sampling/sampledSet/lineUniform/lineUniform.C +++ b/src/sampling/sampledSet/lineUniform/lineUniform.C @@ -52,6 +52,12 @@ void Foam::sampledSets::lineUniform::calcSamples DynamicList& samplingCurveDist ) const { + // Ask for the tetBasePtIs and oldCellCentres to trigger all processors to + // build them, otherwise, if some processors have no particles then there + // is a comms mismatch. + mesh().tetBasePtIs(); + mesh().oldCellCentres(); + label sampleSegmentI = 0, sampleI = 0; scalar sampleT = 0; diff --git a/src/sampling/sampledSet/points/points.C b/src/sampling/sampledSet/points/points.C index 1f72338265..1e633a4a49 100644 --- a/src/sampling/sampledSet/points/points.C +++ b/src/sampling/sampledSet/points/points.C @@ -77,6 +77,12 @@ void Foam::sampledSets::points::calcSamplesOrdered DynamicList& samplingCurveDist ) const { + // Ask for the tetBasePtIs and oldCellCentres to trigger all processors to + // build them, otherwise, if some processors have no particles then there + // is a comms mismatch. + mesh().tetBasePtIs(); + mesh().oldCellCentres(); + const label n = points_.size(); label sampleSegmentI = 0;