mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'edge-labelPair-containers' into 'develop'
Use updated edge and labelPair containers See merge request !106
This commit is contained in:
@ -25,7 +25,7 @@ License
|
|||||||
|
|
||||||
#include "DelaunayMesh.H"
|
#include "DelaunayMesh.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "labelPair.H"
|
#include "labelPairHashes.H"
|
||||||
#include "PrintTable.H"
|
#include "PrintTable.H"
|
||||||
#include "pointIOField.H"
|
#include "pointIOField.H"
|
||||||
#include "scalarIOField.H"
|
#include "scalarIOField.H"
|
||||||
|
|||||||
@ -37,9 +37,7 @@ SourceFiles
|
|||||||
#ifndef DelaunayMesh_H
|
#ifndef DelaunayMesh_H
|
||||||
#define DelaunayMesh_H
|
#define DelaunayMesh_H
|
||||||
|
|
||||||
#include "Pair.H"
|
#include "labelPairHashes.H"
|
||||||
#include "HashSet.H"
|
|
||||||
#include "FixedList.H"
|
|
||||||
#include "boundBox.H"
|
#include "boundBox.H"
|
||||||
#include "indexedVertex.H"
|
#include "indexedVertex.H"
|
||||||
#include "CGALTriangulation3Ddefs.H"
|
#include "CGALTriangulation3Ddefs.H"
|
||||||
@ -77,20 +75,6 @@ public:
|
|||||||
typedef typename Triangulation::Finite_facets_iterator
|
typedef typename Triangulation::Finite_facets_iterator
|
||||||
Finite_facets_iterator;
|
Finite_facets_iterator;
|
||||||
|
|
||||||
typedef HashSet
|
|
||||||
<
|
|
||||||
Pair<label>,
|
|
||||||
FixedList<label, 2>::Hash<>
|
|
||||||
> labelPairHashSet;
|
|
||||||
|
|
||||||
typedef HashTable
|
|
||||||
<
|
|
||||||
label,
|
|
||||||
labelPair,
|
|
||||||
FixedList<label, 2>::Hash<>
|
|
||||||
> labelTolabelPairHashTable;
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
@ -263,7 +247,7 @@ public:
|
|||||||
autoPtr<polyMesh> createMesh
|
autoPtr<polyMesh> createMesh
|
||||||
(
|
(
|
||||||
const fileName& name,
|
const fileName& name,
|
||||||
labelTolabelPairHashTable& vertexMap,
|
labelPairLookup& vertexMap,
|
||||||
labelList& cellMap,
|
labelList& cellMap,
|
||||||
const bool writeDelaunayData = true
|
const bool writeDelaunayData = true
|
||||||
) const;
|
) const;
|
||||||
|
|||||||
@ -337,7 +337,7 @@ Foam::autoPtr<Foam::polyMesh>
|
|||||||
Foam::DelaunayMesh<Triangulation>::createMesh
|
Foam::DelaunayMesh<Triangulation>::createMesh
|
||||||
(
|
(
|
||||||
const fileName& name,
|
const fileName& name,
|
||||||
labelTolabelPairHashTable& vertexMap,
|
labelPairLookup& vertexMap,
|
||||||
labelList& cellMap,
|
labelList& cellMap,
|
||||||
const bool writeDelaunayData
|
const bool writeDelaunayData
|
||||||
) const
|
) const
|
||||||
|
|||||||
@ -31,9 +31,6 @@ License
|
|||||||
#include "indexedVertexEnum.H"
|
#include "indexedVertexEnum.H"
|
||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Triangulation>
|
template<class Triangulation>
|
||||||
@ -541,8 +538,7 @@ Foam::label Foam::DistributedDelaunayMesh<Triangulation>::referVertices
|
|||||||
{
|
{
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
typename labelPairHashSet::const_iterator iter
|
labelPairHashSet::const_iterator iter = pointsNotInserted.begin();
|
||||||
= pointsNotInserted.begin();
|
|
||||||
iter != pointsNotInserted.end();
|
iter != pointsNotInserted.end();
|
||||||
++iter
|
++iter
|
||||||
)
|
)
|
||||||
@ -863,7 +859,7 @@ void Foam::DistributedDelaunayMesh<Triangulation>::sync(const boundBox& bb)
|
|||||||
|
|
||||||
template<class Triangulation>
|
template<class Triangulation>
|
||||||
template<class PointIterator>
|
template<class PointIterator>
|
||||||
typename Foam::DistributedDelaunayMesh<Triangulation>::labelPairHashSet
|
Foam::labelPairHashSet
|
||||||
Foam::DistributedDelaunayMesh<Triangulation>::rangeInsertReferredWithInfo
|
Foam::DistributedDelaunayMesh<Triangulation>::rangeInsertReferredWithInfo
|
||||||
(
|
(
|
||||||
PointIterator begin,
|
PointIterator begin,
|
||||||
|
|||||||
@ -71,10 +71,6 @@ public:
|
|||||||
typedef typename Triangulation::All_cells_iterator
|
typedef typename Triangulation::All_cells_iterator
|
||||||
All_cells_iterator;
|
All_cells_iterator;
|
||||||
|
|
||||||
typedef typename DelaunayMesh<Triangulation>::labelPairHashSet
|
|
||||||
labelPairHashSet;
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
autoPtr<List<boundBox>> allBackgroundMeshBounds_;
|
autoPtr<List<boundBox>> allBackgroundMeshBounds_;
|
||||||
@ -193,12 +189,6 @@ public:
|
|||||||
bool printErrors = true
|
bool printErrors = true
|
||||||
);
|
);
|
||||||
|
|
||||||
// distributeField();
|
|
||||||
|
|
||||||
|
|
||||||
// Queries
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -635,7 +635,7 @@ void Foam::cellShapeControlMesh::write() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DelaunayMesh<CellSizeDelaunay>::labelTolabelPairHashTable vertexMap;
|
labelPairLookup vertexMap;
|
||||||
labelList cellMap;
|
labelList cellMap;
|
||||||
|
|
||||||
autoPtr<polyMesh> meshPtr = DelaunayMesh<CellSizeDelaunay>::createMesh
|
autoPtr<polyMesh> meshPtr = DelaunayMesh<CellSizeDelaunay>::createMesh
|
||||||
|
|||||||
@ -105,7 +105,7 @@ public:
|
|||||||
typedef Delaunay::Facet Facet;
|
typedef Delaunay::Facet Facet;
|
||||||
typedef Delaunay::Point Point;
|
typedef Delaunay::Point Point;
|
||||||
|
|
||||||
typedef List<DynamicList<Pair<labelPair>>> labelPairPairDynListList;
|
typedef List<DynamicList<labelPairPair>> labelPairPairDynListList;
|
||||||
|
|
||||||
typedef Tuple2<pointIndexHit, label> pointIndexHitAndFeature;
|
typedef Tuple2<pointIndexHit, label> pointIndexHitAndFeature;
|
||||||
typedef List<pointIndexHitAndFeature> pointIndexHitAndFeatureList;
|
typedef List<pointIndexHitAndFeature> pointIndexHitAndFeatureList;
|
||||||
@ -706,7 +706,7 @@ private:
|
|||||||
(
|
(
|
||||||
labelList& owner,
|
labelList& owner,
|
||||||
labelList& neighbour,
|
labelList& neighbour,
|
||||||
const HashSet<labelPair, labelPair::Hash<>>& deferredCollapseFaces
|
const labelPairHashSet& deferredCollapseFaces
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Check whether the cell sizes are fine enough. Creates a polyMesh.
|
//- Check whether the cell sizes are fine enough. Creates a polyMesh.
|
||||||
|
|||||||
@ -673,7 +673,7 @@ void Foam::conformalVoronoiMesh::deferredCollapseFaceSet
|
|||||||
(
|
(
|
||||||
labelList& owner,
|
labelList& owner,
|
||||||
labelList& neighbour,
|
labelList& neighbour,
|
||||||
const HashSet<labelPair, labelPair::Hash<>>& deferredCollapseFaces
|
const labelPairHashSet& deferredCollapseFaces
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
DynamicList<label> faceLabels;
|
DynamicList<label> faceLabels;
|
||||||
@ -2131,14 +2131,14 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
|
|||||||
// Use this processor's vertex index as the master
|
// Use this processor's vertex index as the master
|
||||||
// for sorting
|
// for sorting
|
||||||
|
|
||||||
DynamicList<Pair<labelPair>>& sortingIndex =
|
DynamicList<labelPairPair>& sortingIndex =
|
||||||
procPatchSortingIndex[patchIndex];
|
procPatchSortingIndex[patchIndex];
|
||||||
|
|
||||||
if (vB->internalOrBoundaryPoint() && vB->referred())
|
if (vB->internalOrBoundaryPoint() && vB->referred())
|
||||||
{
|
{
|
||||||
sortingIndex.append
|
sortingIndex.append
|
||||||
(
|
(
|
||||||
Pair<labelPair>
|
labelPairPair
|
||||||
(
|
(
|
||||||
labelPair(vA->index(), vA->procIndex()),
|
labelPair(vA->index(), vA->procIndex()),
|
||||||
labelPair(vB->index(), vB->procIndex())
|
labelPair(vB->index(), vB->procIndex())
|
||||||
@ -2149,7 +2149,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
|
|||||||
{
|
{
|
||||||
sortingIndex.append
|
sortingIndex.append
|
||||||
(
|
(
|
||||||
Pair<labelPair>
|
labelPairPair
|
||||||
(
|
(
|
||||||
labelPair(vB->index(), vB->procIndex()),
|
labelPair(vB->index(), vB->procIndex()),
|
||||||
labelPair(vA->index(), vA->procIndex())
|
labelPair(vA->index(), vA->procIndex())
|
||||||
@ -2162,14 +2162,14 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
|
|||||||
// Use the other processor's vertex index as the
|
// Use the other processor's vertex index as the
|
||||||
// master for sorting
|
// master for sorting
|
||||||
|
|
||||||
DynamicList<Pair<labelPair>>& sortingIndex =
|
DynamicList<labelPairPair>& sortingIndex =
|
||||||
procPatchSortingIndex[patchIndex];
|
procPatchSortingIndex[patchIndex];
|
||||||
|
|
||||||
if (vA->internalOrBoundaryPoint() && vA->referred())
|
if (vA->internalOrBoundaryPoint() && vA->referred())
|
||||||
{
|
{
|
||||||
sortingIndex.append
|
sortingIndex.append
|
||||||
(
|
(
|
||||||
Pair<labelPair>
|
labelPairPair
|
||||||
(
|
(
|
||||||
labelPair(vA->index(), vA->procIndex()),
|
labelPair(vA->index(), vA->procIndex()),
|
||||||
labelPair(vB->index(), vB->procIndex())
|
labelPair(vB->index(), vB->procIndex())
|
||||||
@ -2180,7 +2180,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
|
|||||||
{
|
{
|
||||||
sortingIndex.append
|
sortingIndex.append
|
||||||
(
|
(
|
||||||
Pair<labelPair>
|
labelPairPair
|
||||||
(
|
(
|
||||||
labelPair(vB->index(), vB->procIndex()),
|
labelPair(vB->index(), vB->procIndex()),
|
||||||
labelPair(vA->index(), vA->procIndex())
|
labelPair(vA->index(), vA->procIndex())
|
||||||
@ -2463,7 +2463,7 @@ void Foam::conformalVoronoiMesh::sortProcPatches
|
|||||||
faceList& faces = patchFaces[patchi];
|
faceList& faces = patchFaces[patchi];
|
||||||
labelList& owner = patchOwners[patchi];
|
labelList& owner = patchOwners[patchi];
|
||||||
DynamicList<label>& slaves = patchPointPairSlaves[patchi];
|
DynamicList<label>& slaves = patchPointPairSlaves[patchi];
|
||||||
DynamicList<Pair<labelPair>>& sortingIndices
|
DynamicList<labelPairPair>& sortingIndices
|
||||||
= patchSortingIndices[patchi];
|
= patchSortingIndices[patchi];
|
||||||
|
|
||||||
if (!sortingIndices.empty())
|
if (!sortingIndices.empty())
|
||||||
|
|||||||
@ -199,7 +199,7 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
|
|||||||
|
|
||||||
Info<< nl << "Writing " << "tetDualMesh" << endl;
|
Info<< nl << "Writing " << "tetDualMesh" << endl;
|
||||||
|
|
||||||
DistributedDelaunayMesh<Delaunay>::labelTolabelPairHashTable vertexMap;
|
labelPairLookup vertexMap;
|
||||||
labelList cellMap;
|
labelList cellMap;
|
||||||
autoPtr<polyMesh> tetMesh =
|
autoPtr<polyMesh> tetMesh =
|
||||||
createMesh("tetDualMesh", vertexMap, cellMap);
|
createMesh("tetDualMesh", vertexMap, cellMap);
|
||||||
|
|||||||
@ -28,7 +28,7 @@ License
|
|||||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Triangulation>
|
template<class Triangulation>
|
||||||
inline Foam::Pair<Foam::labelPair>
|
inline Foam::labelPairPair
|
||||||
Foam::pointPairs<Triangulation>::orderPointPair
|
Foam::pointPairs<Triangulation>::orderPointPair
|
||||||
(
|
(
|
||||||
const labelPair& vA,
|
const labelPair& vA,
|
||||||
@ -38,8 +38,8 @@ Foam::pointPairs<Triangulation>::orderPointPair
|
|||||||
return
|
return
|
||||||
(
|
(
|
||||||
(vA < vB)
|
(vA < vB)
|
||||||
? Pair<labelPair>(vA, vB)
|
? labelPairPair(vA, vB)
|
||||||
: Pair<labelPair>(vB, vA)
|
: labelPairPair(vB, vA)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ inline bool Foam::pointPairs<Triangulation>::insertPointPair
|
|||||||
template<class Triangulation>
|
template<class Triangulation>
|
||||||
Foam::pointPairs<Triangulation>::pointPairs(const Triangulation& triangulation)
|
Foam::pointPairs<Triangulation>::pointPairs(const Triangulation& triangulation)
|
||||||
:
|
:
|
||||||
ptPairTable(),
|
StorageContainer(),
|
||||||
triangulation_(triangulation)
|
triangulation_(triangulation)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ void Foam::pointPairs<Triangulation>::reIndex(const Map<label>& oldToNewIndices)
|
|||||||
|
|
||||||
forAllConstIter(pointPairs, *this, iter)
|
forAllConstIter(pointPairs, *this, iter)
|
||||||
{
|
{
|
||||||
Pair<labelPair> e = iter.key();
|
labelPairPair e = iter.key();
|
||||||
|
|
||||||
labelPair& start = e.first();
|
labelPair& start = e.first();
|
||||||
labelPair& end = e.second();
|
labelPair& end = e.second();
|
||||||
|
|||||||
@ -39,20 +39,13 @@ Description
|
|||||||
#ifndef pointPairs_H
|
#ifndef pointPairs_H
|
||||||
#define pointPairs_H
|
#define pointPairs_H
|
||||||
|
|
||||||
#include "labelPair.H"
|
#include "labelPairHashes.H"
|
||||||
#include "HashSet.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
typedef HashSet
|
|
||||||
<
|
|
||||||
Pair<labelPair>,
|
|
||||||
FixedList<labelPair, 2>::Hash<>
|
|
||||||
> ptPairTable;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class pointPairs Declaration
|
Class pointPairs Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -60,10 +53,11 @@ typedef HashSet
|
|||||||
template<class Triangulation>
|
template<class Triangulation>
|
||||||
class pointPairs
|
class pointPairs
|
||||||
:
|
:
|
||||||
public ptPairTable
|
public HashSet<labelPairPair, labelPairPair::Hash<>>
|
||||||
{
|
{
|
||||||
// Private typedefs
|
// Private typedefs
|
||||||
|
|
||||||
|
typedef HashSet<labelPairPair, labelPairPair::Hash<>> StorageContainer;
|
||||||
typedef typename Triangulation::Vertex_handle Vertex_handle;
|
typedef typename Triangulation::Vertex_handle Vertex_handle;
|
||||||
|
|
||||||
|
|
||||||
@ -74,7 +68,7 @@ class pointPairs
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
inline Pair<labelPair> orderPointPair
|
inline labelPairPair orderPointPair
|
||||||
(
|
(
|
||||||
const labelPair& vA,
|
const labelPair& vA,
|
||||||
const labelPair& vB
|
const labelPair& vB
|
||||||
|
|||||||
@ -45,7 +45,7 @@ Description
|
|||||||
#include "timeSelector.H"
|
#include "timeSelector.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "passiveParticleCloud.H"
|
#include "passiveParticleCloud.H"
|
||||||
|
#include "labelPairHashes.H"
|
||||||
#include "SortableList.H"
|
#include "SortableList.H"
|
||||||
#include "IOobjectList.H"
|
#include "IOobjectList.H"
|
||||||
#include "PtrList.H"
|
#include "PtrList.H"
|
||||||
@ -133,8 +133,6 @@ int main(int argc, char *argv[])
|
|||||||
fileName vtkPath(runTime.path()/"VTK");
|
fileName vtkPath(runTime.path()/"VTK");
|
||||||
mkDir(vtkPath);
|
mkDir(vtkPath);
|
||||||
|
|
||||||
typedef HashTable<label, labelPair, labelPair::Hash<>> trackTableType;
|
|
||||||
|
|
||||||
forAll(timeDirs, timeI)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(timeDirs[timeI], timeI);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
@ -168,13 +166,14 @@ int main(int argc, char *argv[])
|
|||||||
label nTracks = 0;
|
label nTracks = 0;
|
||||||
|
|
||||||
{
|
{
|
||||||
trackTableType trackTable;
|
labelPairLookup trackTable;
|
||||||
|
|
||||||
forAll(particles, i)
|
forAll(particles, i)
|
||||||
{
|
{
|
||||||
const label origProc = particles[i].origProc();
|
const label origProc = particles[i].origProc();
|
||||||
const label origId = particles[i].origId();
|
const label origId = particles[i].origId();
|
||||||
|
|
||||||
const trackTableType::const_iterator& iter =
|
labelPairLookup::const_iterator iter =
|
||||||
trackTable.find(labelPair(origProc, origId));
|
trackTable.find(labelPair(origProc, origId));
|
||||||
|
|
||||||
if (iter == trackTable.end())
|
if (iter == trackTable.end())
|
||||||
|
|||||||
@ -25,8 +25,7 @@ License
|
|||||||
|
|
||||||
#include "cyclicGAMGInterface.H"
|
#include "cyclicGAMGInterface.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "labelPair.H"
|
#include "labelPairHashes.H"
|
||||||
#include "HashTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -96,10 +95,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
|
|||||||
);
|
);
|
||||||
|
|
||||||
// From coarse cell pair to coarse face
|
// From coarse cell pair to coarse face
|
||||||
HashTable<label, labelPair, labelPair::Hash<>> cellsToCoarseFace
|
labelPairLookup cellsToCoarseFace(2*localRestrictAddressing.size());
|
||||||
(
|
|
||||||
2*localRestrictAddressing.size()
|
|
||||||
);
|
|
||||||
|
|
||||||
forAll(localRestrictAddressing, ffi)
|
forAll(localRestrictAddressing, ffi)
|
||||||
{
|
{
|
||||||
@ -126,8 +122,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
HashTable<label, labelPair, labelPair::Hash<>>::const_iterator fnd =
|
labelPairLookup::const_iterator fnd = cellsToCoarseFace.find(cellPair);
|
||||||
cellsToCoarseFace.find(cellPair);
|
|
||||||
|
|
||||||
if (fnd == cellsToCoarseFace.end())
|
if (fnd == cellsToCoarseFace.end())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -25,8 +25,7 @@ License
|
|||||||
|
|
||||||
#include "processorGAMGInterface.H"
|
#include "processorGAMGInterface.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "HashTable.H"
|
#include "labelPairHashes.H"
|
||||||
#include "labelPair.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -84,10 +83,7 @@ Foam::processorGAMGInterface::processorGAMGInterface
|
|||||||
);
|
);
|
||||||
|
|
||||||
// From coarse cell pair to coarse face
|
// From coarse cell pair to coarse face
|
||||||
HashTable<label, labelPair, labelPair::Hash<>> cellsToCoarseFace
|
labelPairLookup cellsToCoarseFace(2*localRestrictAddressing.size());
|
||||||
(
|
|
||||||
2*localRestrictAddressing.size()
|
|
||||||
);
|
|
||||||
|
|
||||||
forAll(localRestrictAddressing, ffi)
|
forAll(localRestrictAddressing, ffi)
|
||||||
{
|
{
|
||||||
@ -114,8 +110,7 @@ Foam::processorGAMGInterface::processorGAMGInterface
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
HashTable<label, labelPair, labelPair::Hash<>>::const_iterator fnd =
|
labelPairLookup::const_iterator fnd = cellsToCoarseFace.find(cellPair);
|
||||||
cellsToCoarseFace.find(cellPair);
|
|
||||||
|
|
||||||
if (fnd == cellsToCoarseFace.end())
|
if (fnd == cellsToCoarseFace.end())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
|
|
||||||
#include "mapDistributeBase.H"
|
#include "mapDistributeBase.H"
|
||||||
#include "commSchedule.H"
|
#include "commSchedule.H"
|
||||||
#include "HashSet.H"
|
#include "labelPairHashes.H"
|
||||||
#include "globalIndex.H"
|
#include "globalIndex.H"
|
||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ Foam::List<Foam::labelPair> Foam::mapDistributeBase::schedule
|
|||||||
List<labelPair> allComms;
|
List<labelPair> allComms;
|
||||||
|
|
||||||
{
|
{
|
||||||
HashSet<labelPair, labelPair::Hash<>> commsSet(Pstream::nProcs());
|
labelPairHashSet commsSet(Pstream::nProcs());
|
||||||
|
|
||||||
// Find what communication is required
|
// Find what communication is required
|
||||||
forAll(subMap, proci)
|
forAll(subMap, proci)
|
||||||
|
|||||||
@ -25,8 +25,7 @@ License
|
|||||||
|
|
||||||
#include "checkFireEdges.H"
|
#include "checkFireEdges.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "edge.H"
|
#include "edgeHashes.H"
|
||||||
#include "HashSet.H"
|
|
||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -69,7 +68,6 @@ Foam::label Foam::checkFireEdges
|
|||||||
{
|
{
|
||||||
label nFailedEdges = 0;
|
label nFailedEdges = 0;
|
||||||
const bool fullCheck = true;
|
const bool fullCheck = true;
|
||||||
typedef HashSet<edge, Hash<edge>> edgeHashSet;
|
|
||||||
|
|
||||||
Info<< "Checking edges according to AVL/FIRE on-the-fly methodology..."
|
Info<< "Checking edges according to AVL/FIRE on-the-fly methodology..."
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|||||||
@ -40,6 +40,7 @@ License
|
|||||||
#include "syncTools.H"
|
#include "syncTools.H"
|
||||||
#include "CompactListList.H"
|
#include "CompactListList.H"
|
||||||
#include "fvMeshTools.H"
|
#include "fvMeshTools.H"
|
||||||
|
#include "labelPairHashes.H"
|
||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -982,7 +983,7 @@ void Foam::fvMeshDistribute::findCouples
|
|||||||
{
|
{
|
||||||
// Store domain neighbour as map so we can easily look for pair
|
// Store domain neighbour as map so we can easily look for pair
|
||||||
// with same face+proc.
|
// with same face+proc.
|
||||||
HashTable<label, labelPair, labelPair::Hash<>> map(domainFace.size());
|
labelPairLookup map(domainFace.size());
|
||||||
|
|
||||||
forAll(domainProc, bFacei)
|
forAll(domainProc, bFacei)
|
||||||
{
|
{
|
||||||
@ -1009,8 +1010,7 @@ void Foam::fvMeshDistribute::findCouples
|
|||||||
{
|
{
|
||||||
labelPair myData(sourceFace[bFacei], sourceProc[bFacei]);
|
labelPair myData(sourceFace[bFacei], sourceProc[bFacei]);
|
||||||
|
|
||||||
HashTable<label, labelPair, labelPair::Hash<>>::const_iterator
|
labelPairLookup::const_iterator iter = map.find(myData);
|
||||||
iter = map.find(myData);
|
|
||||||
|
|
||||||
if (iter != map.end())
|
if (iter != map.end())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -36,6 +36,7 @@ License
|
|||||||
#include "faceSet.H"
|
#include "faceSet.H"
|
||||||
#include "cellSet.H"
|
#include "cellSet.H"
|
||||||
#include "pointSet.H"
|
#include "pointSet.H"
|
||||||
|
#include "labelPairHashes.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "FaceCellWave.H"
|
#include "FaceCellWave.H"
|
||||||
@ -4625,10 +4626,9 @@ void Foam::hexRef8::checkMesh() const
|
|||||||
|
|
||||||
if (pp.coupled())
|
if (pp.coupled())
|
||||||
{
|
{
|
||||||
// Check how many faces between owner and neighbour. Should
|
// Check how many faces between owner and neighbour.
|
||||||
// be only one.
|
// Should be only one.
|
||||||
HashTable<label, labelPair, labelPair::Hash<>>
|
labelPairLookup cellToFace(2*pp.size());
|
||||||
cellToFace(2*pp.size());
|
|
||||||
|
|
||||||
label facei = pp.start();
|
label facei = pp.start();
|
||||||
|
|
||||||
|
|||||||
@ -128,7 +128,7 @@ void Foam::ParticleTracks<CloudType>::postFace
|
|||||||
<< "Cloud storage not allocated" << abort(FatalError);
|
<< "Cloud storage not allocated" << abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
hitTableType::iterator iter =
|
labelPairLookup::iterator iter =
|
||||||
faceHitCounter_.find(labelPair(p.origProc(), p.origId()));
|
faceHitCounter_.find(labelPair(p.origProc(), p.origId()));
|
||||||
|
|
||||||
label localI = -1;
|
label localI = -1;
|
||||||
|
|||||||
@ -39,6 +39,7 @@ SourceFiles
|
|||||||
#define ParticleTracks_H
|
#define ParticleTracks_H
|
||||||
|
|
||||||
#include "CloudFunctionObject.H"
|
#include "CloudFunctionObject.H"
|
||||||
|
#include "labelPairHashes.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -61,9 +62,6 @@ class ParticleTracks
|
|||||||
//- Convenience typedef for parcel type
|
//- Convenience typedef for parcel type
|
||||||
typedef typename CloudType::parcelType parcelType;
|
typedef typename CloudType::parcelType parcelType;
|
||||||
|
|
||||||
//- Convenience typedef for hash hit-table
|
|
||||||
typedef HashTable<label, labelPair, typename labelPair::Hash<>>
|
|
||||||
hitTableType;
|
|
||||||
|
|
||||||
//- Number of face-hit intervals between storing parcel data
|
//- Number of face-hit intervals between storing parcel data
|
||||||
label trackInterval_;
|
label trackInterval_;
|
||||||
@ -75,7 +73,7 @@ class ParticleTracks
|
|||||||
Switch resetOnWrite_;
|
Switch resetOnWrite_;
|
||||||
|
|
||||||
//- Table of number of times a particle has hit a face
|
//- Table of number of times a particle has hit a face
|
||||||
hitTableType faceHitCounter_;
|
labelPairLookup faceHitCounter_;
|
||||||
|
|
||||||
//- Pointer to the cloud storage
|
//- Pointer to the cloud storage
|
||||||
autoPtr<Cloud<parcelType>> cloudPtr_;
|
autoPtr<Cloud<parcelType>> cloudPtr_;
|
||||||
@ -135,8 +133,8 @@ public:
|
|||||||
//- Return const access to the reset on write flag
|
//- Return const access to the reset on write flag
|
||||||
inline const Switch& resetOnWrite() const;
|
inline const Switch& resetOnWrite() const;
|
||||||
|
|
||||||
//- Rerurn the table of number of times a particle has hit a face
|
//- Return the table of number of times a particle has hit a face
|
||||||
inline const hitTableType& faceHitCounter() const;
|
inline const labelPairLookup& faceHitCounter() const;
|
||||||
|
|
||||||
//- Return const access to the cloud
|
//- Return const access to the cloud
|
||||||
inline const Cloud<parcelType>& cloud() const;
|
inline const Cloud<parcelType>& cloud() const;
|
||||||
|
|||||||
@ -49,7 +49,7 @@ inline const Foam::Switch& Foam::ParticleTracks<CloudType>::resetOnWrite() const
|
|||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
inline const typename Foam::ParticleTracks<CloudType>::hitTableType&
|
inline const Foam::labelPairLookup&
|
||||||
Foam::ParticleTracks<CloudType>::faceHitCounter() const
|
Foam::ParticleTracks<CloudType>::faceHitCounter() const
|
||||||
{
|
{
|
||||||
return faceHitCounter_;
|
return faceHitCounter_;
|
||||||
|
|||||||
@ -47,7 +47,7 @@ SourceFiles
|
|||||||
#include "hexRef8.H"
|
#include "hexRef8.H"
|
||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "labelPair.H"
|
#include "labelPairHashes.H"
|
||||||
#include "indirectPrimitivePatch.H"
|
#include "indirectPrimitivePatch.H"
|
||||||
#include "pointFieldsFwd.H"
|
#include "pointFieldsFwd.H"
|
||||||
#include "Tuple2.H"
|
#include "Tuple2.H"
|
||||||
@ -732,7 +732,7 @@ private:
|
|||||||
const label ownZone,
|
const label ownZone,
|
||||||
const label neiZone,
|
const label neiZone,
|
||||||
wordPairHashTable& zonesToFaceZone,
|
wordPairHashTable& zonesToFaceZone,
|
||||||
HashTable<word, labelPair, labelPair::Hash<>>&
|
LabelPairMap<word>& zoneIDsToFaceZone
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Remove any loose standing cells
|
//- Remove any loose standing cells
|
||||||
|
|||||||
@ -3361,7 +3361,7 @@ void Foam::meshRefinement::allocateInterRegionFaceZone
|
|||||||
const label ownZone,
|
const label ownZone,
|
||||||
const label neiZone,
|
const label neiZone,
|
||||||
wordPairHashTable& zonesToFaceZone,
|
wordPairHashTable& zonesToFaceZone,
|
||||||
HashTable<word, labelPair, labelPair::Hash<>>& zoneIDsToFaceZone
|
LabelPairMap<word>& zoneIDsToFaceZone
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const cellZoneMesh& cellZones = mesh_.cellZones();
|
const cellZoneMesh& cellZones = mesh_.cellZones();
|
||||||
@ -3383,13 +3383,7 @@ void Foam::meshRefinement::allocateInterRegionFaceZone
|
|||||||
Swap(key.first(), key.second());
|
Swap(key.first(), key.second());
|
||||||
}
|
}
|
||||||
|
|
||||||
HashTable<word, labelPair, labelPair::Hash<>>::
|
if (!zoneIDsToFaceZone.found(key))
|
||||||
const_iterator zoneFnd = zoneIDsToFaceZone.find
|
|
||||||
(
|
|
||||||
key
|
|
||||||
);
|
|
||||||
|
|
||||||
if (zoneFnd == zoneIDsToFaceZone.end())
|
|
||||||
{
|
{
|
||||||
// Not found. Allocate.
|
// Not found. Allocate.
|
||||||
const word ownZoneName =
|
const word ownZoneName =
|
||||||
|
|||||||
@ -63,9 +63,6 @@ class searchableSurfaces
|
|||||||
//- Region names per surface
|
//- Region names per surface
|
||||||
List<wordList> regionNames_;
|
List<wordList> regionNames_;
|
||||||
|
|
||||||
////- From global region name to surface and region on surface
|
|
||||||
//HashTable<labelPair> regionNames_;
|
|
||||||
|
|
||||||
//- Indices of all surfaces. Precalculated and stored.
|
//- Indices of all surfaces. Precalculated and stored.
|
||||||
labelList allSurfaces_;
|
labelList allSurfaces_;
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,6 @@ License
|
|||||||
#include "edgeIntersections.H"
|
#include "edgeIntersections.H"
|
||||||
#include "triSurfaceSearch.H"
|
#include "triSurfaceSearch.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "HashSet.H"
|
|
||||||
#include "triSurface.H"
|
#include "triSurface.H"
|
||||||
#include "pointIndexHit.H"
|
#include "pointIndexHit.H"
|
||||||
#include "treeDataTriSurface.H"
|
#include "treeDataTriSurface.H"
|
||||||
|
|||||||
@ -26,7 +26,7 @@ License
|
|||||||
#include "surfaceIntersection.H"
|
#include "surfaceIntersection.H"
|
||||||
#include "triSurfaceSearch.H"
|
#include "triSurfaceSearch.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "HashSet.H"
|
#include "labelPairHashes.H"
|
||||||
#include "triSurface.H"
|
#include "triSurface.H"
|
||||||
#include "pointIndexHit.H"
|
#include "pointIndexHit.H"
|
||||||
#include "mergePoints.H"
|
#include "mergePoints.H"
|
||||||
|
|||||||
Reference in New Issue
Block a user