diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/multiphaseSystem/multiphaseSystem.H b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/multiphaseSystem/multiphaseSystem.H index 068d25961b..ef63221ac7 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/multiphaseSystem/multiphaseSystem.H +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/multiphaseSystem/multiphaseSystem.H @@ -54,20 +54,13 @@ class multiphaseSystem { protected: - typedef - HashTable - < - volScalarField::Internal, - word, - word::hash - > - SuSpTable; + typedef HashTable SuSpTable; typedef HashTable scalarTable; - typedef HashTable - compressionFluxTable; + typedef HashTable compressionFluxTable; + // Protected data diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.H b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.H index ad0dc154d0..031587beeb 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.H +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.H @@ -75,8 +75,7 @@ public: phasePairTable; - typedef - HashTable, word, word::hash> phaseModelTable; + typedef HashTable> phaseModelTable; protected: diff --git a/applications/test/FixedList/Test-FixedList.C b/applications/test/FixedList/Test-FixedList.C index 1e3703b2b8..0b5cff8374 100644 --- a/applications/test/FixedList/Test-FixedList.C +++ b/applications/test/FixedList/Test-FixedList.C @@ -139,13 +139,16 @@ int main(int argc, char *argv[]) FixedList list1{2, 3, 4, 5}; Info<< "list1:" << list1 - << " hash:" << FixedList::Hash<>()(list1) << nl; + << " hash:" << FixedList::Hash<>()(list1) << nl + << " hash:" << Hash>()(list1) << nl; label a[4] = {0, 1, 2, 3}; FixedList list2(a); Info<< "list2:" << list2 - << " hash:" << FixedList::Hash<>()(list2) << nl; + << " hash:" << FixedList::Hash<>()(list2) << nl + << " hash:" << Hash>()(list2) << nl; + // Using FixedList for content too { diff --git a/applications/test/Hashing/Test-Hashing.C b/applications/test/Hashing/Test-Hashing.C index 4461679d08..da3688481a 100644 --- a/applications/test/Hashing/Test-Hashing.C +++ b/applications/test/Hashing/Test-Hashing.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -36,6 +36,7 @@ Description #include "labelList.H" #include "labelPair.H" #include "edgeList.H" +#include "faceList.H" #include "triFaceList.H" #include "Hash.H" @@ -50,7 +51,7 @@ void infoHashString { if (modulus) { - Info<< "basic string hashing (mod " << label(modulus) << ")" << endl; + Info<< "basic string hashing (mod " << label(modulus) << ")" << nl; for (const auto& str : lst) { @@ -72,6 +73,190 @@ void infoHashString } + +void reportHashList(const UList& list) +{ + Info<< "contiguous = " << contiguous() << nl << nl; + + for (const string& val : list) + { + unsigned hash1 = string::hash()(val); + + Info<< hex << hash1 << ": " << val << nl; + } +} + + +void reportHashList(const UList