polyMeshDistributionMap: renamed mapDistributePolyMesh -> polyMeshDistributionMap

This is a map data structure rather than a class or function which performs the
mapping operation so polyMeshDistributionMap is more logical and comprehensible
than mapDistributePolyMesh.
This commit is contained in:
Henry Weller
2022-03-31 18:01:44 +01:00
parent 97eee844ad
commit 2e6eb5f2ce
267 changed files with 1103 additions and 1048 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "distributedTriSurfaceMesh.H"
#include "mapDistribute.H"
#include "distributionMap.H"
#include "Random.H"
#include "addToRunTimeSelectionTable.H"
#include "triangleFuncs.H"
@ -252,7 +252,7 @@ void Foam::distributedTriSurfaceMesh::distributeSegment
}
Foam::autoPtr<Foam::mapDistribute>
Foam::autoPtr<Foam::distributionMap>
Foam::distributedTriSurfaceMesh::distributeSegments
(
const pointField& start,
@ -342,9 +342,9 @@ Foam::distributedTriSurfaceMesh::distributeSegments
}
}
return autoPtr<mapDistribute>
return autoPtr<distributionMap>
(
new mapDistribute
new distributionMap
(
segmentI, // size after construction
move(sendMap),
@ -436,7 +436,7 @@ void Foam::distributedTriSurfaceMesh::findLine
// Original index of segment
labelList allSegmentMap(start.size());
const autoPtr<mapDistribute> mapPtr
const autoPtr<distributionMap> mapPtr
(
distributeSegments
(
@ -446,7 +446,7 @@ void Foam::distributedTriSurfaceMesh::findLine
allSegmentMap
)
);
const mapDistribute& map = mapPtr();
const distributionMap& map = mapPtr();
label nOldAllSegments = allSegments.size();
@ -537,7 +537,7 @@ void Foam::distributedTriSurfaceMesh::findLine
// Exchanges indices to the processor they come from.
// - calculates exchange map
// - uses map to calculate local triangle index
Foam::autoPtr<Foam::mapDistribute>
Foam::autoPtr<Foam::distributionMap>
Foam::distributedTriSurfaceMesh::calcLocalQueries
(
const List<pointIndexHit>& info,
@ -635,16 +635,16 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries
// Pack into distribution map
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
autoPtr<mapDistribute> mapPtr
autoPtr<distributionMap> mapPtr
(
new mapDistribute
new distributionMap
(
segmentI, // size after construction
move(sendMap),
move(constructMap)
)
);
const mapDistribute& map = mapPtr();
const distributionMap& map = mapPtr();
// Send over queries
@ -688,7 +688,7 @@ Foam::label Foam::distributedTriSurfaceMesh::calcOverlappingProcs
// Generate queries for parallel distance calculation
// - calculates exchange map
// - uses map to exchange points and radius
Foam::autoPtr<Foam::mapDistribute>
Foam::autoPtr<Foam::distributionMap>
Foam::distributedTriSurfaceMesh::calcLocalQueries
(
const pointField& centres,
@ -788,9 +788,9 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries
}
}
autoPtr<mapDistribute> mapPtr
autoPtr<distributionMap> mapPtr
(
new mapDistribute
new distributionMap
(
segmentI, // size after construction
move(sendMap),
@ -1583,7 +1583,7 @@ void Foam::distributedTriSurfaceMesh::findNearest
pointField allCentres;
scalarField allRadiusSqr;
labelList allSegmentMap;
autoPtr<mapDistribute> mapPtr
autoPtr<distributionMap> mapPtr
(
calcLocalQueries
(
@ -1595,7 +1595,7 @@ void Foam::distributedTriSurfaceMesh::findNearest
allSegmentMap
)
);
const mapDistribute& map = mapPtr();
const distributionMap& map = mapPtr();
// swap samples to local processor
@ -1837,7 +1837,7 @@ void Foam::distributedTriSurfaceMesh::getRegion
// ~~~~~~~~~~~~~~
labelList triangleIndex(info.size());
autoPtr<mapDistribute> mapPtr
autoPtr<distributionMap> mapPtr
(
calcLocalQueries
(
@ -1845,7 +1845,7 @@ void Foam::distributedTriSurfaceMesh::getRegion
triangleIndex
)
);
const mapDistribute& map = mapPtr();
const distributionMap& map = mapPtr();
// Do my tests
@ -1886,7 +1886,7 @@ void Foam::distributedTriSurfaceMesh::getNormal
// ~~~~~~~~~~~~~~
labelList triangleIndex(info.size());
autoPtr<mapDistribute> mapPtr
autoPtr<distributionMap> mapPtr
(
calcLocalQueries
(
@ -1894,7 +1894,7 @@ void Foam::distributedTriSurfaceMesh::getNormal
triangleIndex
)
);
const mapDistribute& map = mapPtr();
const distributionMap& map = mapPtr();
// Do my tests
@ -1942,7 +1942,7 @@ void Foam::distributedTriSurfaceMesh::getField
// ~~~~~~~~~~~~~~
labelList triangleIndex(info.size());
autoPtr<mapDistribute> mapPtr
autoPtr<distributionMap> mapPtr
(
calcLocalQueries
(
@ -1950,7 +1950,7 @@ void Foam::distributedTriSurfaceMesh::getField
triangleIndex
)
);
const mapDistribute& map = mapPtr();
const distributionMap& map = mapPtr();
// Do my tests
@ -2031,8 +2031,8 @@ void Foam::distributedTriSurfaceMesh::distribute
(
const List<treeBoundBox>& bbs,
const bool keepNonLocal,
autoPtr<mapDistribute>& faceMap,
autoPtr<mapDistribute>& pointMap
autoPtr<distributionMap>& faceMap,
autoPtr<distributionMap>& pointMap
)
{
// Get bbs of all domains
@ -2298,7 +2298,7 @@ void Foam::distributedTriSurfaceMesh::distribute
faceMap.reset
(
new mapDistribute
new distributionMap
(
allTris.size(),
move(faceSendMap),
@ -2307,7 +2307,7 @@ void Foam::distributedTriSurfaceMesh::distribute
);
pointMap.reset
(
new mapDistribute
new distributionMap
(
allPoints.size(),
move(pointSendMap),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -58,7 +58,7 @@ SourceFiles
namespace Foam
{
class mapDistribute;
class distributionMap;
class decompositionMethod;
// Typedefs
@ -158,7 +158,7 @@ private:
//- Divide edges into local and remote segments. Construct map to
// distribute and collect data.
autoPtr<mapDistribute> distributeSegments
autoPtr<distributionMap> distributeSegments
(
const pointField& start,
const pointField& end,
@ -182,7 +182,7 @@ private:
//- Obtains global indices from pointIndexHit and swaps them back
// to their original processor. Used to calculate local region
// and normal.
autoPtr<mapDistribute> calcLocalQueries
autoPtr<distributionMap> calcLocalQueries
(
const List<pointIndexHit>&,
labelList& triangleIndex
@ -198,7 +198,7 @@ private:
boolList& overlaps
) const;
autoPtr<mapDistribute> calcLocalQueries
autoPtr<distributionMap> calcLocalQueries
(
const pointField& centres,
const scalarField& radiusSqr,
@ -287,7 +287,7 @@ private:
//- Distribute stored fields
template<class Type>
void distributeFields(const mapDistribute& map);
void distributeFields(const distributionMap& map);
public:
@ -415,8 +415,8 @@ public:
(
const List<treeBoundBox>&,
const bool keepNonLocal,
autoPtr<mapDistribute>& faceMap,
autoPtr<mapDistribute>& pointMap
autoPtr<distributionMap>& faceMap,
autoPtr<distributionMap>& pointMap
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,7 +25,7 @@ License
#include "distributedTriSurfaceMesh.H"
#include "triSurfaceFields.H"
#include "mapDistribute.H"
#include "distributionMap.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -44,7 +44,7 @@ License
// // ~~~~~~~~~~~~~~
//
// labelList triangleIndex(info.size());
// autoPtr<mapDistribute> mapPtr
// autoPtr<distributionMap> mapPtr
// (
// calcLocalQueries
// (
@ -52,7 +52,7 @@ License
// triangleIndex
// )
// );
// const mapDistribute& map = mapPtr();
// const distributionMap& map = mapPtr();
//
//
// // Do my tests
@ -83,7 +83,7 @@ License
template<class Type>
void Foam::distributedTriSurfaceMesh::distributeFields
(
const mapDistribute& map
const distributionMap& map
)
{
typedef DimensionedField<Type, triSurfaceGeoMesh> DimensionedSurfField;