diff --git a/src/OpenFOAM/meshes/meshShapes/edge/EdgeMap.H b/src/OpenFOAM/meshes/meshShapes/edge/EdgeMap.H index 971202495c9bd81ca468307bb30c0dc8998627d9..0078ca544fb6e8c20b4bdd60b25db59c1fec224c 100644 --- a/src/OpenFOAM/meshes/meshShapes/edge/EdgeMap.H +++ b/src/OpenFOAM/meshes/meshShapes/edge/EdgeMap.H @@ -25,7 +25,9 @@ Class Foam::EdgeMap Description - Map from edge (expressed as its endpoints) to value + Map from edge (expressed as its endpoints) to value. + For easier forward declaration it is currently implemented as a + separate class rather than a template alias. \*---------------------------------------------------------------------------*/ @@ -49,28 +51,11 @@ class EdgeMap : public HashTable<T, edge, Hash<edge>> { - public: - // Constructors - - //- Construct given initial map size - EdgeMap(const label size = 128) - : - HashTable<T, edge, Hash<edge>>(size) - {} - - //- Construct from Istream - EdgeMap(Istream& is) - : - HashTable<T, edge, Hash<edge>>(is) - {} - - //- Construct as copy - EdgeMap(const EdgeMap<T>& map) - : - HashTable<T, edge, Hash<edge>>(map) - {} + //- Inherit constructors from HashTable + using HashTable<T, edge, Hash<edge>>::HashTable; + }; diff --git a/src/OpenFOAM/meshes/meshShapes/edge/edgeHashes.H b/src/OpenFOAM/meshes/meshShapes/edge/edgeHashes.H new file mode 100644 index 0000000000000000000000000000000000000000..1ddfe8ca68706713b53a6c3aa36221c124f413c8 --- /dev/null +++ b/src/OpenFOAM/meshes/meshShapes/edge/edgeHashes.H @@ -0,0 +1,57 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 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 3 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, see <http://www.gnu.org/licenses/>. + +Typedef + Foam::edgeHashSet + +Description + A HashSet for an edge. + The hashing on an edge is commutative. + +\*---------------------------------------------------------------------------*/ + +#ifndef edgeHashes_H +#define edgeHashes_H + +#include "HashSet.H" +#include "edge.H" +#include "EdgeMap.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + // Alternative: + // template<class T> + // using EdgeMap = HashTable<T, edge, Hash<edge>>; + + //- A HashSet with edge for its key. + typedef HashSet<edge, Hash<edge>> edgeHashSet; + +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //