mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: prefer listReduce() to using listCombineReduce() when possible
- potentially allows access into the builtin MPI operations
This commit is contained in:
@ -661,8 +661,8 @@ void countExtrudePatches
|
||||
}
|
||||
// Synchronise decision. Actual numbers are not important, just make
|
||||
// sure that they're > 0 on all processors.
|
||||
Pstream::listCombineReduce(zoneSidePatch, plusEqOp<label>());
|
||||
Pstream::listCombineReduce(zoneZonePatch, plusEqOp<label>());
|
||||
Pstream::listReduce(zoneSidePatch, sumOp<label>());
|
||||
Pstream::listReduce(zoneZonePatch, sumOp<label>());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1081,7 +1081,7 @@ label findCorrespondingRegion
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineReduce(cellsInZone, plusEqOp<label>());
|
||||
Pstream::listReduce(cellsInZone, sumOp<label>());
|
||||
|
||||
// Pick region with largest overlap of zoneI
|
||||
label regionI = findMax(cellsInZone);
|
||||
|
||||
@ -186,7 +186,7 @@ int main(int argc, char *argv[])
|
||||
const label maxNProcs = returnReduce(maxIds.size(), maxOp<label>());
|
||||
maxIds.resize(maxNProcs, -1);
|
||||
|
||||
Pstream::listCombineReduce(maxIds, maxEqOp<label>());
|
||||
Pstream::listReduce(maxIds, maxOp<label>());
|
||||
|
||||
// From ids to count
|
||||
const labelList numIds = maxIds + 1;
|
||||
|
||||
@ -40,7 +40,7 @@ Foam::Field<T> Foam::channelIndex::regionSum(const Field<T>& cellField) const
|
||||
}
|
||||
|
||||
// Global sum
|
||||
Pstream::listCombineReduce(regionField, plusEqOp<T>());
|
||||
Pstream::listReduce(regionField, sumOp<T>());
|
||||
|
||||
return regionField;
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ void Foam::VF::raySearchEngine::createAgglomeration(const IOobject& io)
|
||||
Pstream::allGatherList(allSf_);
|
||||
Pstream::allGatherList(allAgg_);
|
||||
|
||||
Pstream::listCombineGather(patchAreas_, plusEqOp<scalar>());
|
||||
Pstream::listGather(patchAreas_, sumOp<scalar>());
|
||||
Pstream::broadcast(patchAreas_);
|
||||
|
||||
globalNumbering_ = globalIndex(nCoarseFace_);
|
||||
@ -262,8 +262,11 @@ void Foam::VF::raySearchEngine::createGeometry()
|
||||
Pstream::allGatherList(allCf_);
|
||||
Pstream::allGatherList(allSf_);
|
||||
|
||||
Pstream::listCombineGather(patchAreas_, plusEqOp<scalar>());
|
||||
Pstream::broadcast(patchAreas_);
|
||||
// Pstream::listCombineGather(patchAreas_, plusEqOp<scalar>());
|
||||
// Pstream::broadcast(patchAreas_);
|
||||
|
||||
// Basic type and op_sum, so can use listReduce (ie, mpiAllReduce)
|
||||
Pstream::listReduce(patchAreas_, sumOp<scalar>());
|
||||
|
||||
globalNumbering_ = globalIndex(nFace_);
|
||||
}
|
||||
|
||||
@ -407,7 +407,7 @@ bool setFaceFieldType
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineReduce(nChanged, plusEqOp<label>());
|
||||
Pstream::listReduce(nChanged, sumOp<label>());
|
||||
|
||||
auto& fieldBf = field.boundaryFieldRef();
|
||||
|
||||
|
||||
@ -464,7 +464,7 @@ Foam::labelList Foam::hexMeshSmootherMotionSolver::countZeroOrPos
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineReduce(n, plusEqOp<label>());
|
||||
Pstream::listReduce(n, sumOp<label>());
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
@ -440,7 +440,7 @@ Foam::scalar Foam::hexRef8::getLevel0EdgeLength() const
|
||||
|
||||
// Get the minimum per level over all processors. Note minimum so if
|
||||
// cells are not cubic we use the smallest edge side.
|
||||
Pstream::listCombineReduce(typEdgeLenSqr, minEqOp<scalar>());
|
||||
Pstream::listReduce(typEdgeLenSqr, minOp<scalar>());
|
||||
|
||||
if (debug)
|
||||
{
|
||||
@ -474,7 +474,7 @@ Foam::scalar Foam::hexRef8::getLevel0EdgeLength() const
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineReduce(maxEdgeLenSqr, maxEqOp<scalar>());
|
||||
Pstream::listReduce(maxEdgeLenSqr, maxOp<scalar>());
|
||||
|
||||
if (debug)
|
||||
{
|
||||
|
||||
@ -1108,7 +1108,7 @@ void Foam::fvMeshSubset::reset
|
||||
// Get patch sizes (up to nextPatchID).
|
||||
// Note that up to nextPatchID the globalPatchMap is an identity so
|
||||
// no need to index through that.
|
||||
Pstream::listCombineReduce(globalPatchSizes, plusEqOp<label>());
|
||||
Pstream::listReduce(globalPatchSizes, sumOp<label>());
|
||||
|
||||
// Now all processors have all the patchnames.
|
||||
// Decide: if all processors have the same patch names and size is zero
|
||||
|
||||
@ -222,7 +222,7 @@ bool Foam::functionObjects::Curle::execute()
|
||||
|
||||
pDash /= 4*mathematical::pi;
|
||||
|
||||
Pstream::listCombineReduce(pDash, plusEqOp<scalar>());
|
||||
Pstream::listReduce(pDash, sumOp<scalar>());
|
||||
|
||||
if (surfaceWriterPtr_)
|
||||
{
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018-2024 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -88,8 +88,8 @@ bool Foam::functionObjects::columnAverage::columnAverageField
|
||||
}
|
||||
|
||||
// Global sum
|
||||
Pstream::listCombineReduce(regionField, plusEqOp<Type>());
|
||||
Pstream::listCombineReduce(regionCount, plusEqOp<label>());
|
||||
Pstream::listReduce(regionField, sumOp<Type>());
|
||||
Pstream::listReduce(regionCount, sumOp<label>());
|
||||
|
||||
forAll(regionField, regioni)
|
||||
{
|
||||
|
||||
@ -329,7 +329,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::listCombineReduce(newToNewRegion, maxEqOp<label>());
|
||||
Pstream::listReduce(newToNewRegion, maxOp<label>());
|
||||
|
||||
label nParticle = -1;
|
||||
labelHashSet newRegions;
|
||||
@ -348,7 +348,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::listCombineReduce(oldToNewRegion, maxEqOp<label>());
|
||||
Pstream::listReduce(oldToNewRegion, maxOp<label>());
|
||||
|
||||
List<eulerianParticle> newParticles(newRegionToParticleMap.size());
|
||||
forAll(oldToNewRegion, oldRegioni)
|
||||
|
||||
@ -155,8 +155,8 @@ bool Foam::histogramModels::equalBinWidth::write(const bool log)
|
||||
dataCount[bini]++;
|
||||
}
|
||||
}
|
||||
Pstream::listCombineGather(dataNormalised, plusEqOp<scalar>());
|
||||
Pstream::listCombineGather(dataCount, plusEqOp<label>());
|
||||
Pstream::listGather(dataNormalised, sumOp<scalar>());
|
||||
Pstream::listGather(dataCount, sumOp<label>());
|
||||
|
||||
|
||||
// Write histogram data
|
||||
|
||||
@ -129,8 +129,8 @@ bool Foam::histogramModels::unequalBinWidth::write(const bool log)
|
||||
}
|
||||
}
|
||||
}
|
||||
Pstream::listCombineGather(dataNormalised, plusEqOp<scalar>());
|
||||
Pstream::listCombineGather(dataCount, plusEqOp<label>());
|
||||
Pstream::listGather(dataNormalised, sumOp<scalar>());
|
||||
Pstream::listGather(dataCount, sumOp<label>());
|
||||
|
||||
|
||||
// Write histogram data
|
||||
|
||||
@ -791,7 +791,7 @@ Foam::tmp<Foam::Field<Type>> Foam::functionObjects::propellerInfo::interpolate
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineReduce(field, maxEqOp<Type>());
|
||||
Pstream::listReduce(field, maxOp<Type>());
|
||||
|
||||
return tfield;
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ void Foam::ParticleZoneInfo<CloudType>::write()
|
||||
{
|
||||
// Find number of particles per proc
|
||||
labelList allMaxIDs(maxIDs_);
|
||||
Pstream::listCombineReduce(allMaxIDs, maxEqOp<label>());
|
||||
Pstream::listReduce(allMaxIDs, maxOp<label>());
|
||||
|
||||
// Combine into single list
|
||||
label n = returnReduce(data_.size(), sumOp<label>());
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2023 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -121,7 +121,7 @@ void Foam::CellZoneInjection<CloudType>::setPositions
|
||||
globalPositions.range(myProci)
|
||||
) = positions;
|
||||
|
||||
Pstream::listCombineReduce(allPositions, minEqOp<point>());
|
||||
Pstream::listReduce(allPositions, minOp<point>());
|
||||
|
||||
// Gather local cell tet and tet-point Ids, but leave non-local ids set -1
|
||||
SubList<label>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -372,28 +372,28 @@ void Foam::LocalInteraction<CloudType>::info()
|
||||
labelListList npe(nEscape_);
|
||||
forAll(npe, i)
|
||||
{
|
||||
Pstream::listCombineGather(npe[i], plusEqOp<label>());
|
||||
Pstream::listGather(npe[i], sumOp<label>());
|
||||
npe[i] = npe[i] + npe0[i];
|
||||
}
|
||||
|
||||
scalarListList mpe(massEscape_);
|
||||
forAll(mpe, i)
|
||||
{
|
||||
Pstream::listCombineGather(mpe[i], plusEqOp<scalar>());
|
||||
Pstream::listGather(mpe[i], sumOp<scalar>());
|
||||
mpe[i] = mpe[i] + mpe0[i];
|
||||
}
|
||||
|
||||
labelListList nps(nStick_);
|
||||
forAll(nps, i)
|
||||
{
|
||||
Pstream::listCombineGather(nps[i], plusEqOp<label>());
|
||||
Pstream::listGather(nps[i], sumOp<label>());
|
||||
nps[i] = nps[i] + nps0[i];
|
||||
}
|
||||
|
||||
scalarListList mps(massStick_);
|
||||
forAll(nps, i)
|
||||
{
|
||||
Pstream::listCombineGather(mps[i], plusEqOp<scalar>());
|
||||
Pstream::listGather(mps[i], sumOp<scalar>());
|
||||
mps[i] = mps[i] + mps0[i];
|
||||
}
|
||||
|
||||
|
||||
@ -379,28 +379,28 @@ void Foam::RecycleInteraction<CloudType>::info()
|
||||
|
||||
forAll(npr, i)
|
||||
{
|
||||
Pstream::listCombineGather(npr[i], plusEqOp<label>());
|
||||
Pstream::listGather(npr[i], sumOp<label>());
|
||||
npr[i] = npr[i] + npr0[i];
|
||||
}
|
||||
|
||||
scalarListList mpr(massRemoved_);
|
||||
forAll(mpr, i)
|
||||
{
|
||||
Pstream::listCombineGather(mpr[i], plusEqOp<scalar>());
|
||||
Pstream::listGather(mpr[i], sumOp<scalar>());
|
||||
mpr[i] = mpr[i] + mpr0[i];
|
||||
}
|
||||
|
||||
labelListList npi(nInjected_);
|
||||
forAll(npi, i)
|
||||
{
|
||||
Pstream::listCombineGather(npi[i], plusEqOp<label>());
|
||||
Pstream::listGather(npi[i], sumOp<label>());
|
||||
npi[i] = npi[i] + npi0[i];
|
||||
}
|
||||
|
||||
scalarListList mpi(massInjected_);
|
||||
forAll(mpi, i)
|
||||
{
|
||||
Pstream::listCombineGather(mpi[i], plusEqOp<scalar>());
|
||||
Pstream::listGather(mpi[i], sumOp<scalar>());
|
||||
mpi[i] = mpi[i] + mpi0[i];
|
||||
}
|
||||
|
||||
|
||||
@ -285,28 +285,28 @@ void Foam::StandardWallInteraction<CloudType>::info()
|
||||
|
||||
forAll(npe, i)
|
||||
{
|
||||
Pstream::listCombineGather(npe[i], plusEqOp<label>());
|
||||
Pstream::listGather(npe[i], sumOp<label>());
|
||||
npe[i] = npe[i] + npe0[i];
|
||||
}
|
||||
|
||||
scalarListList mpe(massEscape_);
|
||||
forAll(mpe, i)
|
||||
{
|
||||
Pstream::listCombineGather(mpe[i], plusEqOp<scalar>());
|
||||
Pstream::listGather(mpe[i], sumOp<scalar>());
|
||||
mpe[i] = mpe[i] + mpe0[i];
|
||||
}
|
||||
|
||||
labelListList nps(nStick_);
|
||||
forAll(nps, i)
|
||||
{
|
||||
Pstream::listCombineGather(nps[i], plusEqOp<label>());
|
||||
Pstream::listGather(nps[i], sumOp<label>());
|
||||
nps[i] = nps[i] + nps0[i];
|
||||
}
|
||||
|
||||
scalarListList mps(massStick_);
|
||||
forAll(nps, i)
|
||||
{
|
||||
Pstream::listCombineGather(mps[i], plusEqOp<scalar>());
|
||||
Pstream::listGather(mps[i], sumOp<scalar>());
|
||||
mps[i] = mps[i] + mps0[i];
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2024 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -878,7 +878,7 @@ Foam::List<Foam::scalar> Foam::lumpedPointMovement::areas
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineReduce(zoneAreas, plusEqOp<scalar>());
|
||||
Pstream::listReduce(zoneAreas, sumOp<scalar>());
|
||||
|
||||
return zoneAreas;
|
||||
}
|
||||
@ -1006,8 +1006,8 @@ bool Foam::lumpedPointMovement::forcesAndMoments
|
||||
Info<<"No pressure field" << endl;
|
||||
}
|
||||
|
||||
Pstream::listCombineReduce(forces, plusEqOp<vector>());
|
||||
Pstream::listCombineReduce(moments, plusEqOp<vector>());
|
||||
Pstream::listReduce(forces, sumOp<vector>());
|
||||
Pstream::listReduce(moments, sumOp<vector>());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2050,7 +2050,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance
|
||||
labelList nProcCells(distributor.countCells(distribution));
|
||||
Pout<< "Wanted distribution:" << nProcCells << endl;
|
||||
|
||||
Pstream::listCombineReduce(nProcCells, plusEqOp<label>());
|
||||
Pstream::listReduce(nProcCells, sumOp<label>());
|
||||
|
||||
Pout<< "Wanted resulting decomposition:" << endl;
|
||||
forAll(nProcCells, proci)
|
||||
@ -3611,7 +3611,7 @@ const
|
||||
nCells[cellLevel[celli]]++;
|
||||
}
|
||||
|
||||
Pstream::listCombineGather(nCells, plusEqOp<label>());
|
||||
Pstream::listGather(nCells, sumOp<label>());
|
||||
|
||||
/// Pstream::broadcast(nCells);
|
||||
if (Pstream::master())
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2024 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -867,7 +867,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createZoneBaffles
|
||||
|
||||
if (nTotalBaffles > 0)
|
||||
{
|
||||
Pstream::listCombineReduce(nBaffles, plusEqOp<label>());
|
||||
Pstream::listReduce(nBaffles, sumOp<label>());
|
||||
|
||||
Info<< nl
|
||||
<< setf(ios_base::left)
|
||||
@ -2001,7 +2001,7 @@ void Foam::meshRefinement::findCellZoneTopo
|
||||
// - region numbers are identical on all processors
|
||||
// - keepRegion is identical ,,
|
||||
// - cellZones are identical ,,
|
||||
Pstream::listCombineReduce(regionToCellZone, maxEqOp<label>());
|
||||
Pstream::listReduce(regionToCellZone, maxOp<label>());
|
||||
|
||||
|
||||
// Find the region containing the keepPoint
|
||||
@ -2051,7 +2051,7 @@ void Foam::meshRefinement::findCellZoneTopo
|
||||
// - cellZones are identical ,,
|
||||
// This done at top of loop to account for geometric matching
|
||||
// not being synchronised.
|
||||
Pstream::listCombineReduce(regionToCellZone, maxEqOp<label>());
|
||||
Pstream::listReduce(regionToCellZone, maxOp<label>());
|
||||
|
||||
|
||||
bool changed = false;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2024 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -3403,9 +3403,9 @@ void Foam::snappyRefineDriver::deleteSmallRegions
|
||||
nCellsPerRegion[regioni]++;
|
||||
nCellsPerZone[zonei]++;
|
||||
}
|
||||
Pstream::listCombineReduce(nCellsPerRegion, plusEqOp<label>());
|
||||
Pstream::listCombineReduce(regionToZone, maxEqOp<label>());
|
||||
Pstream::listCombineReduce(nCellsPerZone, plusEqOp<label>());
|
||||
Pstream::listReduce(nCellsPerRegion, sumOp<label>());
|
||||
Pstream::listReduce(regionToZone, maxOp<label>());
|
||||
Pstream::listReduce(nCellsPerZone, sumOp<label>());
|
||||
|
||||
|
||||
// Mark small regions. Note that all processors have the same information
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 OpenFOAM Foundation
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -258,7 +258,7 @@ void Foam::planeToFaceZone::combine(faceZoneSet& fzSet, const bool add) const
|
||||
{
|
||||
++ regionNFaces[regioni];
|
||||
}
|
||||
Pstream::listCombineReduce(regionNFaces, plusEqOp<label>());
|
||||
Pstream::listReduce(regionNFaces, sumOp<label>());
|
||||
|
||||
Info<< " Found " << nRegions << " contiguous regions with "
|
||||
<< regionNFaces << " faces" << endl;
|
||||
@ -281,8 +281,8 @@ void Foam::planeToFaceZone::combine(faceZoneSet& fzSet, const bool add) const
|
||||
regionWeights[regioni] += w;
|
||||
regionCentres[regioni] += w*c;
|
||||
}
|
||||
Pstream::listCombineGather(regionWeights, plusEqOp<scalar>());
|
||||
Pstream::listCombineGather(regionCentres, plusEqOp<point>());
|
||||
Pstream::listGather(regionWeights, sumOp<scalar>());
|
||||
Pstream::listGather(regionCentres, sumOp<point>());
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
|
||||
@ -597,7 +597,7 @@ void Foam::MMA::computeNewtonDirection()
|
||||
if (globalSum_)
|
||||
{
|
||||
reduce(lhs, sumOp<scalarSquareMatrix>());
|
||||
Pstream::listCombineAllGather(rhs, plusEqOp<scalar>());
|
||||
Pstream::listReduce(rhs, sumOp<scalar>());
|
||||
}
|
||||
|
||||
// Add remaining parts from deltaLamdaYTilda and the deltaZ eqn
|
||||
|
||||
@ -1181,7 +1181,7 @@ Foam::vectorField Foam::NURBS3DVolume::computeControlPointSensitivities
|
||||
}
|
||||
|
||||
// Sum contributions from all processors
|
||||
Pstream::listCombineReduce(controlPointDerivs, plusEqOp<vector>());
|
||||
Pstream::listReduce(controlPointDerivs, sumOp<vector>());
|
||||
|
||||
return controlPointDerivs;
|
||||
}
|
||||
@ -1266,7 +1266,7 @@ Foam::vectorField Foam::NURBS3DVolume::computeControlPointSensitivities
|
||||
}
|
||||
}
|
||||
// Sum contributions from all processors
|
||||
Pstream::listCombineReduce(controlPointDerivs, plusEqOp<vector>());
|
||||
Pstream::listReduce(controlPointDerivs, sumOp<vector>());
|
||||
|
||||
return controlPointDerivs;
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2014-2023 OpenCFD Ltd.
|
||||
Copyright (C) 2014-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -227,7 +227,7 @@ void Foam::cellCellStencils::cellVolumeWeight::findHoles
|
||||
{
|
||||
// Synchronise region status on processors
|
||||
// (could instead swap status through processor patches)
|
||||
Pstream::listCombineReduce(regionType, maxEqOp<label>());
|
||||
Pstream::listReduce(regionType, maxOp<label>());
|
||||
|
||||
// Communicate region status through interpolative cells
|
||||
labelList cellRegionType(labelUIndList(regionType, cellRegion));
|
||||
@ -602,7 +602,7 @@ bool Foam::cellCellStencils::cellVolumeWeight::update()
|
||||
{
|
||||
nCellsPerZone[zoneID[cellI]]++;
|
||||
}
|
||||
Pstream::listCombineReduce(nCellsPerZone, plusEqOp<label>());
|
||||
Pstream::listReduce(nCellsPerZone, sumOp<label>());
|
||||
|
||||
Info<< typeName << " : detected " << nZones
|
||||
<< " mesh regions" << nl << endl;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2023 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -1107,7 +1107,7 @@ void Foam::cellCellStencils::inverseDistance::findHoles
|
||||
{
|
||||
// Synchronise region status on processors
|
||||
// (could instead swap status through processor patches)
|
||||
Pstream::listCombineReduce(regionType, maxEqOp<label>());
|
||||
Pstream::listReduce(regionType, maxOp<label>());
|
||||
|
||||
DebugInfo<< FUNCTION_NAME << " : Gathered region type" << endl;
|
||||
|
||||
@ -1801,7 +1801,7 @@ bool Foam::cellCellStencils::inverseDistance::update()
|
||||
{
|
||||
nCellsPerZone[zoneID[cellI]]++;
|
||||
}
|
||||
Pstream::listCombineReduce(nCellsPerZone, plusEqOp<label>());
|
||||
Pstream::listReduce(nCellsPerZone, sumOp<label>());
|
||||
|
||||
const boundBox& allBb = mesh_.bounds();
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2023 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -519,7 +519,7 @@ Foam::cellCellStencils::trackingInverseDistance::trackingInverseDistance
|
||||
{
|
||||
nCellsPerZone[zoneID[celli]]++;
|
||||
}
|
||||
Pstream::listCombineReduce(nCellsPerZone, plusEqOp<label>());
|
||||
Pstream::listReduce(nCellsPerZone, sumOp<label>());
|
||||
|
||||
meshParts_.setSize(nZones);
|
||||
forAll(meshParts_, zonei)
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016 OpenCFD Ltd.
|
||||
Copyright (C) 2016,2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -188,7 +188,7 @@ void Foam::setRefCells
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineReduce(hasRef, plusEqOp<label>());
|
||||
Pstream::listReduce(hasRef, sumOp<label>());
|
||||
|
||||
forAll(hasRef, regionI)
|
||||
{
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2024 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -420,8 +420,8 @@ void Foam::multiLevelDecomp::decompose
|
||||
);
|
||||
|
||||
label nPoints = returnReduce(domainPoints.size(), sumOp<label>());
|
||||
Pstream::listReduce(nOutsideConnections, sumOp<label>());
|
||||
|
||||
Pstream::listCombineReduce(nOutsideConnections, plusEqOp<label>());
|
||||
label nPatches = 0;
|
||||
label nFaces = 0;
|
||||
for (const label nConnect : nOutsideConnections)
|
||||
@ -528,11 +528,7 @@ void Foam::multiLevelDecomp::decompose
|
||||
}
|
||||
|
||||
reduce(nPoints, sumOp<label>());
|
||||
Pstream::listCombineReduce
|
||||
(
|
||||
nOutsideConnections,
|
||||
plusEqOp<label>()
|
||||
);
|
||||
Pstream::listReduce(nOutsideConnections, sumOp<label>());
|
||||
|
||||
label nPatches = 0;
|
||||
label nFaces = 0;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -144,7 +144,7 @@ void Foam::regionModels::singleLayerRegion::initialise()
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineReduce(passivePatchIDs_, maxEqOp<label>());
|
||||
Pstream::listReduce(passivePatchIDs_, maxOp<label>());
|
||||
|
||||
magSf.field() = 0.5*(magSf + passiveMagSf);
|
||||
magSf.correctBoundaryConditions();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -84,8 +84,8 @@ void Foam::cloudSet::calcSamples
|
||||
minFoundProc[i] = foundProc[i];
|
||||
}
|
||||
}
|
||||
Pstream::listCombineReduce(minFoundProc, minEqOp<label>());
|
||||
Pstream::listCombineReduce(maxFoundProc, maxEqOp<label>());
|
||||
Pstream::listReduce(minFoundProc, minOp<label>());
|
||||
Pstream::listReduce(maxFoundProc, maxOp<label>());
|
||||
|
||||
|
||||
DynamicField<point> missingPoints(sampleCoords_.size());
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -142,8 +142,8 @@ void Foam::distanceSurface::filterKeepLargestRegion
|
||||
}
|
||||
}
|
||||
|
||||
// Sum totals from all processors
|
||||
Pstream::listCombineGather(nCutsPerRegion, plusEqOp<label>());
|
||||
// Sum totals from all processors (onto the master)
|
||||
Pstream::listGather(nCutsPerRegion, sumOp<label>());
|
||||
|
||||
|
||||
// Define which regions to keep
|
||||
@ -242,8 +242,8 @@ void Foam::distanceSurface::filterKeepNearestRegions
|
||||
}
|
||||
}
|
||||
|
||||
// Sum totals from all processors
|
||||
Pstream::listCombineGather(nCutsPerRegion, plusEqOp<label>());
|
||||
// Sum totals from all processors (onto the master)
|
||||
Pstream::listGather(nCutsPerRegion, sumOp<label>());
|
||||
|
||||
// Get nearest
|
||||
Pstream::listCombineGather(nearest, minFirstEqOp<scalar>());
|
||||
@ -355,8 +355,8 @@ void Foam::distanceSurface::filterRegionProximity
|
||||
areaRegion[regioni] += (faceArea);
|
||||
}
|
||||
|
||||
Pstream::listCombineGather(distRegion, plusEqOp<scalar>());
|
||||
Pstream::listCombineGather(areaRegion, plusEqOp<scalar>());
|
||||
Pstream::listGather(distRegion, sumOp<scalar>());
|
||||
Pstream::listGather(areaRegion, sumOp<scalar>());
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2024 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -256,7 +256,7 @@ void Foam::isoSurfacePoint::syncUnseparatedPoints
|
||||
}
|
||||
|
||||
// Globally consistent
|
||||
Pstream::listCombineReduce(sharedPts, minEqOp<point>());
|
||||
Pstream::listReduce(sharedPts, minOp<point>());
|
||||
|
||||
// Now we will all have the same information. Merge it back with
|
||||
// my local information.
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -327,7 +327,7 @@ void Foam::faceReflecting::calculate()
|
||||
// Distribute ray indexes to all proc's
|
||||
// Make sure all the processors have the same information
|
||||
|
||||
Pstream::listCombineReduce(refDisDirsIndex, maxEqOp<label>());
|
||||
Pstream::listReduce(refDisDirsIndex, maxOp<label>());
|
||||
Pstream::mapCombineReduce(refFacesDirIndex, minEqOp<label>());
|
||||
|
||||
const scalar maxBounding =
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -969,9 +969,9 @@ void Foam::radiation::viewFactor::calculate()
|
||||
qrExt[compactGlobalIds[i]] = compactCoarseHo[i];
|
||||
}
|
||||
|
||||
Pstream::listCombineReduce(T4, maxEqOp<scalar>());
|
||||
Pstream::listCombineReduce(E, maxEqOp<scalar>());
|
||||
Pstream::listCombineReduce(qrExt, maxEqOp<scalar>());
|
||||
Pstream::listReduce(T4, maxOp<scalar>());
|
||||
Pstream::listReduce(E, maxOp<scalar>());
|
||||
Pstream::listReduce(qrExt, maxOp<scalar>());
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user