mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: broadcast instead of combineScatter/listCombineScatter/mapCombineScatter
- these are the same thing now and 'broadcast' expresses the intention more directly/consistently
This commit is contained in:
@ -167,7 +167,7 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
|
||||
|
||||
// Find nearest.
|
||||
Pstream::listCombineGather(nearest, mappedPatchBase::nearestEqOp());
|
||||
Pstream::listCombineScatter(nearest);
|
||||
Pstream::broadcast(nearest);
|
||||
|
||||
oldPoints_.resize(this->size());
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ Foam::patchProbes::sample(const VolumeField<Type>& vField) const
|
||||
}
|
||||
|
||||
Pstream::listCombineGather(values, isNotEqOp<Type>());
|
||||
Pstream::listCombineScatter(values);
|
||||
Pstream::broadcast(values);
|
||||
|
||||
return tvalues;
|
||||
}
|
||||
@ -143,7 +143,7 @@ Foam::patchProbes::sample(const SurfaceField<Type>& sField) const
|
||||
}
|
||||
|
||||
Pstream::listCombineGather(values, isNotEqOp<Type>());
|
||||
Pstream::listCombineScatter(values);
|
||||
Pstream::broadcast(values);
|
||||
|
||||
return tvalues;
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ Foam::probes::sample(const VolumeField<Type>& vField) const
|
||||
}
|
||||
|
||||
Pstream::listCombineGather(values, isNotEqOp<Type>());
|
||||
Pstream::listCombineScatter(values);
|
||||
Pstream::broadcast(values);
|
||||
|
||||
return tvalues;
|
||||
}
|
||||
@ -250,7 +250,7 @@ Foam::probes::sample(const SurfaceField<Type>& sField) const
|
||||
}
|
||||
|
||||
Pstream::listCombineGather(values, isNotEqOp<Type>());
|
||||
Pstream::listCombineScatter(values);
|
||||
Pstream::broadcast(values);
|
||||
|
||||
return tvalues;
|
||||
}
|
||||
|
||||
@ -76,9 +76,6 @@ void Foam::cloudSet::calcSamples
|
||||
|
||||
// Check that all have been found
|
||||
labelList maxFoundProc(foundProc);
|
||||
Pstream::listCombineGather(maxFoundProc, maxEqOp<label>());
|
||||
Pstream::listCombineScatter(maxFoundProc);
|
||||
|
||||
labelList minFoundProc(foundProc.size(), labelMax);
|
||||
forAll(foundProc, i)
|
||||
{
|
||||
@ -88,7 +85,10 @@ void Foam::cloudSet::calcSamples
|
||||
}
|
||||
}
|
||||
Pstream::listCombineGather(minFoundProc, minEqOp<label>());
|
||||
Pstream::listCombineScatter(minFoundProc);
|
||||
Pstream::listCombineGather(maxFoundProc, maxEqOp<label>());
|
||||
|
||||
Pstream::broadcast(minFoundProc);
|
||||
Pstream::broadcast(maxFoundProc);
|
||||
|
||||
|
||||
DynamicField<point> missingPoints(sampleCoords_.size());
|
||||
|
||||
@ -156,7 +156,7 @@ void Foam::patchCloudSet::calcSamples
|
||||
|
||||
// Find nearest.
|
||||
Pstream::listCombineGather(nearest, mappedPatchBase::nearestEqOp());
|
||||
Pstream::listCombineScatter(nearest);
|
||||
Pstream::broadcast(nearest);
|
||||
|
||||
|
||||
if (debug && Pstream::master())
|
||||
|
||||
@ -179,7 +179,7 @@ void Foam::patchSeedSet::calcSamples
|
||||
|
||||
// Find nearest. Combine on master.
|
||||
Pstream::listCombineGather(nearest, mappedPatchBase::nearestEqOp());
|
||||
Pstream::listCombineScatter(nearest);
|
||||
Pstream::broadcast(nearest);
|
||||
|
||||
|
||||
// 3. Pick up my local faces that have won
|
||||
|
||||
@ -203,7 +203,7 @@ Foam::IOobjectList Foam::sampledSets::preCheckFields(unsigned request)
|
||||
// if (Pstream::parRun())
|
||||
// {
|
||||
// Pstream::mapCombineGather(selected, HashSetOps::plusEqOp<word>());
|
||||
// Pstream::mapCombineScatter(selected);
|
||||
// Pstream::broadcast(selected);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ void Foam::sampledSets::writeCoordSet
|
||||
{
|
||||
outputName = writer.write(fieldName, values);
|
||||
}
|
||||
Pstream::scatter(outputName);
|
||||
UPstream::broadcast(outputName);
|
||||
|
||||
if (outputName.size())
|
||||
{
|
||||
@ -207,9 +207,9 @@ void Foam::sampledSets::performAction
|
||||
// Use sorted order
|
||||
values = UIndirectList<Type>(values, globOrder)();
|
||||
}
|
||||
Pstream::scatter(avgValue);
|
||||
Pstream::scatter(sizeValue);
|
||||
Pstream::scatter(limits);
|
||||
Pstream::broadcast(avgValue);
|
||||
Pstream::broadcast(sizeValue);
|
||||
Pstream::broadcast(limits);
|
||||
|
||||
// Store results: min/max/average/size with the name of the set
|
||||
// for scoping.
|
||||
@ -261,9 +261,9 @@ void Foam::sampledSets::performAction
|
||||
|
||||
if (size())
|
||||
{
|
||||
Pstream::scatter(avgEnsemble);
|
||||
Pstream::scatter(sizeEnsemble);
|
||||
Pstream::scatter(limitsEnsemble);
|
||||
Pstream::broadcast(avgEnsemble);
|
||||
Pstream::broadcast(sizeEnsemble);
|
||||
Pstream::broadcast(limitsEnsemble);
|
||||
|
||||
// Store results: min/max/average/size for the ensemble
|
||||
// Eg, average(T) ...
|
||||
|
||||
@ -228,7 +228,7 @@ bool Foam::sampledMeshedSurface::update(const meshSearch& meshSearcher)
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Pstream::listCombineGather(nearest, minFirstEqOp<scalar>{});
|
||||
Pstream::listCombineScatter(nearest);
|
||||
Pstream::broadcast(nearest);
|
||||
|
||||
labelList cellOrFaceLabels(fc.size(), -1);
|
||||
|
||||
|
||||
@ -121,7 +121,7 @@ Foam::IOobjectList Foam::sampledSurfaces::preCheckFields()
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
Pstream::mapCombineGather(selected, HashSetOps::plusEqOp<word>());
|
||||
Pstream::mapCombineScatter(selected);
|
||||
Pstream::broadcast(selected);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -171,7 +171,7 @@ void Foam::distanceSurface::filterKeepLargestRegion
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::scatter(keepRegion);
|
||||
Pstream::broadcast(keepRegion);
|
||||
|
||||
forAll(regionColour, celli)
|
||||
{
|
||||
@ -295,7 +295,7 @@ void Foam::distanceSurface::filterKeepNearestRegions
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::scatter(keepRegion);
|
||||
Pstream::broadcast(keepRegion);
|
||||
|
||||
forAll(regionColour, celli)
|
||||
{
|
||||
@ -366,7 +366,7 @@ void Foam::distanceSurface::filterRegionProximity
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineScatter(distRegion);
|
||||
Pstream::broadcast(distRegion);
|
||||
|
||||
|
||||
// Define the per-face acceptance based on the region average distance
|
||||
|
||||
@ -278,7 +278,7 @@ void Foam::isoSurfacePoint::syncUnseparatedPoints
|
||||
|
||||
// Combine on master.
|
||||
Pstream::listCombineGather(sharedPts, minEqOp<point>());
|
||||
Pstream::listCombineScatter(sharedPts);
|
||||
Pstream::broadcast(sharedPts);
|
||||
|
||||
// Now we will all have the same information. Merge it back with
|
||||
// my local information.
|
||||
|
||||
Reference in New Issue
Block a user