diff --git a/src/OpenFOAM/meshes/meshShapes/edge/EdgeMap.H b/src/OpenFOAM/meshes/meshShapes/edge/EdgeMap.H index 971202495c..0078ca544f 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> { - public: - // Constructors + //- Inherit constructors from HashTable + using HashTable>::HashTable; - //- Construct given initial map size - EdgeMap(const label size = 128) - : - HashTable>(size) - {} - - //- Construct from Istream - EdgeMap(Istream& is) - : - HashTable>(is) - {} - - //- Construct as copy - EdgeMap(const EdgeMap& map) - : - HashTable>(map) - {} }; diff --git a/src/OpenFOAM/meshes/meshShapes/edge/edgeHashes.H b/src/OpenFOAM/meshes/meshShapes/edge/edgeHashes.H new file mode 100644 index 0000000000..1ddfe8ca68 --- /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 . + +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 + // using EdgeMap = HashTable>; + + //- A HashSet with edge for its key. + typedef HashSet> edgeHashSet; + +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //