mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Init processor_ variable for patchProbes in findElements function
This commit is contained in:
@ -198,13 +198,19 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
|
|||||||
faceList_.setSize(nearest.size());
|
faceList_.setSize(nearest.size());
|
||||||
faceList_ = -1;
|
faceList_ = -1;
|
||||||
|
|
||||||
|
processor_.setSize(size());
|
||||||
|
processor_ = -1;
|
||||||
|
|
||||||
forAll(nearest, sampleI)
|
forAll(nearest, sampleI)
|
||||||
{
|
{
|
||||||
if (nearest[sampleI].second().second() == Pstream::myProcNo())
|
if (nearest[sampleI].second().second() == Pstream::myProcNo())
|
||||||
{
|
{
|
||||||
// Store the face to sample
|
// Store the face to sample
|
||||||
faceList_[sampleI] = nearest[sampleI].first().index();
|
faceList_[sampleI] = nearest[sampleI].first().index();
|
||||||
|
label facei = faceList_[sampleI];
|
||||||
|
processor_[sampleI] = (facei != -1 ? Pstream::myProcNo() : -1);
|
||||||
}
|
}
|
||||||
|
reduce(processor_[sampleI], maxOp<label>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user