From 1c9102dadacbde9ad54708e695179dc5e50bfd44 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 18 Nov 2008 23:11:09 +0100 Subject: [PATCH] HashSet gets additional operators - operator+= : add in the listed keys - operator-= : remove the listed keys - operator&= : intersection of keys - added xfer constructor (just in case) - moved labelHashSet typedef to HashSet.H, for consistency with the wordHashSet typedef being there and since it is used so often --- applications/test/HashSet/hashSetTest.C | 44 ++++++++--- .../mesh/manipulation/splitMesh/regionSide.H | 2 +- .../containers/HashTables/HashSet/HashSet.C | 77 ++++++++++++------- .../containers/HashTables/HashSet/HashSet.H | 58 +++++++++++--- src/OpenFOAM/containers/HashTables/Map/Map.H | 14 +++- .../HashTables/labelHashSet/labelHashSet.H | 54 ------------- .../mapPolyMesh/faceMapper/faceMapper.H | 2 +- .../meshes/polyMesh/mapPolyMesh/mapPolyMesh.H | 2 +- .../meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H | 2 +- .../PrimitivePatch/PrimitivePatch.H | 2 +- .../PrimitivePatch/PrimitivePatchBdryPoints.C | 2 +- .../meshes/primitiveMesh/primitiveMesh.H | 2 +- .../meshCut/cellLooper/geomCellLooper.C | 2 +- .../motionSmoother/motionSmoother.H | 2 +- .../polyMeshGeometry/polyMeshGeometry.H | 2 +- .../polyTopoChange/faceCollapser.H | 2 +- .../polyTopoChange/polyTopoChange/hexRef8.H | 2 +- .../polyTopoChange/localPointRegion.H | 2 +- .../polyTopoChange/polyTopoChange.H | 2 +- .../polyTopoChange/removeFaces.H | 2 +- .../faceStencil/cellEdgeCellStencil.H | 2 +- .../faceStencil/cellPointCellStencil.H | 2 +- .../faceStencil/faceEdgeCellStencil.H | 2 +- .../extendedStencil/faceStencil/faceStencil.H | 2 +- .../fvMesh/fvMeshMapper/fvSurfaceMapper.H | 2 +- .../fvMesh/fvMeshSubset/fvMeshSubset.H | 2 +- .../inverseDistanceDiffusivity.C | 2 +- .../inverseFaceDistanceDiffusivity.C | 6 +- .../inversePointDistanceDiffusivity.C | 8 +- .../inverseVolume/inverseVolumeDiffusivity.C | 2 +- src/meshTools/cellDist/cellDistFuncs.H | 2 +- src/meshTools/cellFeatures/cellFeatures.C | 2 +- src/meshTools/cellFeatures/cellFeatures.H | 2 +- src/meshTools/indexedOctree/indexedOctree.H | 2 +- src/meshTools/octree/treeLeaf.C | 2 +- src/meshTools/octree/treeLeaf.H | 2 +- src/meshTools/octree/treeNode.H | 2 +- .../primitiveMeshGeometry.H | 2 +- src/meshTools/sets/topoSets/topoSet.H | 2 +- .../surfaceIntersection/edgeIntersections.C | 1 - .../surfaceIntersection/surfaceIntersection.C | 1 - .../surfaceIntersectionFuncs.C | 1 - .../surfaceFeatures/surfaceFeatures.H | 10 +-- .../triSurfaceTools/triSurfaceTools.H | 2 +- src/postProcessing/forces/forces/forces.H | 2 +- .../minMaxFields/minMaxFields.H | 2 +- 46 files changed, 190 insertions(+), 154 deletions(-) delete mode 100644 src/OpenFOAM/containers/HashTables/labelHashSet/labelHashSet.H diff --git a/applications/test/HashSet/hashSetTest.C b/applications/test/HashSet/hashSetTest.C index 386839a497..901d791c21 100644 --- a/applications/test/HashSet/hashSetTest.C +++ b/applications/test/HashSet/hashSetTest.C @@ -26,7 +26,7 @@ Description \*---------------------------------------------------------------------------*/ -#include "labelHashSet.H" +#include "HashSet.H" using namespace Foam; @@ -35,19 +35,45 @@ using namespace Foam; int main(int argc, char *argv[]) { - HashSet testSet(0); + HashSet setA(0); - testSet.insert("kjhk"); - testSet.insert("kjhk2"); + setA.insert("kjhk"); + setA.insert("kjhk2"); - Info<< testSet << endl; + Info<< setA << endl; - labelHashSet testLabelHashSet(1); + labelHashSet setB(1); + setB.insert(11); + setB.insert(42); - testLabelHashSet.insert(11); - testLabelHashSet.insert(42); + Info<< "setB : " << setB << endl; - Info<< testLabelHashSet << endl; + labelHashSet setC(1); + setC.insert(2008); + setC.insert(1984); + + Info<< "setC : " << setC << endl; + + labelHashSet setD(1); + setD.insert(11); + setD.insert(100); + setD.insert(2008); + + Info<< "setD : " << setD << endl; + + Info<< "setB == setC: " << (setB == setC) << endl; + Info<< "setC != setD: " << (setC != setD) << endl; + + // test operations + setB += setC; + Info<< "setB += setC : " << setB << endl; + + setB &= setD; + Info<< "setB &= setD : " << setB << endl; + + setB += setC; + setB -= setD; + Info<< "setB += setC -= setD : " << setB << endl; return 0; } diff --git a/applications/utilities/mesh/manipulation/splitMesh/regionSide.H b/applications/utilities/mesh/manipulation/splitMesh/regionSide.H index 514c928095..776fa33117 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/regionSide.H +++ b/applications/utilities/mesh/manipulation/splitMesh/regionSide.H @@ -45,7 +45,7 @@ SourceFiles #ifndef regionSide_H #define regionSide_H -#include "labelHashSet.H" +#include "HashSet.H" #include "typeInfo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C index b5c199e9be..6bd0e0200c 100644 --- a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C +++ b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C @@ -29,62 +29,81 @@ License #include "HashSet.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // template -bool HashSet::operator==(const HashSet& ht) const +bool Foam::HashSet::operator==(const HashSet& rhs) const { - const HashTable& a = *this; - - // Are all my elements in ht? - for - ( - typename HashTable::const_iterator iter = a.begin(); - iter != a.end(); - ++iter - ) + // Are all lhs elements in rhs? + for (const_iterator iter = this->begin(); iter != this->end(); ++iter) { - if (!ht.found(iter.key())) + if (!rhs.found(iter.key())) { return false; } } - // Are all ht elements in me? - for - ( - typename HashTable::const_iterator iter = ht.begin(); - iter != ht.end(); - ++iter - ) + // Are all rhs elements in lhs? + for (const_iterator iter = rhs.begin(); iter != rhs.end(); ++iter) { if (!found(iter.key())) { return false; } } + return true; } template -bool HashSet::operator!=(const HashSet& ht) const +bool Foam::HashSet::operator!=(const HashSet& rhs) const { - return !(operator==(ht)); + return !(operator==(rhs)); } +template +void Foam::HashSet::operator+=(const HashSet& rhs) +{ + // Add in rhs elements into lhs + for (const_iterator iter = rhs.begin(); iter != rhs.end(); ++iter) + { + insert(iter.key()); + } +} + + +template +void Foam::HashSet::operator-=(const HashSet& rhs) +{ + // Remove rhs elements from lhs + for (const_iterator iter = rhs.begin(); iter != rhs.end(); ++iter) + { + erase(iter.key()); + } +} + + +template +void Foam::HashSet::operator&=(const HashSet& rhs) +{ + // Remove elements not found in rhs as well + for (iterator iter = this->begin(); iter != this->end(); ++iter) + { + if (!rhs.found(iter.key())) + { + erase(iter); + } + } +} + + +// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam - -// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H index 3985e574fb..4a6fd3de90 100644 --- a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H +++ b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H @@ -26,7 +26,7 @@ Class Foam::HashSet Description - A HashTable with word keys but without contents. + A HashTable with keys but without contents. Typedef Foam::wordHashSet @@ -34,6 +34,12 @@ Typedef Description A HashSet with (the default) word keys. +Typedef + Foam::labelHashSet + +Description + A HashSet with label keys. + \*---------------------------------------------------------------------------*/ #ifndef HashSet_H @@ -48,7 +54,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class HashSet Declaration + Class HashSet Declaration \*---------------------------------------------------------------------------*/ template @@ -59,9 +65,13 @@ class HashSet public: + typedef typename HashTable::iterator iterator; + typedef typename HashTable::const_iterator const_iterator; + + // Constructors - //- Construct given initial map size + //- Construct given initial size HashSet(label size = 100) : HashTable(size) @@ -74,13 +84,13 @@ public: {} //- Construct from UList of Key - HashSet(const UList& ul) + HashSet(const UList& lst) : - HashTable(2*ul.size()) + HashTable(2*lst.size()) { - forAll (ul, i) + forAll(lst, i) { - insert(ul[i]); + insert(lst[i]); } } @@ -90,32 +100,58 @@ public: HashTable(hs) {} + //- Construct by transferring the parameter contents + HashSet(const xfer >& hs) + : + HashTable(hs) + {} + // Member Functions // Edit - //- Insert a new hashedEntry + //- Insert a new entry bool insert(const Key& key) { return HashTable::insert(key, empty()); } + //- Same as insert (cannot overwrite empty content) + bool set(const Key& key) + { + return HashTable::insert(key, empty()); + } + // Member Operators - //- Equality. Two hashtables are equal if all contents of first are - // also in second and vice versa. So does not depend on table size or - // order! + //- Equality. Two hashtables are equal when their contents are equal. + // Independent of table size or order. bool operator==(const HashSet&) const; //- The opposite of the equality operation. bool operator!=(const HashSet&) const; + + + //- Add entries listed in the given HashSet to this HashSet + void operator+=(const HashSet&); + + //- Remove entries listed in the given HashSet from this HashSet + void operator-=(const HashSet&); + + //- Only retain entries found in both HashSets + void operator&=(const HashSet&); + }; +//- A HashSet with word keys. typedef HashSet<> wordHashSet; +//- A HashSet with label keys. +typedef HashSet > labelHashSet; + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/containers/HashTables/Map/Map.H b/src/OpenFOAM/containers/HashTables/Map/Map.H index 533e7f520c..1969cb453e 100644 --- a/src/OpenFOAM/containers/HashTables/Map/Map.H +++ b/src/OpenFOAM/containers/HashTables/Map/Map.H @@ -54,9 +54,15 @@ class Map { public: + + typedef typename HashTable >::iterator iterator; + + typedef typename HashTable >::const_iterator + const_iterator; + // Constructors - //- Construct given initial map size + //- Construct given initial size Map(label size = 100) : HashTable >(size) @@ -74,6 +80,12 @@ public: HashTable >(map) {} + //- Construct by transferring the parameter contents + Map(const xfer >& map) + : + HashTable >(map) + {} + //- Return a null Map static const Map& null() diff --git a/src/OpenFOAM/containers/HashTables/labelHashSet/labelHashSet.H b/src/OpenFOAM/containers/HashTables/labelHashSet/labelHashSet.H deleted file mode 100644 index 0829ddc609..0000000000 --- a/src/OpenFOAM/containers/HashTables/labelHashSet/labelHashSet.H +++ /dev/null @@ -1,54 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Typedef - Foam::labelHashSet - -Description - A HashSet with label keys. - -See Also - wordHashSet - -\*---------------------------------------------------------------------------*/ - -#ifndef labelHashSet_H -#define labelHashSet_H - -#include "HashSet.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -typedef HashSet > labelHashSet; - -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.H index 34d5c72bce..998f9374b2 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.H @@ -39,7 +39,7 @@ SourceFiles #define faceMapper_H #include "morphFieldMapper.H" -#include "labelHashSet.H" +#include "HashSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H index bbb9cf0170..e56f87e442 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H @@ -143,7 +143,7 @@ SourceFiles #include "labelList.H" #include "objectMap.H" #include "pointField.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "Map.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H index a6b31b8b3b..8b77dfb323 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H @@ -39,7 +39,7 @@ SourceFiles #include "List.H" #include "IndirectList.H" #include "regIOobject.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "pointFieldsFwd.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H index e7d4a410fa..252eb3e10e 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H @@ -57,7 +57,7 @@ SourceFiles #include "edgeList.H" #include "point.H" #include "intersection.H" -#include "labelHashSet.H" +#include "HashSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchBdryPoints.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchBdryPoints.C index 8af30eb9ef..6a86199ede 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchBdryPoints.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchBdryPoints.C @@ -27,7 +27,7 @@ Description \*---------------------------------------------------------------------------*/ #include "PrimitivePatch.H" -#include "labelHashSet.H" +#include "HashSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H index 6150670a7f..8e917ef2f6 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H @@ -64,7 +64,7 @@ SourceFiles #include "cellShapeList.H" #include "labelList.H" #include "boolList.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "Map.H" #include "EdgeMap.H" diff --git a/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C b/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C index eeff243a5d..ae6ec84183 100644 --- a/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C @@ -31,7 +31,7 @@ License #include "meshTools.H" #include "SortableList.H" #include "triSurfaceTools.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "ListOps.H" #include "transform.H" diff --git a/src/dynamicMesh/motionSmoother/motionSmoother.H b/src/dynamicMesh/motionSmoother/motionSmoother.H index c9e20f6a55..666176d3ef 100644 --- a/src/dynamicMesh/motionSmoother/motionSmoother.H +++ b/src/dynamicMesh/motionSmoother/motionSmoother.H @@ -75,7 +75,7 @@ SourceFiles #define motionSmoother_H #include "pointFields.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "PackedList.H" #include "indirectPrimitivePatch.H" #include "className.H" diff --git a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.H b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.H index f3f527c5a8..baab56a6a0 100644 --- a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.H +++ b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.H @@ -40,7 +40,7 @@ SourceFiles #define polyMeshGeometry_H #include "pointFields.H" -#include "labelHashSet.H" +#include "HashSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/faceCollapser.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/faceCollapser.H index bd80ae1e77..eb0cafd31a 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/faceCollapser.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/faceCollapser.H @@ -56,7 +56,7 @@ SourceFiles #include "labelList.H" #include "point.H" #include "Map.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "typeInfo.H" #include "edgeList.H" diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H index ea67874474..16b8c7f510 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H @@ -38,7 +38,7 @@ SourceFiles #include "labelIOList.H" #include "face.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "DynamicList.H" #include "primitivePatch.H" #include "removeFaces.H" diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/localPointRegion.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/localPointRegion.H index 95d05d3aed..1ef0c93b28 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/localPointRegion.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/localPointRegion.H @@ -46,7 +46,7 @@ SourceFiles #include "typeInfo.H" #include "Map.H" #include "labelList.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "faceList.H" #include "boolList.H" diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H index 1eccbed5f2..57cfd3a3fc 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H @@ -73,7 +73,7 @@ SourceFiles #include "PtrList.H" #include "cellList.H" #include "Map.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "mapPolyMesh.H" #include "CompactListList.H" #include "PackedList.H" diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.H index 48ac6169e8..aac06e43f6 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.H @@ -40,7 +40,7 @@ SourceFiles #define removeFaces_H #include "Pstream.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "Map.H" #include "boolList.H" #include "indirectPrimitivePatch.H" diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellEdgeCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellEdgeCellStencil.H index 4091ffb40f..7022e88a4d 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellEdgeCellStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellEdgeCellStencil.H @@ -37,7 +37,7 @@ SourceFiles #include "faceStencil.H" #include "boolList.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "Map.H" #include "EdgeMap.H" diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellPointCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellPointCellStencil.H index 301a430899..9c3178746a 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellPointCellStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellPointCellStencil.H @@ -37,7 +37,7 @@ SourceFiles #include "faceStencil.H" #include "boolList.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "Map.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceEdgeCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceEdgeCellStencil.H index be5ab855a0..a69a47d0df 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceEdgeCellStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceEdgeCellStencil.H @@ -38,7 +38,7 @@ SourceFiles #include "faceStencil.H" #include "boolList.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "Map.H" #include "EdgeMap.H" diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceStencil.H index 058d1e61ce..8b019a6912 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceStencil.H @@ -38,7 +38,7 @@ SourceFiles #include "globalIndex.H" #include "boolList.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "indirectPrimitivePatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.H b/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.H index 404f0d6450..21267d98c3 100644 --- a/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.H +++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.H @@ -39,7 +39,7 @@ SourceFiles #include "morphFieldMapper.H" #include "fvMesh.H" #include "faceMapper.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "mapPolyMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.H b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.H index 3fbc20d9f8..6577c68987 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.H +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.H @@ -60,7 +60,7 @@ SourceFiles #include "fvPatchFieldMapper.H" #include "pointPatchFieldMapper.H" #include "GeometricField.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "surfaceMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/fvMotionSolver/motionDiffusivity/inverseDistance/inverseDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inverseDistance/inverseDistanceDiffusivity.C index 782d4dbdbd..502372e5dc 100644 --- a/src/fvMotionSolver/motionDiffusivity/inverseDistance/inverseDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inverseDistance/inverseDistanceDiffusivity.C @@ -27,7 +27,7 @@ License #include "inverseDistanceDiffusivity.H" #include "addToRunTimeSelectionTable.H" #include "patchWave.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "surfaceInterpolate.H" #include "zeroGradientFvPatchFields.H" diff --git a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C index cf6c3e4390..a143cc2188 100644 --- a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C @@ -26,7 +26,7 @@ License #include "inverseFaceDistanceDiffusivity.H" #include "addToRunTimeSelectionTable.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "wallPoint.H" #include "MeshWave.H" @@ -98,7 +98,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct() const polyPatch& patch = bdry[iter.key()]; const vectorField::subField fc = patch.faceCentres(); - + forAll(fc, patchFaceI) { changedFaces[nPatchFaces] = patch.start() + patchFaceI; @@ -134,7 +134,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct() fvsPatchScalarField& bfld = faceDiffusivity_.boundaryField()[patchI]; const unallocLabelList& faceCells = bfld.patch().faceCells(); - + if (patchSet.found(patchI)) { forAll(bfld, i) diff --git a/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C index 5859c4d356..db85f30c3b 100644 --- a/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C @@ -26,7 +26,7 @@ License #include "inversePointDistanceDiffusivity.H" #include "addToRunTimeSelectionTable.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "pointEdgePoint.H" #include "PointEdgeWave.H" @@ -133,7 +133,7 @@ void Foam::inversePointDistanceDiffusivity::correct() mesh, seedPoints, seedInfo, - + pointWallDist, edgeWallDist, mesh.globalData().nTotalPoints() // max iterations @@ -167,7 +167,7 @@ void Foam::inversePointDistanceDiffusivity::correct() forAll(bfld, i) { const cell& ownFaces = mesh.cells()[faceCells[i]]; - + labelHashSet cPoints(4*ownFaces.size()); scalar dist = 0; @@ -185,7 +185,7 @@ void Foam::inversePointDistanceDiffusivity::correct() } } dist /= cPoints.size(); - + bfld[i] = 1.0/dist; } } diff --git a/src/fvMotionSolver/motionDiffusivity/inverseVolume/inverseVolumeDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inverseVolume/inverseVolumeDiffusivity.C index 82e96d0a57..efa41b359b 100644 --- a/src/fvMotionSolver/motionDiffusivity/inverseVolume/inverseVolumeDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inverseVolume/inverseVolumeDiffusivity.C @@ -27,7 +27,7 @@ License #include "inverseVolumeDiffusivity.H" #include "addToRunTimeSelectionTable.H" #include "patchWave.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "surfaceInterpolate.H" #include "zeroGradientFvPatchFields.H" diff --git a/src/meshTools/cellDist/cellDistFuncs.H b/src/meshTools/cellDist/cellDistFuncs.H index 9d96bcea26..6295535f61 100644 --- a/src/meshTools/cellDist/cellDistFuncs.H +++ b/src/meshTools/cellDist/cellDistFuncs.H @@ -37,7 +37,7 @@ SourceFiles #define cellDistFuncs_H #include "scalarField.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "Map.H" #include "wordList.H" #include "scalarField.H" diff --git a/src/meshTools/cellFeatures/cellFeatures.C b/src/meshTools/cellFeatures/cellFeatures.C index 498e154840..3107dc79b0 100644 --- a/src/meshTools/cellFeatures/cellFeatures.C +++ b/src/meshTools/cellFeatures/cellFeatures.C @@ -28,7 +28,7 @@ Description #include "cellFeatures.H" #include "primitiveMesh.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "Map.H" #include "demandDrivenData.H" #include "ListOps.H" diff --git a/src/meshTools/cellFeatures/cellFeatures.H b/src/meshTools/cellFeatures/cellFeatures.H index 579f0558f3..dcb4edc7bf 100644 --- a/src/meshTools/cellFeatures/cellFeatures.H +++ b/src/meshTools/cellFeatures/cellFeatures.H @@ -44,7 +44,7 @@ SourceFiles #include "faceList.H" #include "labelList.H" #include "boolList.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "Map.H" #include "DynamicList.H" diff --git a/src/meshTools/indexedOctree/indexedOctree.H b/src/meshTools/indexedOctree/indexedOctree.H index 97b6ab607c..26d39ed68e 100644 --- a/src/meshTools/indexedOctree/indexedOctree.H +++ b/src/meshTools/indexedOctree/indexedOctree.H @@ -40,7 +40,7 @@ SourceFiles #include "pointIndexHit.H" #include "FixedList.H" #include "Ostream.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "labelBits.H" #include "PackedList.H" diff --git a/src/meshTools/octree/treeLeaf.C b/src/meshTools/octree/treeLeaf.C index 5825f55c0c..8a803adcb1 100644 --- a/src/meshTools/octree/treeLeaf.C +++ b/src/meshTools/octree/treeLeaf.C @@ -30,7 +30,7 @@ Description #include "treeNode.H" #include "treeBoundBox.H" #include "octree.H" -#include "labelHashSet.H" +#include "HashSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/octree/treeLeaf.H b/src/meshTools/octree/treeLeaf.H index 8f10146e75..f7544eb2bc 100644 --- a/src/meshTools/octree/treeLeaf.H +++ b/src/meshTools/octree/treeLeaf.H @@ -42,7 +42,7 @@ SourceFiles #include "treeElem.H" #include "boolList.H" #include "linePointRef.H" -#include "labelHashSet.H" +#include "HashSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/octree/treeNode.H b/src/meshTools/octree/treeNode.H index f052c211ae..f074ac7472 100644 --- a/src/meshTools/octree/treeNode.H +++ b/src/meshTools/octree/treeNode.H @@ -50,7 +50,7 @@ SourceFiles #include "treeBoundBoxList.H" #include "treeElem.H" #include "linePointRef.H" -#include "labelHashSet.H" +#include "HashSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.H b/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.H index 89265ad351..92179d7712 100644 --- a/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.H +++ b/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.H @@ -37,7 +37,7 @@ SourceFiles #define primitiveMeshGeometry_H #include "pointFields.H" -#include "labelHashSet.H" +#include "HashSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/sets/topoSets/topoSet.H b/src/meshTools/sets/topoSets/topoSet.H index db7bf3123d..750cfedb9a 100644 --- a/src/meshTools/sets/topoSets/topoSet.H +++ b/src/meshTools/sets/topoSets/topoSet.H @@ -39,7 +39,7 @@ SourceFiles #ifndef topoSet_H #define topoSet_H -#include "labelHashSet.H" +#include "HashSet.H" #include "regIOobject.H" #include "labelList.H" #include "typeInfo.H" diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C index 51117de14f..3d07e99a93 100644 --- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C +++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C @@ -31,7 +31,6 @@ Description #include "labelPairLookup.H" #include "OFstream.H" #include "HashSet.H" -#include "labelHashSet.H" #include "triSurface.H" #include "pointIndexHit.H" #include "treeDataTriSurface.H" diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C index 55423357eb..c2e187ebcb 100644 --- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C +++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C @@ -31,7 +31,6 @@ Description #include "labelPairLookup.H" #include "OFstream.H" #include "HashSet.H" -#include "labelHashSet.H" #include "triSurface.H" #include "pointIndexHit.H" #include "octreeDataTriSurface.H" diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C index b3d0e8409b..8cb24ea366 100644 --- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C +++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C @@ -31,7 +31,6 @@ Description #include "labelPairLookup.H" #include "OFstream.H" #include "HashSet.H" -#include "labelHashSet.H" #include "triSurface.H" #include "pointIndexHit.H" #include "octreeDataTriSurface.H" diff --git a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.H b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.H index 47fa49782c..18bdcecb3d 100644 --- a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.H +++ b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.H @@ -50,7 +50,7 @@ SourceFiles #include "pointField.H" #include "Map.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "pointIndexHit.H" #include "edgeList.H" #include "typeInfo.H" @@ -148,7 +148,7 @@ private: const List& edgeStat, const label startEdgeI, const label startPointI, - const label currentFeatI, + const label currentFeatI, labelList& featVisited ); @@ -180,7 +180,7 @@ public: const scalar minLen = 0, const label minElems = 0 ); - + //- Construct from dictionary surfaceFeatures(const triSurface&, const dictionary& dict); @@ -320,7 +320,7 @@ public: ( const labelList& selectedEdges, const pointField& samples, - const vector& searchSpan, // search span + const vector& searchSpan, // search span labelList& edgeLabel, labelList& edgeEndPoint, pointField& edgePoint @@ -339,7 +339,7 @@ public: const edgeList& sampleEdges, const labelList& selectedSampleEdges, const pointField& samplePoints, - const vector& searchSpan, // search span + const vector& searchSpan, // search span labelList& edgeLabel, // label of surface edge or -1 pointField& pointOnEdge, // point on above edge diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H index a43df7d16b..537bbe7565 100644 --- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H +++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H @@ -39,7 +39,7 @@ SourceFiles #include "boolList.H" #include "pointField.H" #include "DynamicList.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "FixedList.H" #include "vector2D.H" #include "triPointRef.H" diff --git a/src/postProcessing/forces/forces/forces.H b/src/postProcessing/forces/forces/forces.H index 35b1bdf034..bc4c177116 100644 --- a/src/postProcessing/forces/forces/forces.H +++ b/src/postProcessing/forces/forces/forces.H @@ -46,7 +46,7 @@ SourceFiles #include "primitiveFieldsFwd.H" #include "volFieldsFwd.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "Tuple2.H" #include "OFstream.H" #include "Switch.H" diff --git a/src/postProcessing/minMaxFields/minMaxFields.H b/src/postProcessing/minMaxFields/minMaxFields.H index 8a05ae3035..0dd58a34b3 100644 --- a/src/postProcessing/minMaxFields/minMaxFields.H +++ b/src/postProcessing/minMaxFields/minMaxFields.H @@ -45,7 +45,7 @@ SourceFiles #include "primitiveFieldsFwd.H" #include "volFieldsFwd.H" -#include "labelHashSet.H" +#include "HashSet.H" #include "OFstream.H" #include "Switch.H" #include "pointFieldFwd.H"