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:
@ -224,7 +224,7 @@ bool Foam::functionObjects::Curle::execute()
|
||||
pDash /= 4*mathematical::pi;
|
||||
|
||||
Pstream::listCombineGather(pDash, plusEqOp<scalar>());
|
||||
Pstream::listCombineScatter(pDash);
|
||||
Pstream::broadcast(pDash);
|
||||
|
||||
if (surfaceWriterPtr_)
|
||||
{
|
||||
|
||||
@ -88,9 +88,9 @@ bool Foam::functionObjects::columnAverage::columnAverageField
|
||||
|
||||
// Global sum
|
||||
Pstream::listCombineGather(regionField, plusEqOp<Type>());
|
||||
Pstream::listCombineScatter(regionField);
|
||||
Pstream::listCombineGather(regionCount, plusEqOp<label>());
|
||||
Pstream::listCombineScatter(regionCount);
|
||||
Pstream::broadcast(regionField);
|
||||
Pstream::broadcast(regionCount);
|
||||
|
||||
forAll(regionField, regioni)
|
||||
{
|
||||
|
||||
@ -334,7 +334,7 @@ void Foam::functionObjects::extractEulerianParticles::calculateAddressing
|
||||
// Create map from new regions to slots in particles list
|
||||
// - filter through new-to-new addressing to identify new particles
|
||||
Pstream::listCombineGather(newToNewRegion, maxEqOp<label>());
|
||||
Pstream::listCombineScatter(newToNewRegion);
|
||||
Pstream::broadcast(newToNewRegion);
|
||||
|
||||
label nParticle = -1;
|
||||
labelHashSet newRegions;
|
||||
@ -354,7 +354,7 @@ void Foam::functionObjects::extractEulerianParticles::calculateAddressing
|
||||
// Accumulate old region data or create a new particle if there is no
|
||||
// mapping from the old-to-new region
|
||||
Pstream::listCombineGather(oldToNewRegion, maxEqOp<label>());
|
||||
Pstream::listCombineScatter(oldToNewRegion);
|
||||
Pstream::broadcast(oldToNewRegion);
|
||||
List<eulerianParticle> newParticles(newRegionToParticleMap.size());
|
||||
forAll(oldToNewRegion, oldRegioni)
|
||||
{
|
||||
|
||||
@ -67,7 +67,7 @@ static Map<Type> regionSum(const regionSplit& regions, const Field<Type>& fld)
|
||||
}
|
||||
|
||||
Pstream::mapCombineGather(regionToSum, plusEqOp<Type>());
|
||||
Pstream::mapCombineScatter(regionToSum);
|
||||
Pstream::broadcast(regionToSum);
|
||||
|
||||
return regionToSum;
|
||||
}
|
||||
@ -216,7 +216,7 @@ Foam::functionObjects::regionSizeDistribution::findPatchRegions
|
||||
|
||||
// Make sure all the processors have the same set of regions
|
||||
Pstream::mapCombineGather(patchRegions, minEqOp<label>());
|
||||
Pstream::mapCombineScatter(patchRegions);
|
||||
Pstream::broadcast(patchRegions);
|
||||
|
||||
return patchRegions;
|
||||
}
|
||||
|
||||
@ -1065,8 +1065,8 @@ void Foam::functionObjects::forces::calcForcesMoment()
|
||||
|
||||
Pstream::listCombineGather(force_, plusEqOp<vectorField>());
|
||||
Pstream::listCombineGather(moment_, plusEqOp<vectorField>());
|
||||
Pstream::listCombineScatter(force_);
|
||||
Pstream::listCombineScatter(moment_);
|
||||
Pstream::broadcast(force_);
|
||||
Pstream::broadcast(moment_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -469,7 +469,7 @@ void Foam::functionObjects::propellerInfo::updateSampleDiskCells()
|
||||
}
|
||||
|
||||
Pstream::listCombineGather(pointMask_, orEqOp<bool>());
|
||||
Pstream::listCombineScatter(pointMask_);
|
||||
Pstream::broadcast(pointMask_);
|
||||
}
|
||||
|
||||
|
||||
@ -775,7 +775,7 @@ Foam::tmp<Foam::Field<Type>> Foam::functionObjects::propellerInfo::interpolate
|
||||
}
|
||||
|
||||
Pstream::listCombineGather(field, maxEqOp<Type>());
|
||||
Pstream::listCombineScatter(field);
|
||||
Pstream::broadcast(field);
|
||||
|
||||
return tfield;
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ Foam::wordList Foam::functionObjects::vtkCloud::writeFields
|
||||
|
||||
wordList fieldNames(obrTmp.names<IOField<Type>>());
|
||||
Pstream::combineGather(fieldNames, ListOps::uniqueEqOp<word>());
|
||||
Pstream::combineScatter(fieldNames);
|
||||
Pstream::broadcast(fieldNames);
|
||||
|
||||
// Consistent order on all processors
|
||||
Foam::sort(fieldNames);
|
||||
|
||||
@ -266,7 +266,7 @@ bool Foam::areaWrite::write()
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
Pstream::mapCombineGather(selected, HashSetOps::plusEqOp<word>());
|
||||
Pstream::mapCombineScatter(selected);
|
||||
Pstream::broadcast(selected);
|
||||
}
|
||||
|
||||
missed.clear();
|
||||
|
||||
@ -78,7 +78,7 @@ void Foam::areaWrite::performAction
|
||||
{
|
||||
// Synchronize names
|
||||
Pstream::combineGather(fieldNames, ListOps::uniqueEqOp<word>());
|
||||
Pstream::combineScatter(fieldNames);
|
||||
Pstream::broadcast(fieldNames);
|
||||
}
|
||||
|
||||
// Sort for consistent order on all processors
|
||||
|
||||
Reference in New Issue
Block a user