diff --git a/src/sampling/probes/probes.C b/src/sampling/probes/probes.C index e920b946b8..6d072e2809 100644 --- a/src/sampling/probes/probes.C +++ b/src/sampling/probes/probes.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -58,6 +58,9 @@ void Foam::probes::findElements(const fvMesh& mesh) faceList_.clear(); faceList_.setSize(size()); + processor_.setSize(size()); + processor_ = -1; + forAll(*this, probei) { const vector& location = operator[](probei); @@ -105,9 +108,12 @@ void Foam::probes::findElements(const fvMesh& mesh) label celli = elementList_[probei]; label facei = faceList_[probei]; + processor_[probei] = (celli != -1 ? Pstream::myProcNo() : -1); + // Check at least one processor with cell. reduce(celli, maxOp