diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C index f3782b6aaa..e063318239 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C @@ -1981,7 +1981,7 @@ Foam::pointField Foam::globalMeshData::geometricSharedPoints() const pointField sharedPoints(mesh_.points(), sharedPointLabels()); // Append from all processors - combineReduce(sharedPoints, ListPlusEqOp()); + combineReduce(sharedPoints, ListOps::appendEqOp()); // Merge tolerance scalar tolDim = matchTol_ * mesh_.bounds().mag(); diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H index e507211cfd..2b90e7504e 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -92,7 +93,7 @@ SourceFiles namespace Foam { -// Forward declarations +// Forward Declarations class polyMesh; class mapDistribute; template class EdgeMap; @@ -108,8 +109,7 @@ class globalMeshData : public processorTopology { - - // Private data + // Private Data //- Reference to mesh const polyMesh& mesh_; @@ -252,7 +252,7 @@ class globalMeshData //- Calculate shared edge addressing void calcSharedEdges() const; - //- Calculate global point addressing. + //- Calculate global point addressing. void calcGlobalPointSlaves() const; // Global edge addressing @@ -314,29 +314,6 @@ class globalMeshData public: - // Public class - - // To combineReduce a List. Just appends all lists. - template - class ListPlusEqOp - { - - public: - - void operator()(T& x, const T& y) const - { - label n = x.size(); - - x.setSize(x.size() + y.size()); - - forAll(y, i) - { - x[n++] = y[i]; - } - } - }; - - //- Runtime type information ClassName("globalMeshData"); @@ -615,6 +592,34 @@ public: // full parallel analysis to determine shared points and // boundaries. void updateMesh(); + + + // Housekeeping + + //- Deprecated(2020-09) use ListOps::appendEqOp + // Uses a different template parameter + // \code + // globalMeshData::ListPlusEqOp() + // ListOps::appendEqOp