mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: more consistent use of broadcast, combineReduce etc.
- broadcast : (replaces scatter)
- combineReduce == combineGather + broadcast
- listCombineReduce == listCombineGather + broadcast
- mapCombineReduce == mapCombineGather + broadcast
- allGatherList == gatherList + scatterList
Before settling on a more consistent naming convention,
some intermediate namings were used in OpenFOAM-v2206:
- combineReduce (2206: combineAllGather)
- listCombineReduce (2206: listCombineAllGather)
- mapCombineReduce (2206: mapCombineAllGather)
This commit is contained in:
committed by
Andrew Heather
parent
b9c15b8585
commit
473e14418a
@ -166,7 +166,7 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
|
||||
|
||||
|
||||
// Find nearest - globally consistent
|
||||
Pstream::listCombineAllGather(nearest, mappedPatchBase::nearestEqOp());
|
||||
Pstream::listCombineReduce(nearest, mappedPatchBase::nearestEqOp());
|
||||
|
||||
oldPoints_.resize(this->size());
|
||||
|
||||
|
||||
@ -111,7 +111,7 @@ Foam::patchProbes::sample(const VolumeField<Type>& vField) const
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineAllGather(values, isNotEqOp<Type>());
|
||||
Pstream::listCombineReduce(values, isNotEqOp<Type>());
|
||||
|
||||
return tvalues;
|
||||
}
|
||||
@ -141,7 +141,7 @@ Foam::patchProbes::sample(const SurfaceField<Type>& sField) const
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineAllGather(values, isNotEqOp<Type>());
|
||||
Pstream::listCombineReduce(values, isNotEqOp<Type>());
|
||||
|
||||
return tvalues;
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ Foam::probes::sample(const VolumeField<Type>& vField) const
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineAllGather(values, isNotEqOp<Type>());
|
||||
Pstream::listCombineReduce(values, isNotEqOp<Type>());
|
||||
|
||||
return tvalues;
|
||||
}
|
||||
@ -248,7 +248,7 @@ Foam::probes::sample(const SurfaceField<Type>& sField) const
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineAllGather(values, isNotEqOp<Type>());
|
||||
Pstream::listCombineReduce(values, isNotEqOp<Type>());
|
||||
|
||||
return tvalues;
|
||||
}
|
||||
|
||||
@ -84,8 +84,8 @@ void Foam::cloudSet::calcSamples
|
||||
minFoundProc[i] = foundProc[i];
|
||||
}
|
||||
}
|
||||
Pstream::listCombineAllGather(minFoundProc, minEqOp<label>());
|
||||
Pstream::listCombineAllGather(maxFoundProc, maxEqOp<label>());
|
||||
Pstream::listCombineReduce(minFoundProc, minEqOp<label>());
|
||||
Pstream::listCombineReduce(maxFoundProc, maxEqOp<label>());
|
||||
|
||||
|
||||
DynamicField<point> missingPoints(sampleCoords_.size());
|
||||
|
||||
@ -155,7 +155,7 @@ void Foam::patchCloudSet::calcSamples
|
||||
|
||||
|
||||
// Find nearest - globally consistent
|
||||
Pstream::listCombineAllGather(nearest, mappedPatchBase::nearestEqOp());
|
||||
Pstream::listCombineReduce(nearest, mappedPatchBase::nearestEqOp());
|
||||
|
||||
|
||||
if (debug && Pstream::master())
|
||||
|
||||
@ -178,11 +178,7 @@ void Foam::patchSeedSet::calcSamples
|
||||
// 2. Reduce on master. Select nearest processor.
|
||||
|
||||
// Find nearest - globally consistent
|
||||
Pstream::listCombineAllGather
|
||||
(
|
||||
nearest,
|
||||
mappedPatchBase::nearestEqOp()
|
||||
);
|
||||
Pstream::listCombineReduce(nearest, mappedPatchBase::nearestEqOp());
|
||||
|
||||
// 3. Pick up my local faces that have won
|
||||
|
||||
|
||||
@ -196,7 +196,7 @@ Foam::IOobjectList Foam::sampledSets::preCheckFields(unsigned request)
|
||||
|
||||
// Parallel consistency (no-op in serial)
|
||||
// Probably not needed...
|
||||
/// Pstream::mapCombineAllGather(selected, HashSetOps::plusEqOp<word>());
|
||||
/// Pstream::mapCombineReduce(selected, HashSetOps::plusEqOp<word>());
|
||||
|
||||
|
||||
DynamicList<label> missed(fieldSelection_.size());
|
||||
|
||||
@ -264,7 +264,7 @@ void Foam::shortestPathSet::sync
|
||||
celli,
|
||||
Tuple2<point, bool>(origin, findMinDistance)
|
||||
);
|
||||
Pstream::combineAllGather
|
||||
Pstream::combineReduce
|
||||
(
|
||||
searchData,
|
||||
[](ProcData& x, const ProcData& y)
|
||||
|
||||
@ -227,7 +227,7 @@ bool Foam::sampledMeshedSurface::update(const meshSearch& meshSearcher)
|
||||
// See which processor has the nearest. Mark and subset
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Pstream::listCombineAllGather(nearest, minFirstEqOp<scalar>{});
|
||||
Pstream::listCombineReduce(nearest, minFirstEqOp<scalar>{});
|
||||
|
||||
labelList cellOrFaceLabels(fc.size(), -1);
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ Foam::IOobjectList Foam::sampledSurfaces::preCheckFields()
|
||||
}
|
||||
|
||||
// Parallel consistency (no-op in serial)
|
||||
Pstream::mapCombineAllGather(selected, HashSetOps::plusEqOp<word>());
|
||||
Pstream::mapCombineReduce(selected, HashSetOps::plusEqOp<word>());
|
||||
|
||||
|
||||
DynamicList<label> missed(fieldSelection_.size());
|
||||
|
||||
@ -262,7 +262,7 @@ void Foam::isoSurfacePoint::syncUnseparatedPoints
|
||||
}
|
||||
|
||||
// Globally consistent
|
||||
Pstream::listCombineAllGather(sharedPts, minEqOp<point>());
|
||||
Pstream::listCombineReduce(sharedPts, minEqOp<point>());
|
||||
|
||||
// Now we will all have the same information. Merge it back with
|
||||
// my local information.
|
||||
|
||||
Reference in New Issue
Block a user