From 6b6b36afd3999c741840b0b98392610a0864fda9 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Tue, 29 May 2018 17:38:02 +0200 Subject: [PATCH] STYLE: revert bitSet/HashSet setMany() to set() method (issue #837) - improves backward compatibility and more naming consistency. Retain setMany(iter1, iter2) to avoid ambiguity with the PackedList::set(index, value) method. --- applications/test/HashSet/Test-hashSet.C | 6 +-- applications/test/bitSet2/Test-bitSet2.C | 2 +- applications/test/edges/Test-edges.C | 6 +-- .../mesh/advanced/modifyMesh/cellSplitter.C | 2 +- .../refineWallLayer/refineWallLayer.C | 4 +- .../refinementLevel/refinementLevel.C | 2 +- .../mesh/advanced/splitCells/splitCells.C | 2 +- .../ideasUnvToFoam/ideasUnvToFoam.C | 2 +- .../conversion/writeMeshObj/writeMeshObj.C | 2 +- .../extrude/extrudeMesh/extrudeMesh.C | 2 +- .../extrudeToRegionMesh/extrudeToRegionMesh.C | 4 +- .../conformalVoronoiMeshCalcDualMesh.C | 16 ++++---- .../conformalVoronoiMeshIO.C | 2 +- .../manipulation/polyDualMesh/meshDualiser.C | 2 +- .../mesh/manipulation/refineMesh/refineMesh.C | 2 +- .../mesh/manipulation/splitMesh/regionSide.C | 2 +- .../decomposePar/decomposePar.C | 2 +- .../decomposePar/domainDecompositionMesh.C | 2 +- .../reconstructPar/reconstructPar.C | 2 +- .../PVReaders/vtkPVFoam/vtkPVFoamUpdateInfo.C | 2 +- .../createZeroDirectory/boundaryInfo.C | 2 +- .../surfaceMeshTriangulate.C | 2 +- modules/catalyst | 2 +- src/OpenFOAM/containers/Bits/bitSet/bitSet.H | 38 ++++++++++++------- src/OpenFOAM/containers/Bits/bitSet/bitSetI.H | 16 ++++---- .../containers/Bits/bitSet/bitSetTemplates.C | 22 +++++++++-- .../containers/HashTables/HashSet/HashSet.C | 14 +++---- .../containers/HashTables/HashSet/HashSet.H | 38 +++++++++++-------- .../HashTables/HashTable/HashTable.C | 8 ++-- .../HashTables/HashTable/HashTable.H | 4 +- .../functionObjectList/functionObjectList.C | 4 +- src/OpenFOAM/meshes/meshShapes/edge/edge.H | 28 +++++++------- src/OpenFOAM/meshes/meshShapes/edge/edgeI.H | 8 ++-- .../polyBoundaryMesh/polyBoundaryMesh.C | 4 +- .../meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C | 2 +- .../primitiveMesh/primitiveMeshCellPoints.C | 2 +- .../meshes/primitiveMesh/primitiveMeshEdges.C | 2 +- src/conversion/vtk/part/foamVtuSizing.C | 2 +- .../vtk/part/foamVtuSizingTemplates.C | 2 +- .../attachDetach/detachInterface.C | 6 +-- .../fvMeshDistribute/fvMeshDistribute.C | 2 +- .../motionSmoother/motionSmootherAlgo.C | 12 +++--- .../perfectInterface/perfectInterface.C | 2 +- .../polyTopoChange/edgeCollapser.C | 10 ++--- .../polyTopoChange/hexRef8/hexRef8.C | 10 ++--- .../polyTopoChange/removePoints.C | 2 +- .../slidingInterface/coupleSlidingInterface.C | 6 +-- .../slidingInterfaceProjectPoints.C | 2 +- src/fileFormats/ensight/file/ensightCase.C | 2 +- .../faMesh/faMeshDemandDrivenData.C | 2 +- .../fieldSelection/fieldSelectionTemplates.C | 2 +- .../fileFieldSelectionTemplates.C | 2 +- .../isoAdvection/isoAdvection/isoAdvection.C | 4 +- .../globalIndexStencils/cellToCellStencil.C | 2 +- .../globalIndexStencils/cellToFaceStencil.C | 12 +++--- .../field/turbulenceFields/turbulenceFields.C | 2 +- .../ParticleErosion/ParticleErosion.C | 2 +- .../PatchPostProcessing/PatchPostProcessing.C | 2 +- .../meshRefinement/meshRefinement.C | 2 +- .../meshRefinement/meshRefinementBaffles.C | 4 +- .../meshRefinement/meshRefinementMerge.C | 6 +-- .../snappyHexMeshDriver/snappyLayerDriver.C | 4 +- .../snappyHexMeshDriver/snappySnapDriver.C | 10 ++--- .../cellClassification/cellClassification.C | 2 +- src/meshTools/cellDist/cellDistFuncs.C | 2 +- .../extendedEdgeMesh/extendedEdgeMesh.C | 4 +- src/meshTools/indexedOctree/treeDataFace.C | 2 +- src/meshTools/meshTools/meshTools.C | 2 +- .../faceSources/normalToFace/normalToFace.C | 6 +-- .../triSurfaceTools/triSurfaceTools.C | 2 +- .../cellVolumeWeightCellCellStencil.C | 4 +- .../structuredDecomp/structuredDecomp.C | 2 +- .../structuredRenumber/structuredRenumber.C | 2 +- src/sampling/probes/probes.C | 22 +++++------ .../surfMeshSamplers/surfMeshSamplers.C | 10 ++--- src/sampling/surface/isoSurface/isoSurface.C | 4 +- .../surface/isoSurface/isoSurfaceCell.C | 2 +- src/surfMesh/triSurface/triSurfaceIO.C | 2 +- src/surfMesh/triSurface/triSurfaceStitch.C | 2 +- 79 files changed, 238 insertions(+), 208 deletions(-) diff --git a/applications/test/HashSet/Test-hashSet.C b/applications/test/HashSet/Test-hashSet.C index 5316f05e3f7..eeae7ff0d0b 100644 --- a/applications/test/HashSet/Test-hashSet.C +++ b/applications/test/HashSet/Test-hashSet.C @@ -188,10 +188,10 @@ int main(int argc, char *argv[]) Info<< "setB : " << setB << endl; labelPair pair(12, 15); - setB.setMany(pair); + setB.set(pair); Info<< "setB : " << setB << endl; - setB.unsetMany(pair); + setB.unset(pair); labelHashSet setC(1); @@ -257,7 +257,7 @@ int main(int argc, char *argv[]) someLst[elemI] = elemI*elemI; } - label added = setD.setMany(someLst); + label added = setD.set(someLst); Info<< "added " << added << " from " << someLst.size() << endl; Info<< "setD : " << flatOutput(setD) << endl; diff --git a/applications/test/bitSet2/Test-bitSet2.C b/applications/test/bitSet2/Test-bitSet2.C index b76048b01d5..71b8992a685 100644 --- a/applications/test/bitSet2/Test-bitSet2.C +++ b/applications/test/bitSet2/Test-bitSet2.C @@ -294,7 +294,7 @@ int main(int argc, char *argv[]) Info<< "\nclear/assign from labelList\n"; list4.clear(); - list4.setMany(labelList{0, 1, 2, 3, 12, 13, 14, 19, 20, 21}); + list4.set(labelList{0, 1, 2, 3, 12, 13, 14, 19, 20, 21}); report(list4, true); diff --git a/applications/test/edges/Test-edges.C b/applications/test/edges/Test-edges.C index 68de5446ee6..51da417de3e 100644 --- a/applications/test/edges/Test-edges.C +++ b/applications/test/edges/Test-edges.C @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) e4.start() = e4.end() = -1; Info<< "insert from list\n"; labelHashSet newIndices({2, -1, 2, 1, 4, 1, 2, 3}); - e4.insertMany(newIndices.toc()); + e4.insert(newIndices.toc()); printInfo(e4); e4.start() = e4.end() = -1; @@ -105,12 +105,12 @@ int main(int argc, char *argv[]) FixedList<label, 8> otherIndices{12, 2, -1, 1, 4, 1, 2, 3}; e4.start() = e4.end() = -1; Info<< "insert from list: " << otherIndices << nl; - e4.insertMany(otherIndices); + e4.insert(otherIndices); printInfo(e4); e4.start() = e4.end(); Info<< "erase from list: " << otherIndices << nl; - Info<< "removed " << e4.eraseMany(otherIndices) << " values" << nl; + Info<< "removed " << e4.erase(otherIndices) << " values" << nl; printInfo(e4); for (label i : {-1, 0, 1, 3}) diff --git a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C index 280c8b1f3b5..a39690325b4 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C +++ b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C @@ -374,7 +374,7 @@ void Foam::cellSplitter::setRefinement const cell& cFaces = mesh_.cells()[celli]; - faceUpToDate.unsetMany(cFaces); + faceUpToDate.unset(cFaces); } forAll(faceUpToDate, facei) diff --git a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C index 30efaf9ecc1..0f8b5c1ed03 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C +++ b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) { const labelList& pCells = mesh.pointCells()[meshPointi]; - cutCells.insertMany(pCells); + cutCells.insert(pCells); } } @@ -153,7 +153,7 @@ int main(int argc, char *argv[]) const polyPatch& pp = mesh.boundaryMesh()[patchi]; const labelList& meshPoints = pp.meshPoints(); - vertOnPatch.setMany(meshPoints); + vertOnPatch.set(meshPoints); } for (const label patchi : patchSet) diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C index 0b3db1f1871..34a22e98c44 100644 --- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C +++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C @@ -184,7 +184,7 @@ int main(int argc, char *argv[]) const DynamicList<label>& bin = bins[binI]; cellSet cells(mesh, "vol" + name(binI), bin.size()); - cells.insertMany(bin); + cells.insert(bin); Info<< " " << lowerLimits[binI] << " .. " << upperLimits[binI] << " : writing " << bin.size() << " cells to cellSet " diff --git a/applications/utilities/mesh/advanced/splitCells/splitCells.C b/applications/utilities/mesh/advanced/splitCells/splitCells.C index 6bd54ba6d9c..8328bd429b3 100644 --- a/applications/utilities/mesh/advanced/splitCells/splitCells.C +++ b/applications/utilities/mesh/advanced/splitCells/splitCells.C @@ -633,7 +633,7 @@ int main(int argc, char *argv[]) ); cellSet cutSet(mesh, "cutSet", cutCells.size()); - cutSet.insertMany(cutCells); + cutSet.insert(cutCells); // Gets cuts across cells from cuts through edges. Info<< "Writing " << cutSet.size() << " cells to cut to cellSet " diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C index 021ac49b875..c49d3e36649 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C @@ -956,7 +956,7 @@ int main(int argc, char *argv[]) forAll(dofVertIndices, patchi) { const labelList& foamVerts = dofVertIndices[patchi]; - dofGroups[patchi].insertMany(foamVerts); + dofGroups[patchi].insert(foamVerts); } List<DynamicList<face>> dynPatchFaces(dofVertIndices.size()); diff --git a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C index 8530d69541e..bb34fe5a138 100644 --- a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C +++ b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C @@ -344,7 +344,7 @@ void writePointCells { const labelList& cEdges = mesh.cellEdges()[pCells[i]]; - allEdges.insertMany(cEdges); + allEdges.insert(cEdges); } diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C index 5b11187ee7c..34d5f2b5c6a 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C @@ -795,7 +795,7 @@ int main(int argc, char *argv[]) forAll(addedCells, facei) { const labelList& aCells = addedCells[facei]; - addedCellsSet.insertMany(aCells); + addedCellsSet.insert(aCells); } } } diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index c22514d248e..3251cc203aa 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -527,7 +527,7 @@ label findUncoveredPatchFace { // Make set of extruded faces. labelHashSet extrudeFaceSet(extrudeMeshFaces.size()); - extrudeFaceSet.insertMany(extrudeMeshFaces); + extrudeFaceSet.insert(extrudeMeshFaces); const polyBoundaryMesh& pbm = mesh.boundaryMesh(); const labelList& eFaces = mesh.edgeFaces()[meshEdgeI]; @@ -561,7 +561,7 @@ label findUncoveredCyclicPatchFace { // Make set of extruded faces. labelHashSet extrudeFaceSet(extrudeMeshFaces.size()); - extrudeFaceSet.insertMany(extrudeMeshFaces); + extrudeFaceSet.insert(extrudeMeshFaces); const polyBoundaryMesh& pbm = mesh.boundaryMesh(); const labelList& eFaces = mesh.edgeFaces()[meshEdgeI]; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 7fcbfffd107..154c10ff63d 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -1053,7 +1053,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality nInvalidPolyhedra++; - wrongFaces.insertMany(cells[cI]); + wrongFaces.insert(cells[cI]); } } @@ -1093,7 +1093,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality if (nInternalFaces[cI] <= 1) { oneInternalFaceCells++; - wrongFaces.insertMany(cells[cI]); + wrongFaces.insert(cells[cI]); } } @@ -1109,7 +1109,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality { const face f = pMesh.faces()[facei]; - ptToBeLimited.setMany(f); + ptToBeLimited.set(f); } // // Limit connected cells @@ -1126,7 +1126,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality // { // label ptI = f[fPtI]; // const labelList& pC = ptCells[ptI]; - // limitCells.insertMany(pC); + // limitCells.insert(pC); // } // } @@ -1136,7 +1136,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality // { // const labelList& cP = cellPts[celli]; - // ptToBeLimited.setMany(cP); + // ptToBeLimited.set(cP); // } @@ -2537,7 +2537,7 @@ void Foam::conformalVoronoiMesh::removeUnusedPoints { const face& f = faces[fI]; - ptUsed.setMany(f); + ptUsed.set(f); } label pointi = 0; @@ -2587,8 +2587,8 @@ Foam::labelList Foam::conformalVoronoiMesh::removeUnusedCells // Scan all faces to find all of the cells that are used - cellUsed.setMany(owner); - cellUsed.setMany(neighbour); + cellUsed.set(owner); + cellUsed.set(neighbour); label celli = 0; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index f8a285717cf..cce1bce14d0 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -1369,7 +1369,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findRemainingProtrusionSet for (const label pointi : protrudingBoundaryPoints) { const labelList& pCells = mesh.pointCells()[pointi]; - protrudingCells.insertMany(pCells); + protrudingCells.insert(pCells); } label protrudingCellsSize = protrudingCells.size(); diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C index a586daad681..cef8d2695b1 100644 --- a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C +++ b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C @@ -891,7 +891,7 @@ void Foam::meshDualiser::setRefinement { const labelList& fEdges = mesh_.faceEdges()[facei]; - isBoundaryEdge.setMany(fEdges); + isBoundaryEdge.set(fEdges); } diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C index c4b0c01b6d5..f55d773b9bf 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C @@ -349,7 +349,7 @@ int main(int argc, char *argv[]) forAll(oldToNew, oldCelli) { const labelList& added = oldToNew[oldCelli]; - newCells.insertMany(added); + newCells.insert(added); } Info<< "Writing refined cells (" diff --git a/applications/utilities/mesh/manipulation/splitMesh/regionSide.C b/applications/utilities/mesh/manipulation/splitMesh/regionSide.C index b3308984d03..0a2a9d2c0f8 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/regionSide.C +++ b/applications/utilities/mesh/manipulation/splitMesh/regionSide.C @@ -300,7 +300,7 @@ void Foam::regionSide::walkAllPointConnectedFaces { const labelList& fEdges = mesh.faceEdges()[facei]; - regionEdges.insertMany(fEdges); + regionEdges.insert(fEdges); } diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index fa0dd946bd5..0ac8b9af1b9 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -311,7 +311,7 @@ int main(int argc, char *argv[]) wordHashSet names; forAllConstIters(rp, iter) { - names.insertMany(iter.object()); + names.insert(iter.object()); } regionNames = names.sortedToc(); diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C index 9285d85a073..bc8a8f5b1a7 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C @@ -451,7 +451,7 @@ void Foam::domainDecomposition::decomposeMesh() const labelList& facePoints = fcs[mag(facei) - 1]; // Mark the face points as being used - pointsInUse.setMany(facePoints); + pointsInUse.set(facePoints); } procPointAddressing_[proci] = pointsInUse.sortedToc(); diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index c8ab33cfa24..cdd092b1276 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -186,7 +186,7 @@ int main(int argc, char *argv[]) wordHashSet names; forAllConstIters(rp, iter) { - names.insertMany(iter.object()); + names.insert(iter.object()); } regionNames = names.sortedToc(); diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamUpdateInfo.C b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamUpdateInfo.C index 91f8ef7c3ca..9a70ef0205f 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamUpdateInfo.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoamUpdateInfo.C @@ -227,7 +227,7 @@ void Foam::vtkPVFoam::updateInfoLagrangian for (const instant& t : dbPtr_().times()) { - names.insertMany + names.insert ( readDir ( diff --git a/applications/utilities/preProcessing/createZeroDirectory/boundaryInfo.C b/applications/utilities/preProcessing/createZeroDirectory/boundaryInfo.C index 16671a4ec2b..a44a9066642 100644 --- a/applications/utilities/preProcessing/createZeroDirectory/boundaryInfo.C +++ b/applications/utilities/preProcessing/createZeroDirectory/boundaryInfo.C @@ -123,7 +123,7 @@ Foam::boundaryInfo::boundaryInfo(const Time& runTime, const word& regionName) if (dict.found("inGroups")) { dict.lookup("inGroups") >> groups_[patchI]; - allGroupNames_.insertMany(groups_[patchI]); + allGroupNames_.insert(groups_[patchI]); } } } diff --git a/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C b/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C index fe1f63ffb81..936a90a2dfe 100644 --- a/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C +++ b/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C @@ -202,7 +202,7 @@ int main(int argc, char *argv[]) for (const wordRe& zoneName : zoneNames) { labelList zoneIDs = findStrings(zoneName, allZoneNames); - includeFaceZones.insertMany(zoneIDs); + includeFaceZones.insert(zoneIDs); if (zoneIDs.empty()) { diff --git a/modules/catalyst b/modules/catalyst index d31e13e12b4..eaa7f6836a1 160000 --- a/modules/catalyst +++ b/modules/catalyst @@ -1 +1 @@ -Subproject commit d31e13e12b4d9b727b28d39bc34086f2cb75acfa +Subproject commit eaa7f6836a1950fe8d40c13952aa85a1062f7f91 diff --git a/src/OpenFOAM/containers/Bits/bitSet/bitSet.H b/src/OpenFOAM/containers/Bits/bitSet/bitSet.H index b2763c339e8..38b0181a828 100644 --- a/src/OpenFOAM/containers/Bits/bitSet/bitSet.H +++ b/src/OpenFOAM/containers/Bits/bitSet/bitSet.H @@ -262,7 +262,7 @@ public: // Setting single or multiple values - //- Single index/value assign + //- Assign a single index/value using PackedList<1>::set; //- Set specified bits from another bitset. @@ -346,29 +346,41 @@ public: // Either increases the size of the bitSet or is a no-op. inline bitSet& extend(const bitSet& other); + //- Set the locations listed by the iterator range, + // auto-vivify entries if needed. + // + // \return number of locations changed + template<class InputIter> + label setMany(InputIter first, InputIter last); + //- Set the listed locations to true. // Does auto-vivify for non-existent entries. - inline void setMany(const labelUList& locations); + // + // \return number of locations changed + inline label set(const labelUList& locations); //- Set the listed locations to true. // Does auto-vivify for non-existent entries. - inline void setMany(const labelUIndList& locations); + // + // \return number of locations changed + inline label set(const labelUIndList& locations); - //- Set the locations listed by the iterator range, - // auto-vivify entries if needed. + //- Unset the locations listed by the iterator range, + //- never auto-vivify entries. + // + // \return number of locations changed template<class InputIter> - void setMany(InputIter first, InputIter last); + label unset(InputIter first, InputIter last); //- Unset the listed locations, never auto-vivifies. - inline void unsetMany(const labelUList& locations); + // + // \return number of locations changed + inline label unset(const labelUList& locations); //- Unset the listed locations, never auto-vivifies. - inline void unsetMany(const labelUIndList& locations); - - //- Unset the locations listed by the iterator range, - //- never auto-vivify entries. - template<class InputIter> - void unsetMany(InputIter first, InputIter last); + // + // \return number of locations changed + inline label unset(const labelUIndList& locations); // Access helpers diff --git a/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H b/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H index fd52a8c866b..454fc2b76c6 100644 --- a/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H +++ b/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H @@ -531,27 +531,27 @@ inline void Foam::bitSet::set(const bitSet& bitset) } -inline void Foam::bitSet::setMany(const labelUList& locations) +inline Foam::label Foam::bitSet::set(const labelUList& locations) { - setMany(locations.begin(), locations.end()); + return setMany(locations.begin(), locations.end()); } -inline void Foam::bitSet::setMany(const labelUIndList& locations) +inline Foam::label Foam::bitSet::set(const labelUIndList& locations) { - setMany(locations.begin(), locations.end()); + return setMany(locations.begin(), locations.end()); } -inline void Foam::bitSet::unsetMany(const labelUList& locations) +inline Foam::label Foam::bitSet::unset(const labelUList& locations) { - unsetMany(locations.begin(), locations.end()); + return unset(locations.begin(), locations.end()); } -inline void Foam::bitSet::unsetMany(const labelUIndList& locations) +inline Foam::label Foam::bitSet::unset(const labelUIndList& locations) { - unsetMany(locations.begin(), locations.end()); + return unset(locations.begin(), locations.end()); } diff --git a/src/OpenFOAM/containers/Bits/bitSet/bitSetTemplates.C b/src/OpenFOAM/containers/Bits/bitSet/bitSetTemplates.C index a8d5ac32567..e55cc6c77da 100644 --- a/src/OpenFOAM/containers/Bits/bitSet/bitSetTemplates.C +++ b/src/OpenFOAM/containers/Bits/bitSet/bitSetTemplates.C @@ -28,31 +28,45 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class InputIter> -void Foam::bitSet::setMany(InputIter first, InputIter last) +Foam::label Foam::bitSet::setMany(InputIter first, InputIter last) { // Check the max expected value first const auto max = std::max_element(first, last); const label len = (max != last ? (1 + *max) : 0); + label changed = 0; + if (len > 0) { reserve(len); for (; first != last; ++first) { - set(*first); + if (set(*first)) + { + ++changed; + } } } + + return changed; } template<class InputIter> -void Foam::bitSet::unsetMany(InputIter first, InputIter last) +Foam::label Foam::bitSet::unset(InputIter first, InputIter last) { + label changed = 0; + for (; first != last; ++first) { - unset(*first); + if (unset(*first)) + { + ++changed; + } } + + return changed; } diff --git a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C index 90dcbea5ebb..01b3f6a652c 100644 --- a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C +++ b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C @@ -42,7 +42,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::assignMany { if (!this->capacity()) { - // Could be zero-sized from a previous transfer()? + // Zero-sized from a previous transfer()? this->resize(2*nItems); } else @@ -155,7 +155,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::insert template<class Key, class Hash> template<unsigned Size> -inline Foam::label Foam::HashSet<Key, Hash>::insertMany +inline Foam::label Foam::HashSet<Key, Hash>::insert ( const FixedList<Key, Size>& list ) @@ -165,7 +165,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::insertMany template<class Key, class Hash> -inline Foam::label Foam::HashSet<Key, Hash>::insertMany +inline Foam::label Foam::HashSet<Key, Hash>::insert ( const UList<Key>& list ) @@ -175,7 +175,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::insertMany template<class Key, class Hash> -inline Foam::label Foam::HashSet<Key, Hash>::insertMany +inline Foam::label Foam::HashSet<Key, Hash>::insert ( const UIndirectList<Key>& list ) @@ -208,7 +208,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::unset template<class Key, class Hash> template<unsigned Size> -inline Foam::label Foam::HashSet<Key, Hash>::unsetMany +inline Foam::label Foam::HashSet<Key, Hash>::unset ( const FixedList<Key, Size>& list ) @@ -218,7 +218,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::unsetMany template<class Key, class Hash> -inline Foam::label Foam::HashSet<Key, Hash>::unsetMany +inline Foam::label Foam::HashSet<Key, Hash>::unset ( const UList<Key>& list ) @@ -228,7 +228,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::unsetMany template<class Key, class Hash> -inline Foam::label Foam::HashSet<Key, Hash>::unsetMany +inline Foam::label Foam::HashSet<Key, Hash>::unset ( const UIndirectList<Key>& list ) diff --git a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H index 343e4986d95..7208dd4c8b8 100644 --- a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H +++ b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H @@ -204,15 +204,15 @@ public: //- Insert keys from the list of Key // \return The number of new elements inserted template<unsigned Size> - inline label insertMany(const FixedList<Key, Size>& list); + inline label insert(const FixedList<Key, Size>& list); //- Insert keys from the list of Key // \return The number of new elements inserted - inline label insertMany(const UList<Key>& list); + inline label insert(const UList<Key>& list); //- Insert keys from the list of Key // \return The number of new elements inserted - inline label insertMany(const UIndirectList<Key>& list); + inline label insert(const UIndirectList<Key>& list); //- Same as insert (no value to overwrite) template<class InputIter> @@ -229,27 +229,35 @@ public: //- Same as insert (no value to overwrite) template<unsigned Size> - inline label setMany(const FixedList<Key, Size>& list) + inline label set(const FixedList<Key, Size>& list) { - return insertMany(list); + return insert(list); } - //- Same as insertMany (no value to overwrite) - inline label setMany(const UList<Key>& list) + //- Same as insert (no value to overwrite) + inline label set(const UList<Key>& list) { - return insertMany(list); + return insert(list); } - //- Same as insertMany (no value to overwrite) - inline label setMany(const UIndirectList<Key>& list) + //- Same as insert (no value to overwrite) + inline label set(const UIndirectList<Key>& list) { - return insertMany(list); + return insert(list); + } + + //- Same as insert (no value to overwrite) + // \note Method name compatibility with bitSet + template<class InputIter> + inline label setMany(InputIter first, InputIter last) + { + return insert(first, last); } //- Unset the keys listed in the input iterator range // \return The number of items removed template<class InputIter> - inline label unset(InputIter first, const InputIter last); + inline label unset(InputIter first, InputIter last); //- Unset the listed keys - same as erase // \return The number of items removed @@ -258,15 +266,15 @@ public: //- Unset the listed keys - same as erase // \return The number of items removed template<unsigned Size> - inline label unsetMany(const FixedList<Key, Size>& list); + inline label unset(const FixedList<Key, Size>& list); //- Unset the listed keys - same as erase // \return The number of items removed - inline label unsetMany(const UList<Key>& list); + inline label unset(const UList<Key>& list); //- Unset the listed keys - same as erase // \return The number of items removed - inline label unsetMany(const UIndirectList<Key>& list); + inline label unset(const UIndirectList<Key>& list); // STL iterators diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C index 7405064ffda..f00f2adb4bd 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C @@ -444,7 +444,7 @@ inline Foam::label Foam::HashTable<T, Key, Hash>::erase template<class T, class Key, class Hash> template<unsigned Size> -inline Foam::label Foam::HashTable<T, Key, Hash>::eraseMany +inline Foam::label Foam::HashTable<T, Key, Hash>::erase ( const FixedList<Key, Size>& keys ) @@ -454,7 +454,7 @@ inline Foam::label Foam::HashTable<T, Key, Hash>::eraseMany template<class T, class Key, class Hash> -inline Foam::label Foam::HashTable<T, Key, Hash>::eraseMany +inline Foam::label Foam::HashTable<T, Key, Hash>::erase ( const UList<Key>& keys ) @@ -766,9 +766,9 @@ void Foam::HashTable<T, Key, Hash>::operator= << abort(FatalError); } - // Could be zero-sized from a previous transfer() if (!capacity_) { + // Zero-sized from a previous transfer()? resize(rhs.capacity_); } else @@ -789,9 +789,9 @@ void Foam::HashTable<T, Key, Hash>::operator= std::initializer_list<std::pair<Key, T>> rhs ) { - // Could be zero-sized from a previous transfer() if (!capacity_) { + // Zero-sized from a previous transfer()? resize(2*rhs.size()); } else diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H index cecd82083af..7b5e2afb2e4 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H @@ -507,11 +507,11 @@ public: //- Remove table entries given by the listed keys // \return The number of items removed template<unsigned Size> - inline label eraseMany(const FixedList<Key, Size>& keys); + inline label erase(const FixedList<Key, Size>& keys); //- Remove table entries given by the listed keys // \return The number of items removed - inline label eraseMany(const UList<Key>& keys); + inline label erase(const UList<Key>& keys); //- Retain table entries given by keys of the other hash-table. // diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index 86a07145d01..76ee09ff27f 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -305,7 +305,7 @@ bool Foam::functionObjectList::readFunctionObject else if (args.size() > 1) { funcDict.set("fields", args); - requiredFields.insertMany(args); + requiredFields.insert(args); } else if (funcDict.found("field")) { @@ -313,7 +313,7 @@ bool Foam::functionObjectList::readFunctionObject } else if (funcDict.found("fields")) { - requiredFields.insertMany(wordReList(funcDict.lookup("fields"))); + requiredFields.insert(wordReList(funcDict.lookup("fields"))); } // Insert named arguments diff --git a/src/OpenFOAM/meshes/meshShapes/edge/edge.H b/src/OpenFOAM/meshes/meshShapes/edge/edge.H index 83e2b5ea303..6258fe8f98b 100644 --- a/src/OpenFOAM/meshes/meshShapes/edge/edge.H +++ b/src/OpenFOAM/meshes/meshShapes/edge/edge.H @@ -181,28 +181,28 @@ public: // Similar to a HashTable::insert(). inline bool insert(const label index); + //- Insert values, using begin/end iterators. + template<class InputIter> + inline label insert(InputIter begIter, InputIter endIter); + //- Fill open slots with the indices if they did not previously exist. // Returns true on success. Negative labels never insert. // Return the number of slots filled. // Similar to a HashTable::insert(). inline label insert(std::initializer_list<label> list); - //- Insert values, using begin/end iterators. - template<class InputIter> - inline label insert(InputIter begIter, InputIter endIter); - //- Fill open slots with the indices if they did not previously exist. // Returns true on success. Negative labels never insert. // Return the number of slots filled. - // Similar to a HashTable::insertMany(). + // Similar to a HashTable::insert(). template<unsigned Size> - inline label insertMany(const FixedList<label, Size>& list); + inline label insert(const FixedList<label, Size>& list); //- Fill open slots with the indices if they did not previously exist. // Returns true on success. Negative labels never insert. // Return the number of slots filled. - // Similar to a HashTable::insertMany(). - inline label insertMany(const labelUList& list); + // Similar to a HashTable::insert(). + inline label insert(const labelUList& list); //- Remove an existing index from the edge and set its location to '-1'. @@ -210,22 +210,22 @@ public: // Similar to a HashTable::erase(). inline label erase(const label index); - //- Remove existing indices from the edge and set locations to '-1'. - // Returns the number of changes. - inline label erase(std::initializer_list<label> list); - //- Remove values, using begin/end iterators. template<class InputIter> inline label erase(InputIter begIter, InputIter endIter); + //- Remove existing indices from the edge and set locations to '-1'. + // Returns the number of changes. + inline label erase(std::initializer_list<label> list); + //- Remove existing indices from the edge and set locations to '-1'. // Returns the number of changes. template<unsigned Size> - inline label eraseMany(const FixedList<label, Size>& list); + inline label erase(const FixedList<label, Size>& list); //- Remove existing indices from the edge and set locations to '-1'. // Returns the number of changes. - inline label eraseMany(const labelUList& list); + inline label erase(const labelUList& list); // Geometric functions diff --git a/src/OpenFOAM/meshes/meshShapes/edge/edgeI.H b/src/OpenFOAM/meshes/meshShapes/edge/edgeI.H index fcdaadc7167..a9f3c395542 100644 --- a/src/OpenFOAM/meshes/meshShapes/edge/edgeI.H +++ b/src/OpenFOAM/meshes/meshShapes/edge/edgeI.H @@ -300,13 +300,13 @@ inline Foam::label Foam::edge::insert(std::initializer_list<label> list) template<unsigned Size> -inline Foam::label Foam::edge::insertMany(const FixedList<label, Size>& list) +inline Foam::label Foam::edge::insert(const FixedList<label, Size>& list) { return insert(list.begin(), list.end()); } -inline Foam::label Foam::edge::insertMany(const labelUList& list) +inline Foam::label Foam::edge::insert(const labelUList& list) { return insert(list.begin(), list.end()); } @@ -366,13 +366,13 @@ inline Foam::label Foam::edge::erase(std::initializer_list<label> list) template<unsigned Size> -inline Foam::label Foam::edge::eraseMany(const FixedList<label, Size>& list) +inline Foam::label Foam::edge::erase(const FixedList<label, Size>& list) { return erase(list.begin(), list.end()); } -inline Foam::label Foam::edge::eraseMany(const labelUList& list) +inline Foam::label Foam::edge::erase(const labelUList& list) { return erase(list.begin(), list.end()); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index 745fcb49584..4b987064da2 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -784,7 +784,7 @@ Foam::labelHashSet Foam::polyBoundaryMesh::patchSet // Treat the given patch names as wild-cards and search the set // of all patch names for matches labelList patchIDs = findStrings(patchName, allPatchNames); - ids.insertMany(patchIDs); + ids.insert(patchIDs); if (patchIDs.empty()) { @@ -799,7 +799,7 @@ Foam::labelHashSet Foam::polyBoundaryMesh::patchSet { const word& name = allGroupNames[groupIDs[i]]; const labelList& extraPatchIDs = groupPatchIDs()[name]; - ids.insertMany(extraPatchIDs); + ids.insert(extraPatchIDs); } if (groupIDs.empty() && warnNotFound) diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C index b4df8fd49da..9dc2bcc03fc 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C @@ -445,7 +445,7 @@ Foam::bitSet Foam::ZoneMesh<ZoneType, MeshType>::findMatching const labelList indices = this->findIndices(key); forAll(indices, i) { - bitset.setMany + bitset.set ( static_cast<const labelList&>(this->operator[](indices[i])) ); diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellPoints.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellPoints.C index 6f08ea4471e..1902a3f3866 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellPoints.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellPoints.C @@ -74,7 +74,7 @@ const Foam::labelList& Foam::primitiveMesh::cellPoints for (const label facei : cFaces) { - set.insertMany(fcs[facei]); + set.insert(fcs[facei]); } storage.clear(); diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C index 8f0d07e3120..022de1979ce 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C @@ -643,7 +643,7 @@ const Foam::labelList& Foam::primitiveMesh::cellEdges for (const label facei : cFaces) { - set.insertMany(faceEdges(facei)); + set.insert(faceEdges(facei)); } storage.clear(); diff --git a/src/conversion/vtk/part/foamVtuSizing.C b/src/conversion/vtk/part/foamVtuSizing.C index 0bb9fb5592d..417d19e854d 100644 --- a/src/conversion/vtk/part/foamVtuSizing.C +++ b/src/conversion/vtk/part/foamVtuSizing.C @@ -165,7 +165,7 @@ void Foam::vtk::vtuSizing::reset const face& f = mesh.faces()[facei]; nFaceLabels_ += f.size(); - hashUniqId.insertMany(f); + hashUniqId.insert(f); } // Legacy format only uses the face-stream. diff --git a/src/conversion/vtk/part/foamVtuSizingTemplates.C b/src/conversion/vtk/part/foamVtuSizingTemplates.C index b070ab67da4..40df139d2c7 100644 --- a/src/conversion/vtk/part/foamVtuSizingTemplates.C +++ b/src/conversion/vtk/part/foamVtuSizingTemplates.C @@ -545,7 +545,7 @@ void Foam::vtk::vtuSizing::populateArrays const face& f = mesh.faces()[cFaces[cFaceI]]; const bool isOwner = (owner[cFaces[cFaceI]] == celli); - hashUniqId.insertMany(f); + hashUniqId.insert(f); // number of labels for this face faceOutput[faceIndexer++] = f.size(); diff --git a/src/dynamicMesh/attachDetach/detachInterface.C b/src/dynamicMesh/attachDetach/detachInterface.C index f00979846a0..cd85522b6e6 100644 --- a/src/dynamicMesh/attachDetach/detachInterface.C +++ b/src/dynamicMesh/attachDetach/detachInterface.C @@ -329,7 +329,7 @@ void Foam::attachDetach::detachInterface { // Protection and memory management // Make a map of master cells for quick reject labelHashSet mcMap(2*mc.size()); - mcMap.insertMany(mc); + mcMap.insert(mc); // Go through all the faces in the masterCellFaceMap. If the // cells around them are not already used, add all of their @@ -345,7 +345,7 @@ void Foam::attachDetach::detachInterface { // Cell not found. Add its faces to the map const cell& curFaces = cells[ownCell]; - masterCellFaceMap.insertMany(curFaces); + masterCellFaceMap.insert(curFaces); } // Do the neighbour side if face is internal @@ -357,7 +357,7 @@ void Foam::attachDetach::detachInterface { // Cell not found. Add its faces to the map const cell& curFaces = cells[neiCell]; - masterCellFaceMap.insertMany(curFaces); + masterCellFaceMap.insert(curFaces); } } } diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index 4206ca325b5..8be1f498988 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -228,7 +228,7 @@ Foam::wordList Foam::fvMeshDistribute::mergeWordList(const wordList& procNames) wordHashSet mergedNames; forAll(allNames, proci) { - mergedNames.insertMany(allNames[proci]); + mergedNames.insert(allNames[proci]); } return mergedNames.toc(); } diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C index bfc9eb1f583..a5be6f412ba 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C @@ -99,7 +99,7 @@ Foam::labelHashSet Foam::motionSmootherAlgo::getPoints for (const label faceId : faceLabels) { - usedPoints.insertMany(mesh_.faces()[faceId]); + usedPoints.insert(mesh_.faces()[faceId]); } return usedPoints; @@ -115,7 +115,7 @@ Foam::labelHashSet Foam::motionSmootherAlgo::getPoints for (const label faceId : faceLabels) { - usedPoints.insertMany(mesh_.faces()[faceId]); + usedPoints.insert(mesh_.faces()[faceId]); } return usedPoints; @@ -328,7 +328,7 @@ void Foam::motionSmootherAlgo::getAffectedFacesAndPoints { const cell& cFaces = mesh_.cells()[pCells[pCelli]]; - nbrFaces.insertMany(cFaces); + nbrFaces.insert(cFaces); } } nbrFaces.sync(mesh_); @@ -338,7 +338,7 @@ void Foam::motionSmootherAlgo::getAffectedFacesAndPoints for (const label facei : nbrFaces) { const face& f = mesh_.faces()[facei]; - isAffectedPoint.setMany(f); + isAffectedPoint.set(f); } } } @@ -944,14 +944,14 @@ bool Foam::motionSmootherAlgo::scaleMesh const label own = mesh_.faceOwner()[facei]; const cell& ownFaces = mesh_.cells()[own]; - newWrongFaces.insertMany(ownFaces); + newWrongFaces.insert(ownFaces); if (facei < mesh_.nInternalFaces()) { const label nei = mesh_.faceNeighbour()[facei]; const cell& neiFaces = mesh_.cells()[nei]; - newWrongFaces.insertMany(neiFaces); + newWrongFaces.insert(neiFaces); } } wrongFaces.transfer(newWrongFaces); diff --git a/src/dynamicMesh/perfectInterface/perfectInterface.C b/src/dynamicMesh/perfectInterface/perfectInterface.C index 6d7960e13e7..977ac41e0b5 100644 --- a/src/dynamicMesh/perfectInterface/perfectInterface.C +++ b/src/dynamicMesh/perfectInterface/perfectInterface.C @@ -262,7 +262,7 @@ void Foam::perfectInterface::setRefinement { const labelList& pFaces = mesh.pointFaces()[meshPointi]; - affectedFaces.insertMany(pFaces); + affectedFaces.insert(pFaces); } } forAll(pp1, i) diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C index e3fce41660e..1df70acf076 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C @@ -97,7 +97,7 @@ Foam::label Foam::edgeCollapser::checkMeshQuality { const face& f = mesh.faces()[facei]; - isErrorPoint.setMany(f); + isErrorPoint.set(f); } syncTools::syncPointList @@ -222,7 +222,7 @@ void Foam::edgeCollapser::collapseToEdge labelList faceEdgesNeg = edgesFromPoints(facei, facePtsNeg); - collapseEdge.setMany(faceEdgesNeg); + collapseEdge.set(faceEdgesNeg); forAll(facePtsNeg, pI) { @@ -266,7 +266,7 @@ void Foam::edgeCollapser::collapseToEdge labelList faceEdgesPos = edgesFromPoints(facei, facePtsPos); - collapseEdge.setMany(faceEdgesPos); + collapseEdge.set(faceEdgesPos); forAll(facePtsPos, pI) { @@ -364,7 +364,7 @@ void Foam::edgeCollapser::collapseToPoint const labelList& faceEdges = mesh_.faceEdges()[facei]; - collapseEdge.setMany(faceEdges); + collapseEdge.set(faceEdges); forAll(f, pI) { @@ -1511,7 +1511,7 @@ bool Foam::edgeCollapser::setRefinement else { // Kept face. Mark vertices - usedPoint.setMany(f); + usedPoint.set(f); } } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C index 79c7e7446ae..e58aa2ae8ea 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C @@ -3764,7 +3764,7 @@ Foam::labelListList Foam::hexRef8::setRefinement { const cell& cFaces = mesh_.cells()[celli]; - affectedFace.setMany(cFaces); + affectedFace.set(cFaces); } } @@ -3782,7 +3782,7 @@ Foam::labelListList Foam::hexRef8::setRefinement { const labelList& eFaces = mesh_.edgeFaces(edgeI); - affectedFace.setMany(eFaces); + affectedFace.set(eFaces); } } } @@ -5309,7 +5309,7 @@ Foam::labelList Foam::hexRef8::consistentUnrefinement { const labelList& pCells = mesh_.pointCells(pointi); - unrefineCell.setMany(pCells); + unrefineCell.set(pCells); } } @@ -5534,7 +5534,7 @@ void Foam::hexRef8::setUnrefinement { const labelList& pCells = mesh_.pointCells(splitPointLabels[i]); - cSet.insertMany(pCells); + cSet.insert(pCells); } cSet.write(); @@ -5558,7 +5558,7 @@ void Foam::hexRef8::setUnrefinement { const labelList& pFaces = mesh_.pointFaces()[splitPointLabels[i]]; - splitFaces.insertMany(pFaces); + splitFaces.insert(pFaces); } // Check with faceRemover what faces will get removed. Note that this diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C index 594f2e279ef..3e0e48fe3e3 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C @@ -343,7 +343,7 @@ void Foam::removePoints::setRefinement // Store faces affected const labelList& pFaces = mesh_.pointFaces()[pointi]; - facesAffected.insertMany(pFaces); + facesAffected.insert(pFaces); } } diff --git a/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C b/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C index e3b5043fc34..3e05d3a3a19 100644 --- a/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C +++ b/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C @@ -186,7 +186,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const // edges for (const label slaveEdgei : curSlaveEdges) { - usedMasterEdges[slaveEdgei].insertMany(curMasterEdges); + usedMasterEdges[slaveEdgei].insert(curMasterEdges); } } else if (slavePointEdgeHits[pointi] > -1) @@ -211,7 +211,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const { const labelList& curMasterEdges = masterPointEdges[masterPointi]; - usedMasterEdges[masterPointEdgeHits[masterPointi]].insertMany + usedMasterEdges[masterPointEdgeHits[masterPointi]].insert ( curMasterEdges ); @@ -571,7 +571,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const // << masterPatch.localFaces()[facei] // << endl; - curMasterEdgesMap.insertMany(masterFaceEdges[facei]); + curMasterEdgesMap.insert(masterFaceEdges[facei]); } const labelList curMasterEdges(curMasterEdgesMap.toc()); diff --git a/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C b/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C index c1ff91566f1..ca6d503b0d2 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C +++ b/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C @@ -880,7 +880,7 @@ bool Foam::slidingInterface::projectPoints() const for (const label facei : curFaceMap) { const face& f = masterLocalFaces[facei]; - curPointMap.insertMany(f); // Insert all face points + curPointMap.insert(f); // Insert all face points } const labelList curMasterPoints = curPointMap.toc(); diff --git a/src/fileFormats/ensight/file/ensightCase.C b/src/fileFormats/ensight/file/ensightCase.C index dd97fa57052..1193d3a691a 100644 --- a/src/fileFormats/ensight/file/ensightCase.C +++ b/src/fileFormats/ensight/file/ensightCase.C @@ -109,7 +109,7 @@ Foam::label Foam::ensightCase::checkTimeset(const labelHashSet& lookup) const } // OR - // tsTimes.unsetMany(timesUsed_.toc()); + // tsTimes.unset(timesUsed_.toc()); if (tsTimes.empty()) { diff --git a/src/finiteArea/faMesh/faMeshDemandDrivenData.C b/src/finiteArea/faMesh/faMeshDemandDrivenData.C index 80661cd9a9c..82ae59060da 100644 --- a/src/finiteArea/faMesh/faMeshDemandDrivenData.C +++ b/src/finiteArea/faMesh/faMeshDemandDrivenData.C @@ -1455,7 +1455,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const procPatch.neighbPoints()[nonGlobalPatchPoints[pointI]]; labelHashSet faceSet; - faceSet.insertMany(pointFaces[curPoint]); + faceSet.insert(pointFaces[curPoint]); labelList curFaces = faceSet.toc(); diff --git a/src/finiteVolume/functionObjects/fieldSelection/fieldSelectionTemplates.C b/src/finiteVolume/functionObjects/fieldSelection/fieldSelectionTemplates.C index 653de0edfaa..95a692847e2 100644 --- a/src/finiteVolume/functionObjects/fieldSelection/fieldSelectionTemplates.C +++ b/src/finiteVolume/functionObjects/fieldSelection/fieldSelectionTemplates.C @@ -36,7 +36,7 @@ void Foam::functionObjects::fieldSelection::addRegistered { for (const wordRe& name : *this) { - set.insertMany(obr_.names<Type>(name)); + set.insert(obr_.names<Type>(name)); } } diff --git a/src/finiteVolume/functionObjects/fieldSelection/fileFieldSelectionTemplates.C b/src/finiteVolume/functionObjects/fieldSelection/fileFieldSelectionTemplates.C index 9ea26d114f7..463aeac0408 100644 --- a/src/finiteVolume/functionObjects/fieldSelection/fileFieldSelectionTemplates.C +++ b/src/finiteVolume/functionObjects/fieldSelection/fileFieldSelectionTemplates.C @@ -38,7 +38,7 @@ void Foam::functionObjects::fileFieldSelection::addFromFile { for (const wordRe& fieldName : *this) { - set.insertMany(allFileObjects.names(Type::typeName, fieldName)); + set.insert(allFileObjects.names(Type::typeName, fieldName)); } } diff --git a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C index 824b4c84fb4..3382092993f 100644 --- a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C +++ b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C @@ -336,7 +336,7 @@ void Foam::isoAdvection::timeIntegratedFlux() // 1 - neighbours of neighbours // 2 - ... const labelList& nNeighbourCells = cellCells[otherCell]; - checkBounding_.setMany(nNeighbourCells); + checkBounding_.set(nNeighbourCells); } else { @@ -1040,7 +1040,7 @@ void Foam::isoAdvection::writeSurfaceCells() const ) ); - cSet.insertMany(surfCells_); + cSet.insert(surfCells_); cSet.write(); } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C index b2ecb94b959..d4b051c8454 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C @@ -242,7 +242,7 @@ void Foam::cellToCellStencil::unionEqOp::operator() else { labelHashSet set(x); - set.insertMany(y); + set.insert(y); x = set.toc(); } } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C index 96318c05e98..7106ebfae5a 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C @@ -243,7 +243,7 @@ void Foam::cellToFaceStencil::unionEqOp::operator() else { labelHashSet set(x); - set.insertMany(y); + set.insert(y); x = set.toc(); } } @@ -382,11 +382,11 @@ void Foam::cellToFaceStencil::calcFaceStencil const labelList& ownCCells = globalCellCells[own[facei]]; label globalOwn = ownCCells[0]; - faceStencilSet.insertMany(ownCCells); // Insert cellCells + faceStencilSet.insert(ownCCells); // Insert cellCells const labelList& neiCCells = globalCellCells[nei[facei]]; label globalNei = neiCCells[0]; - faceStencilSet.insertMany(neiCCells); // Insert cellCells + faceStencilSet.insert(neiCCells); // Insert cellCells // Guarantee owner first, neighbour second. faceStencil[facei].setSize(faceStencilSet.size()); @@ -416,13 +416,13 @@ void Foam::cellToFaceStencil::calcFaceStencil const labelList& ownCCells = globalCellCells[own[facei]]; label globalOwn = ownCCells[0]; - faceStencilSet.insertMany(ownCCells); + faceStencilSet.insert(ownCCells); // And the neighbours of the coupled cell const labelList& neiCCells = neiGlobalCellCells[facei-mesh_.nInternalFaces()]; label globalNei = neiCCells[0]; - faceStencilSet.insertMany(neiCCells); + faceStencilSet.insert(neiCCells); // Guarantee owner first, neighbour second. faceStencil[facei].setSize(faceStencilSet.size()); @@ -452,7 +452,7 @@ void Foam::cellToFaceStencil::calcFaceStencil const labelList& ownCCells = globalCellCells[own[facei]]; label globalOwn = ownCCells[0]; - faceStencilSet.insertMany(ownCCells); + faceStencilSet.insert(ownCCells); // Guarantee owner first faceStencil[facei].setSize(faceStencilSet.size()); diff --git a/src/functionObjects/field/turbulenceFields/turbulenceFields.C b/src/functionObjects/field/turbulenceFields/turbulenceFields.C index 054ad322cbe..86431601900 100644 --- a/src/functionObjects/field/turbulenceFields/turbulenceFields.C +++ b/src/functionObjects/field/turbulenceFields/turbulenceFields.C @@ -146,7 +146,7 @@ bool Foam::functionObjects::turbulenceFields::read(const dictionary& dict) } else { - fieldSet_.insertMany(wordList(dict.lookup("fields"))); + fieldSet_.insert(wordList(dict.lookup("fields"))); } Info<< type() << " " << name() << ": "; diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C index 09cbf24c1f8..3da906bcdc7 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C @@ -92,7 +92,7 @@ Foam::ParticleErosion<CloudType>::ParticleErosion << endl; } - uniqIds.insertMany(ids); + uniqIds.insert(ids); } patchIDs_ = uniqIds.sortedToc(); diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C index 6e849578d05..21752df47fd 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C @@ -149,7 +149,7 @@ Foam::PatchPostProcessing<CloudType>::PatchPostProcessing << endl; } - uniqIds.insertMany(ids); + uniqIds.insert(ids); } patchIDs_ = uniqIds.sortedToc(); diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index 98a26202310..2bf1272938d 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -1021,7 +1021,7 @@ Foam::label Foam::meshRefinement::splitFacesUndo { const labelList grownFaces(growFaceCellFace(errorFaces)); errorFaces.clear(); - errorFaces.insertMany(grownFaces); + errorFaces.insert(grownFaces); } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C index 30dd83ee98e..9a560ff3ddb 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C @@ -625,7 +625,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles { const cell& ownFaces = mesh_.cells()[mesh_.faceOwner()[faceI]]; - baffledFacesSet.insertMany(ownFaces); + baffledFacesSet.insert(ownFaces); } } // Pick up neighbour side of baffle (added faces) @@ -637,7 +637,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles { const cell& ownFaces = mesh_.cells()[mesh_.faceOwner()[faceI]]; - baffledFacesSet.insertMany(ownFaces); + baffledFacesSet.insert(ownFaces); } } baffledFacesSet.sync(mesh_); diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C index 21f3e1ba347..739bff247f5 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C @@ -225,13 +225,13 @@ Foam::label Foam::meshRefinement::mergePatchFaces // // const cell& ownFaces = cells[mesh_.faceOwner()[facei]]; // -// retestFaces.insertMany(ownFaces); +// retestFaces.insert(ownFaces); // // if (mesh_.isInternalFace(facei)) // { // const cell& neiFaces = cells[mesh_.faceNeighbour()[facei]]; // -// retestFaces.insertMany(neiFaces); +// retestFaces.insert(neiFaces); // } // } // updateMesh(map, retestFaces.toc()); @@ -329,7 +329,7 @@ Foam::label Foam::meshRefinement::mergePatchFacesUndo faceSet allSets(mesh_, "allFaceSets", allFaceSets.size()); forAll(allFaceSets, setI) { - allSets.insertMany(allFaceSets[setI]); + allSets.insert(allFaceSets[setI]); } Pout<< "Writing all faces to be merged to set " << allSets.objectPath() << endl; diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C index c4689ee4e9a..98942602658 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C @@ -616,7 +616,7 @@ void Foam::snappyLayerDriver::handleNonManifolds bitSet isCoupledEdge(mesh.nEdges()); const labelList& cpEdges = mesh.globalData().coupledPatchMeshEdges(); - isCoupledEdge.setMany(cpEdges); + isCoupledEdge.set(cpEdges); syncTools::syncEdgeList ( @@ -4663,7 +4663,7 @@ void Foam::snappyLayerDriver::doLayers if (numLayers[mpi] > 0 || numLayers[spi]) { - isExtrudedZoneFace.setMany(fZone); + isExtrudedZoneFace.set(fZone); } } } diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C index 4a0a76ab9fa..c7a165672a9 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C @@ -150,13 +150,13 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement // { // label own = mesh.faceOwner()[facei]; // const cell& ownFaces = mesh.cells()[own]; - // newIsFront.setMany(ownFaces); + // newIsFront.set(ownFaces); // // if (mesh.isInternalFace(facei)) // { // label nei = mesh.faceNeighbour()[facei]; // const cell& neiFaces = mesh.cells()[nei]; - // newIsFront.setMany(neiFaces); + // newIsFront.set(neiFaces); // } // } // } @@ -186,7 +186,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement if (!isFront[facei] && ownLevel != neiLevel) { const face& f = mesh.faces()[facei]; - isMovingPoint.setMany(f); + isMovingPoint.set(f); ++nInterface; } @@ -203,7 +203,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement if (!isFront[facei] && ownLevel != neiLevel) { const face& f = mesh.faces()[facei]; - isMovingPoint.setMany(f); + isMovingPoint.set(f); ++nInterface; } @@ -2265,7 +2265,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::snappySnapDriver::repatchToSurface const label zoneSurfi = zonedSurfaces[i]; const faceZone& fZone = fZones[surfZones[zoneSurfi].faceZoneName()]; - isZonedFace.setMany(fZone); + isZonedFace.set(fZone); } } diff --git a/src/meshTools/cellClassification/cellClassification.C b/src/meshTools/cellClassification/cellClassification.C index cac1a244996..54feab18b66 100644 --- a/src/meshTools/cellClassification/cellClassification.C +++ b/src/meshTools/cellClassification/cellClassification.C @@ -300,7 +300,7 @@ void Foam::cellClassification::markCells // Mark faces of celli const labelList& myFaces = mesh_.cells()[celli]; - outsideFacesMap.insertMany(myFaces); + outsideFacesMap.insert(myFaces); } } diff --git a/src/meshTools/cellDist/cellDistFuncs.C b/src/meshTools/cellDist/cellDistFuncs.C index add2a76885e..5ab03bd4737 100644 --- a/src/meshTools/cellDist/cellDistFuncs.C +++ b/src/meshTools/cellDist/cellDistFuncs.C @@ -172,7 +172,7 @@ Foam::label Foam::cellDistFuncs::getPointNeighbours forAll(f, fp) { const labelList& pointNbs = patch.pointFaces()[f[fp]]; - nbs.insertMany(pointNbs); + nbs.insert(pointNbs); } // Subtract ours. diff --git a/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C b/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C index f1e49648676..0baeaef92a0 100644 --- a/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C +++ b/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C @@ -1531,14 +1531,14 @@ void Foam::extendedEdgeMesh::autoMap label pointI = pointMap[subPointI]; const labelList& pNormals = featurePointNormals()[pointI]; - isSubNormal.setMany(pNormals); + isSubNormal.set(pNormals); } forAll(edgeMap, subEdgeI) { label edgeI = edgeMap[subEdgeI]; const labelList& eNormals = edgeNormals()[edgeI]; - isSubNormal.setMany(eNormals); + isSubNormal.set(eNormals); } forAll(isSubNormal, normalI) diff --git a/src/meshTools/indexedOctree/treeDataFace.C b/src/meshTools/indexedOctree/treeDataFace.C index 41b709f0733..2548717c691 100644 --- a/src/meshTools/indexedOctree/treeDataFace.C +++ b/src/meshTools/indexedOctree/treeDataFace.C @@ -47,7 +47,7 @@ Foam::treeBoundBox Foam::treeDataFace::calcBb(const label facei) const void Foam::treeDataFace::update() { - isTreeFace_.setMany(faceLabels_); + isTreeFace_.set(faceLabels_); if (cacheBb_) { diff --git a/src/meshTools/meshTools/meshTools.C b/src/meshTools/meshTools/meshTools.C index 4caac134517..07fc46bec47 100644 --- a/src/meshTools/meshTools/meshTools.C +++ b/src/meshTools/meshTools/meshTools.C @@ -301,7 +301,7 @@ void Foam::meshTools::writeOBJ forAll(cellLabels, i) { const cell& cFaces = cells[cellLabels[i]]; - usedFaces.insertMany(cFaces); + usedFaces.insert(cFaces); } writeOBJ(os, faces, points, usedFaces.toc()); diff --git a/src/meshTools/sets/faceSources/normalToFace/normalToFace.C b/src/meshTools/sets/faceSources/normalToFace/normalToFace.C index 576aeae4494..7430c4fe2b1 100644 --- a/src/meshTools/sets/faceSources/normalToFace/normalToFace.C +++ b/src/meshTools/sets/faceSources/normalToFace/normalToFace.C @@ -33,13 +33,9 @@ License namespace Foam { - defineTypeNameAndDebug(normalToFace, 0); - addToRunTimeSelectionTable(topoSetSource, normalToFace, word); - addToRunTimeSelectionTable(topoSetSource, normalToFace, istream); - } @@ -160,7 +156,7 @@ void Foam::normalToFace::applyToSet } } - set.eraseMany(toBeRemoved); + set.erase(toBeRemoved); } } diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C index 1aaf5824f71..aa5b7098d67 100644 --- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C +++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C @@ -384,7 +384,7 @@ Foam::labelHashSet Foam::triSurfaceTools::getCollapsedFaces const labelList& myFaces = surf.edgeFaces()[edgeI]; labelHashSet facesToBeCollapsed(2*myFaces.size()); - facesToBeCollapsed.insertMany(myFaces); + facesToBeCollapsed.insert(myFaces); // From faces using v1 check if they share an edge with faces // using v2. diff --git a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C index c2eb7468029..8ffc7f6c6e8 100644 --- a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C +++ b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C @@ -162,7 +162,7 @@ void Foam::cellCellStencils::cellVolumeWeight::walkFront << " to " << fraction << endl; } allCellTypes[own] = INTERPOLATED; - newIsFront.setMany(mesh_.cells()[own]); + newIsFront.set(mesh_.cells()[own]); } } if (mesh_.isInternalFace(faceI)) @@ -182,7 +182,7 @@ void Foam::cellCellStencils::cellVolumeWeight::walkFront } allCellTypes[nei] = INTERPOLATED; - newIsFront.setMany(mesh_.cells()[nei]); + newIsFront.set(mesh_.cells()[nei]); } } } diff --git a/src/parallel/decompose/decompositionMethods/structuredDecomp/structuredDecomp.C b/src/parallel/decompose/decompositionMethods/structuredDecomp/structuredDecomp.C index c7e1a893424..c1aff868785 100644 --- a/src/parallel/decompose/decompositionMethods/structuredDecomp/structuredDecomp.C +++ b/src/parallel/decompose/decompositionMethods/structuredDecomp/structuredDecomp.C @@ -85,7 +85,7 @@ Foam::labelList Foam::structuredDecomp::decompose labelHashSet patchCells(2*nFaces); for (const label patchi : patchIDs) { - patchCells.insertMany(pbm[patchi].faceCells()); + patchCells.insert(pbm[patchi].faceCells()); } // Subset the layer of cells next to the patch diff --git a/src/renumber/renumberMethods/structuredRenumber/structuredRenumber.C b/src/renumber/renumberMethods/structuredRenumber/structuredRenumber.C index 8c2ffc0014e..030ba6dffce 100644 --- a/src/renumber/renumberMethods/structuredRenumber/structuredRenumber.C +++ b/src/renumber/renumberMethods/structuredRenumber/structuredRenumber.C @@ -160,7 +160,7 @@ Foam::labelList Foam::structuredRenumber::renumber labelHashSet patchCells(2*nFaces); for (const label patchId : patchIDs) { - patchCells.insertMany(pbm[patchId].faceCells()); + patchCells.insert(pbm[patchId].faceCells()); } label nTotalSeeds = returnReduce(patchCells.size(), sumOp<label>()); diff --git a/src/sampling/probes/probes.C b/src/sampling/probes/probes.C index 427d038b9b4..a41839cade1 100644 --- a/src/sampling/probes/probes.C +++ b/src/sampling/probes/probes.C @@ -177,17 +177,17 @@ Foam::label Foam::probes::prepare() { wordHashSet currentFields; - currentFields.insertMany(scalarFields_); - currentFields.insertMany(vectorFields_); - currentFields.insertMany(sphericalTensorFields_); - currentFields.insertMany(symmTensorFields_); - currentFields.insertMany(tensorFields_); - - currentFields.insertMany(surfaceScalarFields_); - currentFields.insertMany(surfaceVectorFields_); - currentFields.insertMany(surfaceSphericalTensorFields_); - currentFields.insertMany(surfaceSymmTensorFields_); - currentFields.insertMany(surfaceTensorFields_); + currentFields.insert(scalarFields_); + currentFields.insert(vectorFields_); + currentFields.insert(sphericalTensorFields_); + currentFields.insert(symmTensorFields_); + currentFields.insert(tensorFields_); + + currentFields.insert(surfaceScalarFields_); + currentFields.insert(surfaceVectorFields_); + currentFields.insert(surfaceSphericalTensorFields_); + currentFields.insert(surfaceSymmTensorFields_); + currentFields.insert(surfaceTensorFields_); DebugInfo << "Probing fields: " << currentFields << nl diff --git a/src/sampling/surfMeshSample/surfMeshSamplers/surfMeshSamplers.C b/src/sampling/surfMeshSample/surfMeshSamplers/surfMeshSamplers.C index 7f269240af3..44ca76df3c7 100644 --- a/src/sampling/surfMeshSample/surfMeshSamplers/surfMeshSamplers.C +++ b/src/sampling/surfMeshSample/surfMeshSamplers/surfMeshSamplers.C @@ -243,11 +243,11 @@ bool Foam::surfMeshSamplers::execute() // The acceptable fields wordHashSet acceptable(added); - acceptable.insertMany(acceptType<scalar>()); - acceptable.insertMany(acceptType<vector>()); - acceptable.insertMany(acceptType<sphericalTensor>()); - acceptable.insertMany(acceptType<symmTensor>()); - acceptable.insertMany(acceptType<tensor>()); + acceptable.insert(acceptType<scalar>()); + acceptable.insert(acceptType<vector>()); + acceptable.insert(acceptType<sphericalTensor>()); + acceptable.insert(acceptType<symmTensor>()); + acceptable.insert(acceptType<tensor>()); const wordList fields = acceptable.sortedToc(); if (!fields.empty()) diff --git a/src/sampling/surface/isoSurface/isoSurface.C b/src/sampling/surface/isoSurface/isoSurface.C index 1a2f36b07ec..d3faf431f2a 100644 --- a/src/sampling/surface/isoSurface/isoSurface.C +++ b/src/sampling/surface/isoSurface/isoSurface.C @@ -1572,7 +1572,7 @@ Foam::isoSurface::isoSurface { const face& f = mesh_.faces()[cpp.start()+i]; - isBoundaryPoint.setMany(f); + isBoundaryPoint.set(f); } } } @@ -1584,7 +1584,7 @@ Foam::isoSurface::isoSurface { const face& f = mesh_.faces()[pp.start()+i]; - isBoundaryPoint.setMany(f); + isBoundaryPoint.set(f); } } } diff --git a/src/sampling/surface/isoSurface/isoSurfaceCell.C b/src/sampling/surface/isoSurface/isoSurfaceCell.C index b110d1552cc..05d2eb00f2c 100644 --- a/src/sampling/surface/isoSurface/isoSurfaceCell.C +++ b/src/sampling/surface/isoSurface/isoSurfaceCell.C @@ -695,7 +695,7 @@ void Foam::isoSurfaceCell::calcSnappedPoint { const face& f = mesh_.faces()[facei++]; - isBoundaryPoint.setMany(f); + isBoundaryPoint.set(f); } } } diff --git a/src/surfMesh/triSurface/triSurfaceIO.C b/src/surfMesh/triSurface/triSurfaceIO.C index 7d3154f416b..3c38733d217 100644 --- a/src/surfMesh/triSurface/triSurfaceIO.C +++ b/src/surfMesh/triSurface/triSurfaceIO.C @@ -339,7 +339,7 @@ void Foam::triSurface::writeStats(Ostream& os) const forAll(f, fp) { const label pointi = f[fp]; - if (pointIsUsed.set(pointi, 1)) + if (pointIsUsed.set(pointi)) { bb.add(points()[pointi]); ++nPoints; diff --git a/src/surfMesh/triSurface/triSurfaceStitch.C b/src/surfMesh/triSurface/triSurfaceStitch.C index 47e47f28b22..0cdbcd3e9a7 100644 --- a/src/surfMesh/triSurface/triSurfaceStitch.C +++ b/src/surfMesh/triSurface/triSurfaceStitch.C @@ -109,7 +109,7 @@ bool Foam::triSurface::stitchTriangles { for (const label pointi : f) { - if (pointIsUsed.set(pointi, 1)) + if (pointIsUsed.set(pointi)) { ++nPoints; } -- GitLab