diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index 6b6d10d182cbbc28dc14e34fee26caf1c28c5825..ee6a7b36622d1bd04c8b27d7f298832fecaceea8 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -900,12 +900,10 @@ void Foam::conformalVoronoiMesh::writeMesh mesh.addFvPatches(patches); - // Add zones to the mesh addZones(mesh, cellCentres); - Info<< indent << "Add pointZones" << endl; { label sz = mesh.pointZones().size(); @@ -914,6 +912,9 @@ void Foam::conformalVoronoiMesh::writeMesh forAll(dualMeshPointTypeNames_, typeI) { + const word& znName = + dualMeshPointTypeNames_[dualMeshPointType(typeI)]; + forAll(boundaryPts, ptI) { const label& bPtType = boundaryPts[ptI]; @@ -928,14 +929,14 @@ void Foam::conformalVoronoiMesh::writeMesh Info<< incrIndent << indent << "Adding " << bPts.size() - << " points of type " << dualMeshPointTypeNames_.words()[typeI] + << " points of type " << znName << decrIndent << endl; mesh.pointZones().append ( new pointZone ( - dualMeshPointTypeNames_.words()[typeI], + znName, bPts, sz + typeI, mesh.pointZones() diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C index 9bf799d6b341de7d3c2943a48e82bf4556c40d3f..bc887b7d3b9217107ec495e432a52eaf569cf5ec 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C @@ -29,7 +29,6 @@ License #include "HashTable.H" #include "List.H" #include "FixedList.H" -#include "Tuple2.H" // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -112,14 +111,14 @@ Foam::HashTable<T, Key, Hash>::HashTable template<class T, class Key, class Hash> Foam::HashTable<T, Key, Hash>::HashTable ( - std::initializer_list<Tuple2<Key, T>> lst + std::initializer_list<std::pair<Key, T>> lst ) : HashTable<T, Key, Hash>(2*lst.size()) { - for (const Tuple2<Key, T>& pair : lst) + for (const auto& pair : lst) { - insert(pair.first(), pair.second()); + insert(pair.first, pair.second); } } @@ -889,7 +888,7 @@ void Foam::HashTable<T, Key, Hash>::operator= template<class T, class Key, class Hash> void Foam::HashTable<T, Key, Hash>::operator= ( - std::initializer_list<Tuple2<Key, T>> lst + std::initializer_list<std::pair<Key, T>> lst ) { // Could be zero-sized from a previous transfer() @@ -904,7 +903,7 @@ void Foam::HashTable<T, Key, Hash>::operator= for (const auto& pair : lst) { - insert(pair.first(), pair.second()); + insert(pair.first, pair.second); } } diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H index 3f9a2df85fc41a92137ce58a0e05ab96bb2d2056..06635bbac336663df8cc110fd70c773d3c542529 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H @@ -62,6 +62,7 @@ SourceFiles #include <initializer_list> #include <iterator> +#include <utility> // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -73,7 +74,6 @@ namespace Foam template<class T> class List; template<class T> class UList; template<class T, unsigned Size> class FixedList; -template<class T1, class T2> class Tuple2; template<class T, class Key, class Hash> class HashTable; template<class T, class Key, class Hash> @@ -212,7 +212,7 @@ private: // Private data type for table entries - //- Structure to hold a hashed entry, with a SLList for collisions + //- Structure to hold a hashed entry, with a linked-list for collisions struct hashedEntry { //- The lookup key @@ -224,7 +224,7 @@ private: //- Pointer to next hashedEntry in sub-list hashedEntry* next_; - //- Construct from key, next pointer and object + //- Construct from key, object, next pointer inline hashedEntry(const Key& key, const T& obj, hashedEntry* next); private: @@ -296,7 +296,7 @@ public: HashTable(const Xfer<HashTable<T, Key, Hash>>& ht); //- Construct from an initializer list - HashTable(std::initializer_list<Tuple2<Key, T>> lst); + HashTable(std::initializer_list<std::pair<Key, T>> lst); //- Destructor @@ -558,7 +558,7 @@ public: void operator=(const HashTable<T, Key, Hash>& rhs); //- Assignment from an initializer list - void operator=(std::initializer_list<Tuple2<Key, T>> lst); + void operator=(std::initializer_list<std::pair<Key, T>> lst); //- Equality. Hash tables are equal if the keys and values are equal. // Independent of table storage size and table order. diff --git a/src/OpenFOAM/containers/HashTables/Map/Map.H b/src/OpenFOAM/containers/HashTables/Map/Map.H index 4ac6e90e60de910576029cbd93aa98413c31ee01..56f59128dd168c826b9b5c3e8d042ab3c68fc71a 100644 --- a/src/OpenFOAM/containers/HashTables/Map/Map.H +++ b/src/OpenFOAM/containers/HashTables/Map/Map.H @@ -96,7 +96,7 @@ public: {} //- Construct from an initializer list - Map(std::initializer_list<Tuple2<label, T>> map) + Map(std::initializer_list<std::pair<label, T>> map) : parent_type(map) {} diff --git a/src/OpenFOAM/global/profiling/profiling.H b/src/OpenFOAM/global/profiling/profiling.H index 03a014f48be5d9da8cda5d3c9d0f8b8c3c4b550d..26337bcc4e09b5dc21f583de9f3adb2722c3a4fb 100644 --- a/src/OpenFOAM/global/profiling/profiling.H +++ b/src/OpenFOAM/global/profiling/profiling.H @@ -54,6 +54,7 @@ SourceFiles #include "profilingTrigger.H" #include "HashPtrTable.H" +#include "Tuple2.H" #include "LIFOStack.H" #include "Map.H" #include "Time.H"