mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
HashSet gets additional operators
- operator+= : add in the listed keys - operator-= : remove the listed keys - operator&= : intersection of keys - added xfer constructor (just in case) - moved labelHashSet typedef to HashSet.H, for consistency with the wordHashSet typedef being there and since it is used so often
This commit is contained in:
@ -26,7 +26,7 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -35,19 +35,45 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
HashSet<Foam::string> testSet(0);
|
||||
HashSet<string> setA(0);
|
||||
|
||||
testSet.insert("kjhk");
|
||||
testSet.insert("kjhk2");
|
||||
setA.insert("kjhk");
|
||||
setA.insert("kjhk2");
|
||||
|
||||
Info<< testSet << endl;
|
||||
Info<< setA << endl;
|
||||
|
||||
labelHashSet testLabelHashSet(1);
|
||||
labelHashSet setB(1);
|
||||
setB.insert(11);
|
||||
setB.insert(42);
|
||||
|
||||
testLabelHashSet.insert(11);
|
||||
testLabelHashSet.insert(42);
|
||||
Info<< "setB : " << setB << endl;
|
||||
|
||||
Info<< testLabelHashSet << endl;
|
||||
labelHashSet setC(1);
|
||||
setC.insert(2008);
|
||||
setC.insert(1984);
|
||||
|
||||
Info<< "setC : " << setC << endl;
|
||||
|
||||
labelHashSet setD(1);
|
||||
setD.insert(11);
|
||||
setD.insert(100);
|
||||
setD.insert(2008);
|
||||
|
||||
Info<< "setD : " << setD << endl;
|
||||
|
||||
Info<< "setB == setC: " << (setB == setC) << endl;
|
||||
Info<< "setC != setD: " << (setC != setD) << endl;
|
||||
|
||||
// test operations
|
||||
setB += setC;
|
||||
Info<< "setB += setC : " << setB << endl;
|
||||
|
||||
setB &= setD;
|
||||
Info<< "setB &= setD : " << setB << endl;
|
||||
|
||||
setB += setC;
|
||||
setB -= setD;
|
||||
Info<< "setB += setC -= setD : " << setB << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ SourceFiles
|
||||
#ifndef regionSide_H
|
||||
#define regionSide_H
|
||||
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "typeInfo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -29,62 +29,81 @@ License
|
||||
|
||||
#include "HashSet.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Key, class Hash>
|
||||
bool HashSet<Key, Hash>::operator==(const HashSet<Key, Hash>& ht) const
|
||||
bool Foam::HashSet<Key, Hash>::operator==(const HashSet<Key, Hash>& rhs) const
|
||||
{
|
||||
const HashTable<empty, Key, Hash>& a = *this;
|
||||
|
||||
// Are all my elements in ht?
|
||||
for
|
||||
(
|
||||
typename HashTable<empty, Key, Hash>::const_iterator iter = a.begin();
|
||||
iter != a.end();
|
||||
++iter
|
||||
)
|
||||
// Are all lhs elements in rhs?
|
||||
for (const_iterator iter = this->begin(); iter != this->end(); ++iter)
|
||||
{
|
||||
if (!ht.found(iter.key()))
|
||||
if (!rhs.found(iter.key()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Are all ht elements in me?
|
||||
for
|
||||
(
|
||||
typename HashTable<empty, Key, Hash>::const_iterator iter = ht.begin();
|
||||
iter != ht.end();
|
||||
++iter
|
||||
)
|
||||
// Are all rhs elements in lhs?
|
||||
for (const_iterator iter = rhs.begin(); iter != rhs.end(); ++iter)
|
||||
{
|
||||
if (!found(iter.key()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
template<class Key, class Hash>
|
||||
bool HashSet<Key, Hash>::operator!=(const HashSet<Key, Hash>& ht) const
|
||||
bool Foam::HashSet<Key, Hash>::operator!=(const HashSet<Key, Hash>& rhs) const
|
||||
{
|
||||
return !(operator==(ht));
|
||||
return !(operator==(rhs));
|
||||
}
|
||||
|
||||
|
||||
template<class Key, class Hash>
|
||||
void Foam::HashSet<Key, Hash>::operator+=(const HashSet<Key, Hash>& rhs)
|
||||
{
|
||||
// Add in rhs elements into lhs
|
||||
for (const_iterator iter = rhs.begin(); iter != rhs.end(); ++iter)
|
||||
{
|
||||
insert(iter.key());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Key, class Hash>
|
||||
void Foam::HashSet<Key, Hash>::operator-=(const HashSet<Key, Hash>& rhs)
|
||||
{
|
||||
// Remove rhs elements from lhs
|
||||
for (const_iterator iter = rhs.begin(); iter != rhs.end(); ++iter)
|
||||
{
|
||||
erase(iter.key());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Key, class Hash>
|
||||
void Foam::HashSet<Key, Hash>::operator&=(const HashSet<Key, Hash>& rhs)
|
||||
{
|
||||
// Remove elements not found in rhs as well
|
||||
for (iterator iter = this->begin(); iter != this->end(); ++iter)
|
||||
{
|
||||
if (!rhs.found(iter.key()))
|
||||
{
|
||||
erase(iter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -26,7 +26,7 @@ Class
|
||||
Foam::HashSet
|
||||
|
||||
Description
|
||||
A HashTable with word keys but without contents.
|
||||
A HashTable with keys but without contents.
|
||||
|
||||
Typedef
|
||||
Foam::wordHashSet
|
||||
@ -34,6 +34,12 @@ Typedef
|
||||
Description
|
||||
A HashSet with (the default) word keys.
|
||||
|
||||
Typedef
|
||||
Foam::labelHashSet
|
||||
|
||||
Description
|
||||
A HashSet with label keys.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef HashSet_H
|
||||
@ -48,7 +54,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class HashSet Declaration
|
||||
Class HashSet Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Key=word, class Hash=string::hash>
|
||||
@ -59,9 +65,13 @@ class HashSet
|
||||
|
||||
public:
|
||||
|
||||
typedef typename HashTable<empty, Key, Hash>::iterator iterator;
|
||||
typedef typename HashTable<empty, Key, Hash>::const_iterator const_iterator;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given initial map size
|
||||
//- Construct given initial size
|
||||
HashSet(label size = 100)
|
||||
:
|
||||
HashTable<empty, Key, Hash>(size)
|
||||
@ -74,13 +84,13 @@ public:
|
||||
{}
|
||||
|
||||
//- Construct from UList of Key
|
||||
HashSet(const UList<Key>& ul)
|
||||
HashSet(const UList<Key>& lst)
|
||||
:
|
||||
HashTable<empty, Key, Hash>(2*ul.size())
|
||||
HashTable<empty, Key, Hash>(2*lst.size())
|
||||
{
|
||||
forAll (ul, i)
|
||||
forAll(lst, i)
|
||||
{
|
||||
insert(ul[i]);
|
||||
insert(lst[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,32 +100,58 @@ public:
|
||||
HashTable<empty, Key, Hash>(hs)
|
||||
{}
|
||||
|
||||
//- Construct by transferring the parameter contents
|
||||
HashSet(const xfer<HashSet<Key, Hash> >& hs)
|
||||
:
|
||||
HashTable<empty, Key, Hash>(hs)
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Edit
|
||||
|
||||
//- Insert a new hashedEntry
|
||||
//- Insert a new entry
|
||||
bool insert(const Key& key)
|
||||
{
|
||||
return HashTable<empty, Key, Hash>::insert(key, empty());
|
||||
}
|
||||
|
||||
//- Same as insert (cannot overwrite empty content)
|
||||
bool set(const Key& key)
|
||||
{
|
||||
return HashTable<empty, Key, Hash>::insert(key, empty());
|
||||
}
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Equality. Two hashtables are equal if all contents of first are
|
||||
// also in second and vice versa. So does not depend on table size or
|
||||
// order!
|
||||
//- Equality. Two hashtables are equal when their contents are equal.
|
||||
// Independent of table size or order.
|
||||
bool operator==(const HashSet<Key, Hash>&) const;
|
||||
|
||||
//- The opposite of the equality operation.
|
||||
bool operator!=(const HashSet<Key, Hash>&) const;
|
||||
|
||||
|
||||
//- Add entries listed in the given HashSet to this HashSet
|
||||
void operator+=(const HashSet<Key, Hash>&);
|
||||
|
||||
//- Remove entries listed in the given HashSet from this HashSet
|
||||
void operator-=(const HashSet<Key, Hash>&);
|
||||
|
||||
//- Only retain entries found in both HashSets
|
||||
void operator&=(const HashSet<Key, Hash>&);
|
||||
|
||||
};
|
||||
|
||||
|
||||
//- A HashSet with word keys.
|
||||
typedef HashSet<> wordHashSet;
|
||||
|
||||
//- A HashSet with label keys.
|
||||
typedef HashSet<label, Hash<label> > labelHashSet;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -54,9 +54,15 @@ class Map
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
typedef typename HashTable<T, label, Hash<label> >::iterator iterator;
|
||||
|
||||
typedef typename HashTable<T, label, Hash<label> >::const_iterator
|
||||
const_iterator;
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given initial map size
|
||||
//- Construct given initial size
|
||||
Map(label size = 100)
|
||||
:
|
||||
HashTable<T, label, Hash<label> >(size)
|
||||
@ -74,6 +80,12 @@ public:
|
||||
HashTable<T, label, Hash<label> >(map)
|
||||
{}
|
||||
|
||||
//- Construct by transferring the parameter contents
|
||||
Map(const xfer<Map<T> >& map)
|
||||
:
|
||||
HashTable<T, label, Hash<label> >(map)
|
||||
{}
|
||||
|
||||
|
||||
//- Return a null Map
|
||||
static const Map<T>& null()
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2008 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Typedef
|
||||
Foam::labelHashSet
|
||||
|
||||
Description
|
||||
A HashSet with label keys.
|
||||
|
||||
See Also
|
||||
wordHashSet
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef labelHashSet_H
|
||||
#define labelHashSet_H
|
||||
|
||||
#include "HashSet.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
typedef HashSet<label, Hash<label> > labelHashSet;
|
||||
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -39,7 +39,7 @@ SourceFiles
|
||||
#define faceMapper_H
|
||||
|
||||
#include "morphFieldMapper.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ SourceFiles
|
||||
#include "labelList.H"
|
||||
#include "objectMap.H"
|
||||
#include "pointField.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "Map.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -39,7 +39,7 @@ SourceFiles
|
||||
#include "List.H"
|
||||
#include "IndirectList.H"
|
||||
#include "regIOobject.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "pointFieldsFwd.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -57,7 +57,7 @@ SourceFiles
|
||||
#include "edgeList.H"
|
||||
#include "point.H"
|
||||
#include "intersection.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "PrimitivePatch.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ SourceFiles
|
||||
#include "cellShapeList.H"
|
||||
#include "labelList.H"
|
||||
#include "boolList.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "Map.H"
|
||||
#include "EdgeMap.H"
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ License
|
||||
#include "meshTools.H"
|
||||
#include "SortableList.H"
|
||||
#include "triSurfaceTools.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "ListOps.H"
|
||||
#include "transform.H"
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ SourceFiles
|
||||
#define motionSmoother_H
|
||||
|
||||
#include "pointFields.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "PackedList.H"
|
||||
#include "indirectPrimitivePatch.H"
|
||||
#include "className.H"
|
||||
|
||||
@ -40,7 +40,7 @@ SourceFiles
|
||||
#define polyMeshGeometry_H
|
||||
|
||||
#include "pointFields.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ SourceFiles
|
||||
#include "labelList.H"
|
||||
#include "point.H"
|
||||
#include "Map.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "typeInfo.H"
|
||||
#include "edgeList.H"
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ SourceFiles
|
||||
|
||||
#include "labelIOList.H"
|
||||
#include "face.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "DynamicList.H"
|
||||
#include "primitivePatch.H"
|
||||
#include "removeFaces.H"
|
||||
|
||||
@ -46,7 +46,7 @@ SourceFiles
|
||||
#include "typeInfo.H"
|
||||
#include "Map.H"
|
||||
#include "labelList.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "faceList.H"
|
||||
#include "boolList.H"
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ SourceFiles
|
||||
#include "PtrList.H"
|
||||
#include "cellList.H"
|
||||
#include "Map.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "mapPolyMesh.H"
|
||||
#include "CompactListList.H"
|
||||
#include "PackedList.H"
|
||||
|
||||
@ -40,7 +40,7 @@ SourceFiles
|
||||
#define removeFaces_H
|
||||
|
||||
#include "Pstream.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "Map.H"
|
||||
#include "boolList.H"
|
||||
#include "indirectPrimitivePatch.H"
|
||||
|
||||
@ -37,7 +37,7 @@ SourceFiles
|
||||
|
||||
#include "faceStencil.H"
|
||||
#include "boolList.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "Map.H"
|
||||
#include "EdgeMap.H"
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ SourceFiles
|
||||
|
||||
#include "faceStencil.H"
|
||||
#include "boolList.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "Map.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,7 +38,7 @@ SourceFiles
|
||||
|
||||
#include "faceStencil.H"
|
||||
#include "boolList.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "Map.H"
|
||||
#include "EdgeMap.H"
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ SourceFiles
|
||||
|
||||
#include "globalIndex.H"
|
||||
#include "boolList.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "indirectPrimitivePatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -39,7 +39,7 @@ SourceFiles
|
||||
#include "morphFieldMapper.H"
|
||||
#include "fvMesh.H"
|
||||
#include "faceMapper.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "mapPolyMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -60,7 +60,7 @@ SourceFiles
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "pointPatchFieldMapper.H"
|
||||
#include "GeometricField.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "surfaceMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -27,7 +27,7 @@ License
|
||||
#include "inverseDistanceDiffusivity.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "patchWave.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ License
|
||||
|
||||
#include "inverseFaceDistanceDiffusivity.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "wallPoint.H"
|
||||
#include "MeshWave.H"
|
||||
|
||||
@ -98,7 +98,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct()
|
||||
const polyPatch& patch = bdry[iter.key()];
|
||||
|
||||
const vectorField::subField fc = patch.faceCentres();
|
||||
|
||||
|
||||
forAll(fc, patchFaceI)
|
||||
{
|
||||
changedFaces[nPatchFaces] = patch.start() + patchFaceI;
|
||||
@ -134,7 +134,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct()
|
||||
fvsPatchScalarField& bfld = faceDiffusivity_.boundaryField()[patchI];
|
||||
|
||||
const unallocLabelList& faceCells = bfld.patch().faceCells();
|
||||
|
||||
|
||||
if (patchSet.found(patchI))
|
||||
{
|
||||
forAll(bfld, i)
|
||||
|
||||
@ -26,7 +26,7 @@ License
|
||||
|
||||
#include "inversePointDistanceDiffusivity.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "pointEdgePoint.H"
|
||||
#include "PointEdgeWave.H"
|
||||
|
||||
@ -133,7 +133,7 @@ void Foam::inversePointDistanceDiffusivity::correct()
|
||||
mesh,
|
||||
seedPoints,
|
||||
seedInfo,
|
||||
|
||||
|
||||
pointWallDist,
|
||||
edgeWallDist,
|
||||
mesh.globalData().nTotalPoints() // max iterations
|
||||
@ -167,7 +167,7 @@ void Foam::inversePointDistanceDiffusivity::correct()
|
||||
forAll(bfld, i)
|
||||
{
|
||||
const cell& ownFaces = mesh.cells()[faceCells[i]];
|
||||
|
||||
|
||||
labelHashSet cPoints(4*ownFaces.size());
|
||||
|
||||
scalar dist = 0;
|
||||
@ -185,7 +185,7 @@ void Foam::inversePointDistanceDiffusivity::correct()
|
||||
}
|
||||
}
|
||||
dist /= cPoints.size();
|
||||
|
||||
|
||||
bfld[i] = 1.0/dist;
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ License
|
||||
#include "inverseVolumeDiffusivity.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "patchWave.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ SourceFiles
|
||||
#define cellDistFuncs_H
|
||||
|
||||
#include "scalarField.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "Map.H"
|
||||
#include "wordList.H"
|
||||
#include "scalarField.H"
|
||||
|
||||
@ -28,7 +28,7 @@ Description
|
||||
|
||||
#include "cellFeatures.H"
|
||||
#include "primitiveMesh.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "Map.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "ListOps.H"
|
||||
|
||||
@ -44,7 +44,7 @@ SourceFiles
|
||||
#include "faceList.H"
|
||||
#include "labelList.H"
|
||||
#include "boolList.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "Map.H"
|
||||
#include "DynamicList.H"
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ SourceFiles
|
||||
#include "pointIndexHit.H"
|
||||
#include "FixedList.H"
|
||||
#include "Ostream.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "labelBits.H"
|
||||
#include "PackedList.H"
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ Description
|
||||
#include "treeNode.H"
|
||||
#include "treeBoundBox.H"
|
||||
#include "octree.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ SourceFiles
|
||||
#include "treeElem.H"
|
||||
#include "boolList.H"
|
||||
#include "linePointRef.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ SourceFiles
|
||||
#include "treeBoundBoxList.H"
|
||||
#include "treeElem.H"
|
||||
#include "linePointRef.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ SourceFiles
|
||||
#define primitiveMeshGeometry_H
|
||||
|
||||
#include "pointFields.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ SourceFiles
|
||||
#ifndef topoSet_H
|
||||
#define topoSet_H
|
||||
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "regIOobject.H"
|
||||
#include "labelList.H"
|
||||
#include "typeInfo.H"
|
||||
|
||||
@ -31,7 +31,6 @@ Description
|
||||
#include "labelPairLookup.H"
|
||||
#include "OFstream.H"
|
||||
#include "HashSet.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "triSurface.H"
|
||||
#include "pointIndexHit.H"
|
||||
#include "treeDataTriSurface.H"
|
||||
|
||||
@ -31,7 +31,6 @@ Description
|
||||
#include "labelPairLookup.H"
|
||||
#include "OFstream.H"
|
||||
#include "HashSet.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "triSurface.H"
|
||||
#include "pointIndexHit.H"
|
||||
#include "octreeDataTriSurface.H"
|
||||
|
||||
@ -31,7 +31,6 @@ Description
|
||||
#include "labelPairLookup.H"
|
||||
#include "OFstream.H"
|
||||
#include "HashSet.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "triSurface.H"
|
||||
#include "pointIndexHit.H"
|
||||
#include "octreeDataTriSurface.H"
|
||||
|
||||
@ -50,7 +50,7 @@ SourceFiles
|
||||
|
||||
#include "pointField.H"
|
||||
#include "Map.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "pointIndexHit.H"
|
||||
#include "edgeList.H"
|
||||
#include "typeInfo.H"
|
||||
@ -148,7 +148,7 @@ private:
|
||||
const List<edgeStatus>& edgeStat,
|
||||
const label startEdgeI,
|
||||
const label startPointI,
|
||||
const label currentFeatI,
|
||||
const label currentFeatI,
|
||||
labelList& featVisited
|
||||
);
|
||||
|
||||
@ -180,7 +180,7 @@ public:
|
||||
const scalar minLen = 0,
|
||||
const label minElems = 0
|
||||
);
|
||||
|
||||
|
||||
//- Construct from dictionary
|
||||
surfaceFeatures(const triSurface&, const dictionary& dict);
|
||||
|
||||
@ -320,7 +320,7 @@ public:
|
||||
(
|
||||
const labelList& selectedEdges,
|
||||
const pointField& samples,
|
||||
const vector& searchSpan, // search span
|
||||
const vector& searchSpan, // search span
|
||||
labelList& edgeLabel,
|
||||
labelList& edgeEndPoint,
|
||||
pointField& edgePoint
|
||||
@ -339,7 +339,7 @@ public:
|
||||
const edgeList& sampleEdges,
|
||||
const labelList& selectedSampleEdges,
|
||||
const pointField& samplePoints,
|
||||
const vector& searchSpan, // search span
|
||||
const vector& searchSpan, // search span
|
||||
|
||||
labelList& edgeLabel, // label of surface edge or -1
|
||||
pointField& pointOnEdge, // point on above edge
|
||||
|
||||
@ -39,7 +39,7 @@ SourceFiles
|
||||
#include "boolList.H"
|
||||
#include "pointField.H"
|
||||
#include "DynamicList.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "FixedList.H"
|
||||
#include "vector2D.H"
|
||||
#include "triPointRef.H"
|
||||
|
||||
@ -46,7 +46,7 @@ SourceFiles
|
||||
|
||||
#include "primitiveFieldsFwd.H"
|
||||
#include "volFieldsFwd.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "Tuple2.H"
|
||||
#include "OFstream.H"
|
||||
#include "Switch.H"
|
||||
|
||||
@ -45,7 +45,7 @@ SourceFiles
|
||||
|
||||
#include "primitiveFieldsFwd.H"
|
||||
#include "volFieldsFwd.H"
|
||||
#include "labelHashSet.H"
|
||||
#include "HashSet.H"
|
||||
#include "OFstream.H"
|
||||
#include "Switch.H"
|
||||
#include "pointFieldFwd.H"
|
||||
|
||||
Reference in New Issue
Block a user