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:
Mark Olesen
2022-03-10 21:54:52 +01:00
parent de8ef5332d
commit 62fc3bbc33
68 changed files with 153 additions and 148 deletions

View File

@ -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_)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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_);
}

View File

@ -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;
}

View File

@ -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);

View File

@ -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();

View File

@ -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