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
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -302,17 +302,19 @@ int main(int argc, char *argv[])
|
||||
Pstream::mapCombineGather(patchSize, plusEqOp<label>());
|
||||
Pstream::mapCombineGather(zoneSize, plusEqOp<label>());
|
||||
|
||||
// Allocate compact numbering for all patches/faceZones
|
||||
forAllConstIters(patchSize, iter)
|
||||
if (Pstream::master())
|
||||
{
|
||||
compactZoneID.insert(iter.key(), compactZoneID.size());
|
||||
}
|
||||
// Allocate compact numbering for all patches/faceZones
|
||||
forAllConstIters(patchSize, iter)
|
||||
{
|
||||
compactZoneID.insert(iter.key(), compactZoneID.size());
|
||||
}
|
||||
|
||||
forAllConstIters(zoneSize, iter)
|
||||
{
|
||||
compactZoneID.insert(iter.key(), compactZoneID.size());
|
||||
forAllConstIters(zoneSize, iter)
|
||||
{
|
||||
compactZoneID.insert(iter.key(), compactZoneID.size());
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::broadcast(compactZoneID);
|
||||
|
||||
|
||||
@ -391,13 +393,9 @@ int main(int argc, char *argv[])
|
||||
// Gather all faces
|
||||
List<faceList> gatheredFaces(Pstream::nProcs());
|
||||
gatheredFaces[Pstream::myProcNo()] = allBoundary.localFaces();
|
||||
forAll(gatheredFaces[Pstream::myProcNo()], i)
|
||||
for (face& f : gatheredFaces[Pstream::myProcNo()])
|
||||
{
|
||||
inplaceRenumber
|
||||
(
|
||||
pointToGlobal,
|
||||
gatheredFaces[Pstream::myProcNo()][i]
|
||||
);
|
||||
inplaceRenumber(pointToGlobal, f);
|
||||
}
|
||||
Pstream::gatherList(gatheredFaces);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user