ENH: add missing Hash function for List/UList (issue #966)
- there were previously no hashing mechanisms for lists so they would fall back to the definition for primitives and hash the memory location of the allocated List object. - provide a UList::Hash<> sub-class for inheritance, and also a global specialization for UList<T>, List<T> such that the hash value for List<List<T>> cascades properly. - provide similar function in triFace to ensure that it remains similar in behaviour to face. - added SymmHash to Pair, for use when order is unimportant. STYLE: use string::hash() more consistently - no particular reason to use Hash<word>() which forwards to string::hash() anyhow
Showing
- applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/multiphaseSystem/multiphaseSystem.H 3 additions, 10 deletions...sesSystem/phaseSystem/multiphaseSystem/multiphaseSystem.H
- applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.H 1 addition, 2 deletions...ultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.H
- applications/test/FixedList/Test-FixedList.C 5 additions, 2 deletionsapplications/test/FixedList/Test-FixedList.C
- applications/test/Hashing/Test-Hashing.C 229 additions, 84 deletionsapplications/test/Hashing/Test-Hashing.C
- applications/test/Hashing/hashingTests 42 additions, 0 deletionsapplications/test/Hashing/hashingTests
- applications/test/List/Test-List.C 14 additions, 0 deletionsapplications/test/List/Test-List.C
- applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C 4 additions, 21 deletions...utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
- applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C 4 additions, 5 deletions...mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C
- src/OpenFOAM/containers/Lists/FixedList/FixedList.H 57 additions, 15 deletionssrc/OpenFOAM/containers/Lists/FixedList/FixedList.H
- src/OpenFOAM/containers/Lists/FixedList/FixedListI.H 0 additions, 28 deletionssrc/OpenFOAM/containers/Lists/FixedList/FixedListI.H
- src/OpenFOAM/containers/Lists/List/List.H 24 additions, 0 deletionssrc/OpenFOAM/containers/Lists/List/List.H
- src/OpenFOAM/containers/Lists/UList/UList.H 53 additions, 2 deletionssrc/OpenFOAM/containers/Lists/UList/UList.H
- src/OpenFOAM/containers/Lists/UList/UListI.H 1 addition, 0 deletionssrc/OpenFOAM/containers/Lists/UList/UListI.H
- src/OpenFOAM/meshes/meshShapes/edge/edge.H 48 additions, 37 deletionssrc/OpenFOAM/meshes/meshShapes/edge/edge.H
- src/OpenFOAM/meshes/meshShapes/face/face.H 21 additions, 9 deletionssrc/OpenFOAM/meshes/meshShapes/face/face.H
- src/OpenFOAM/meshes/meshShapes/triFace/triFace.H 44 additions, 25 deletionssrc/OpenFOAM/meshes/meshShapes/triFace/triFace.H
- src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C 2 additions, 2 deletions...hes/constraint/processorCyclic/processorCyclicPolyPatch.C
- src/OpenFOAM/primitives/Pair/Pair.H 56 additions, 5 deletionssrc/OpenFOAM/primitives/Pair/Pair.H
- src/OpenFOAM/primitives/hashes/Hash/Hash.H 31 additions, 61 deletionssrc/OpenFOAM/primitives/hashes/Hash/Hash.H
- src/OpenFOAM/primitives/hashes/Hash/HashFwd.H 46 additions, 0 deletionssrc/OpenFOAM/primitives/hashes/Hash/HashFwd.H
Please register or sign in to comment