ENH: add simplified gather methods for globalIndex with default communicator
- when combining lists in processor order this simplifies code and reduces memory overhead. Write this: ---- labelList collected; const globalIndex sizing(input.size()); sizing.gather(input, collected); ---- OR ---- labelList collected; globalIndex::gatherOp(input, collected); ---- Instead of this: ---- labelList collected; List<labelList> scratch(Pstream::nProcs()); scratch[Pstream::myProcNo()] = input; Pstream::gatherList(scratch); if (Pstream::master()) { collected = ListListOps::combine<labelList> ( scratch, accessOp<labelList>() ); } scratch.clear(); ----
Showing
- applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C 2 additions, 24 deletions...ons/utilities/mesh/manipulation/checkMesh/checkGeometry.C
- applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C 3 additions, 12 deletions...ities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C
- src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H 17 additions, 19 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/UPstream.H
- src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.C 14 additions, 22 deletionssrc/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.C
- src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H 78 additions, 13 deletionssrc/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H
- src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H 12 additions, 6 deletionssrc/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H
- src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C 104 additions, 5 deletions...OAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C
- src/functionObjects/field/AMIWeights/AMIWeights.C 3 additions, 23 deletionssrc/functionObjects/field/AMIWeights/AMIWeights.C
- src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C 2 additions, 6 deletions...sh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C
Please register or sign in to comment