From d661165759c72e9438c3b7c19938e1f9022e8fab Mon Sep 17 00:00:00 2001 From: sergio Date: Tue, 13 Jun 2017 09:40:57 -0700 Subject: [PATCH] Init processor_ variable for patchProbes in findElements function --- src/sampling/probes/patchProbes.C | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sampling/probes/patchProbes.C b/src/sampling/probes/patchProbes.C index 6fb89affa5..6fd5f9cf92 100644 --- a/src/sampling/probes/patchProbes.C +++ b/src/sampling/probes/patchProbes.C @@ -198,13 +198,19 @@ void Foam::patchProbes::findElements(const fvMesh& mesh) faceList_.setSize(nearest.size()); faceList_ = -1; + processor_.setSize(size()); + processor_ = -1; + forAll(nearest, sampleI) { if (nearest[sampleI].second().second() == Pstream::myProcNo()) { // Store the face to sample faceList_[sampleI] = nearest[sampleI].first().index(); + label facei = faceList_[sampleI]; + processor_[sampleI] = (facei != -1 ? Pstream::myProcNo() : -1); } + reduce(processor_[sampleI], maxOp