Skip to content
GitLab
Explore
Sign in
Register
This is an archived project. Repository and other project resources are read-only.
Commits on Source (2)
COMP: handle copying from SLList to List (was removed in OpenFOAM)
· f126633d
Mark OLESEN
authored
Jun 23, 2025
f126633d
STYLE: use allGatherList instead of separate gatherList/scatterList
· 66409e86
Mark OLESEN
authored
Jun 23, 2025
66409e86
Hide whitespace changes
Inline
Side-by-side
meshLibrary/utilities/boundaryLayers/boundaryLayers/boundaryLayers.C
View file @
66409e86
...
...
@@ -403,8 +403,7 @@ void Foam::Module::boundaryLayers::findPatchesToBeTreatedTogether()
{
procPatches
[
Pstream
::
myProcNo
()][
i
]
=
flattenedPatches
[
i
];
}
Pstream
::
gatherList
(
procPatches
);
Pstream
::
scatterList
(
procPatches
);
Pstream
::
allGatherList
(
procPatches
);
forAll
(
procPatches
,
procI
)
{
...
...
meshLibrary/utilities/helperFunctions/helperFunctionsFrontalMarking.C
View file @
66409e86
...
...
@@ -412,8 +412,7 @@ Foam::label Foam::Module::help::groupMarking
labelList
nGroupsAtProc
(
Pstream
::
nProcs
());
nGroupsAtProc
[
Pstream
::
myProcNo
()]
=
nGroups
;
Pstream
::
gatherList
(
nGroupsAtProc
);
Pstream
::
scatterList
(
nGroupsAtProc
);
Pstream
::
allGatherList
(
nGroupsAtProc
);
label
startGroup
(
0
),
totalNumGroups
(
0
);
for
(
label
procI
=
0
;
procI
<
Pstream
::
nProcs
();
++
procI
)
...
...
meshLibrary/utilities/meshes/partTetMesh/partTetMeshParallelAddressing.C
View file @
66409e86
...
...
@@ -183,8 +183,7 @@ void Foam::Module::partTetMesh::createParallelAddressing
labelList
nPointsAtProc
(
Pstream
::
nProcs
());
nSharedPoints
-=
nLocalPoints
;
nPointsAtProc
[
Pstream
::
myProcNo
()]
=
points_
.
size
()
-
nSharedPoints
;
Pstream
::
gatherList
(
nPointsAtProc
);
Pstream
::
scatterList
(
nPointsAtProc
);
Pstream
::
allGatherList
(
nPointsAtProc
);
for
(
label
i
=
0
;
i
<
Pstream
::
myProcNo
();
++
i
)
{
...
...
meshLibrary/utilities/meshes/partTriMesh/partTriMeshParallelAddressing.C
View file @
66409e86
...
...
@@ -186,8 +186,7 @@ void Foam::Module::partTriMesh::createParallelAddressing
labelList
nPointsAtProc
(
Pstream
::
nProcs
());
nSharedPoints
-=
nLocalPoints
;
nPointsAtProc
[
Pstream
::
myProcNo
()]
=
pts
.
size
()
-
nSharedPoints
;
Pstream
::
gatherList
(
nPointsAtProc
);
Pstream
::
scatterList
(
nPointsAtProc
);
Pstream
::
allGatherList
(
nPointsAtProc
);
for
(
label
i
=
0
;
i
<
Pstream
::
myProcNo
();
++
i
)
{
...
...
meshLibrary/utilities/meshes/polyMeshGenAddressing/polyMeshGenAddressingParallelAddressing.C
View file @
66409e86
...
...
@@ -213,8 +213,8 @@ void Foam::Module::polyMeshGenAddressing::calcGlobalPointLabels() const
label
startPoint
(
0
);
labelList
nPointsAtProc
(
Pstream
::
nProcs
());
nPointsAtProc
[
Pstream
::
myProcNo
()]
=
nLocalPoints
;
Pstream
::
g
atherList
(
nPointsAtProc
);
Pstream
::
scatterList
(
nPointsAtProc
);
Pstream
::
allG
atherList
(
nPointsAtProc
);
for
(
label
i
=
0
;
i
<
Pstream
::
myProcNo
();
++
i
)
{
startPoint
+=
nPointsAtProc
[
i
];
...
...
@@ -346,8 +346,8 @@ void Foam::Module::polyMeshGenAddressing::calcGlobalFaceLabels() const
labelList
numberOfInternalFaces
(
Pstream
::
nProcs
());
numberOfInternalFaces
[
Pstream
::
myProcNo
()]
=
nIntFaces
+
nBoundaryFaces
;
Pstream
::
g
atherList
(
numberOfInternalFaces
);
Pstream
::
scatterList
(
numberOfInternalFaces
);
Pstream
::
allG
atherList
(
numberOfInternalFaces
);
for
(
label
i
=
0
;
i
<
Pstream
::
myProcNo
();
++
i
)
{
startFace
+=
numberOfInternalFaces
[
i
];
...
...
@@ -418,8 +418,7 @@ void Foam::Module::polyMeshGenAddressing::calcGlobalFaceLabels() const
numberOfBoundaryFaces
[
Pstream
::
myProcNo
()][
patchI
]
=
boundaries
[
patchI
].
patchSize
();
}
Pstream
::
gatherList
(
numberOfBoundaryFaces
);
Pstream
::
scatterList
(
numberOfBoundaryFaces
);
Pstream
::
allGatherList
(
numberOfBoundaryFaces
);
forAll
(
boundaries
,
patchI
)
{
...
...
@@ -467,8 +466,8 @@ void Foam::Module::polyMeshGenAddressing::calcGlobalCellLabels() const
label
startLabel
(
0
);
labelList
nCellsAtProc
(
Pstream
::
nProcs
());
nCellsAtProc
[
Pstream
::
myProcNo
()]
=
globalCellLabel
.
size
();
Pstream
::
g
atherList
(
nCellsAtProc
);
Pstream
::
scatterList
(
nCellsAtProc
);
Pstream
::
allG
atherList
(
nCellsAtProc
);
for
(
label
i
=
0
;
i
<
Pstream
::
myProcNo
();
++
i
)
{
startLabel
+=
nCellsAtProc
[
i
];
...
...
@@ -666,8 +665,8 @@ void Foam::Module::polyMeshGenAddressing::calcGlobalEdgeLabels() const
label
startEdge
(
0
);
labelList
nEdgesAtProc
(
Pstream
::
nProcs
());
nEdgesAtProc
[
Pstream
::
myProcNo
()]
=
nLocalEdges
;
Pstream
::
g
atherList
(
nEdgesAtProc
);
Pstream
::
scatterList
(
nEdgesAtProc
);
Pstream
::
allG
atherList
(
nEdgesAtProc
);
for
(
label
i
=
0
;
i
<
Pstream
::
myProcNo
();
++
i
)
{
startEdge
+=
nEdgesAtProc
[
i
];
...
...
meshLibrary/utilities/meshes/polyMeshGenModifier/polyMeshGenModifierRenumberMesh.C
View file @
66409e86
...
...
@@ -31,7 +31,6 @@ License
#include
"polyMeshGenModifier.H"
#include
"demandDrivenData.H"
#include
"polyMeshGenAddressing.H"
#include
"SLList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
meshLibrary/utilities/meshes/polyMeshGenModifier/polyMeshGenModifierZipUpCells.C
View file @
66409e86
...
...
@@ -32,6 +32,7 @@ License
#include
"demandDrivenData.H"
#include
"HashSet.H"
#include
"boolList.H"
#include
"SLList.H"
//#define DEBUG_ZIPUP
...
...
@@ -457,7 +458,22 @@ void Foam::Module::polyMeshGenModifier::zipUpCells()
if
(
pointChain
.
size
()
>
2
)
{
edgesToInsert
[
nEdgesToInsert
]
=
pointChain
;
// OLD: edgesToInsert[nEdgesToInsert] = pointChain;
// Cannot use std::copy algorithm
// - SLList doesn't define iterator category
auto
&
dest
=
edgesToInsert
[
nEdgesToInsert
];
dest
.
resize_nocopy
(
pointChain
.
size
());
auto
iter
=
dest
.
begin
();
for
(
const
auto
&
val
:
pointChain
)
{
*
iter
=
val
;
++
iter
;
}
nEdgesToInsert
++
;
}
}
...
...
meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressingParallelAddressing.C
View file @
66409e86
...
...
@@ -126,8 +126,7 @@ void Foam::Module::meshOctreeAddressing::calcGlobalPointLabels() const
}
// exchange data with other processors
Pstream
::
gatherList
(
nLocalPoints
);
Pstream
::
scatterList
(
nLocalPoints
);
Pstream
::
allGatherList
(
nLocalPoints
);
// find the starting point label
label
startPoint
(
0
);
...
...
@@ -416,8 +415,7 @@ void Foam::Module::meshOctreeAddressing::calcGlobalLeafLabels() const
nLeavesAtProc
[
Pstream
::
myProcNo
()]
=
nLeaves
;
// exchange the data with other processors
Pstream
::
gatherList
(
nLeavesAtProc
);
Pstream
::
scatterList
(
nLeavesAtProc
);
Pstream
::
allGatherList
(
nLeavesAtProc
);
// find the starting labels for
nLeaves
=
0
;
...
...
meshLibrary/utilities/octrees/meshOctree/meshOctreeModifier/meshOctreeModifierLoadDistribution.C
View file @
66409e86
...
...
@@ -127,8 +127,7 @@ void Foam::Module::meshOctreeModifier::loadDistribution
labelList
procWeights
(
Pstream
::
nProcs
());
procWeights
[
Pstream
::
myProcNo
()]
=
localNumWeighs
;
Pstream
::
gatherList
(
procWeights
);
Pstream
::
scatterList
(
procWeights
);
Pstream
::
allGatherList
(
procWeights
);
for
(
label
procI
=
0
;
procI
<
Pstream
::
myProcNo
();
++
procI
)
doBalancing
+=
procWeights
[
procI
];
...
...
@@ -194,8 +193,7 @@ void Foam::Module::meshOctreeModifier::loadDistribution
sendToProcesssors
[
Pstream
::
myProcNo
()][
counter
++
]
=
it
->
first
;
}
Pstream
::
gatherList
(
sendToProcesssors
);
Pstream
::
scatterList
(
sendToProcesssors
);
Pstream
::
allGatherList
(
sendToProcesssors
);
labelHashSet
receiveFrom
;
forAll
(
sendToProcesssors
,
procI
)
...
...
meshLibrary/utilities/octrees/meshOctree/meshOctreeModifier/meshOctreeModifierUpdateCommunicationPattern.C
View file @
66409e86
...
...
@@ -57,8 +57,7 @@ void Foam::Module::meshOctreeModifier::updateCommunicationPattern()
leaves
[
leaves
.
size
()
-
1
]
->
coordinates
();
// communicate missing ranges
Pstream
::
gatherList
(
range
);
Pstream
::
scatterList
(
range
);
Pstream
::
allGatherList
(
range
);
// find missing child cubes in the tree. These coordinates are located on
// other processors, and they must fit in the range of cubes located
...
...
meshLibrary/utilities/surfaceTools/meshSurfaceEngine/meshSurfaceEngineParallelAddressing.C
View file @
66409e86
...
...
@@ -200,8 +200,8 @@ void Foam::Module::meshSurfaceEngine::calcGlobalBoundaryPointLabels() const
label
startPoint
(
0
);
labelList
nPointsAtProc
(
Pstream
::
nProcs
());
nPointsAtProc
[
Pstream
::
myProcNo
()]
=
nLocalPoints
;
Pstream
::
g
atherList
(
nPointsAtProc
);
Pstream
::
scatterList
(
nPointsAtProc
);
Pstream
::
allG
atherList
(
nPointsAtProc
);
for
(
label
i
=
0
;
i
<
Pstream
::
myProcNo
();
++
i
)
startPoint
+=
nPointsAtProc
[
i
];
...
...
@@ -524,8 +524,8 @@ void Foam::Module::meshSurfaceEngine::calcGlobalBoundaryEdgeLabels() const
label
startEdge
(
0
);
labelList
nEdgesAtProc
(
Pstream
::
nProcs
());
nEdgesAtProc
[
Pstream
::
myProcNo
()]
=
nLocalEdges
;
Pstream
::
g
atherList
(
nEdgesAtProc
);
Pstream
::
scatterList
(
nEdgesAtProc
);
Pstream
::
allG
atherList
(
nEdgesAtProc
);
for
(
label
i
=
0
;
i
<
Pstream
::
myProcNo
();
++
i
)
startEdge
+=
nEdgesAtProc
[
i
];
...
...
@@ -765,8 +765,7 @@ void Foam::Module::meshSurfaceEngine::calcGlobalBoundaryFaceLabels() const
labelList
nFacesAtProc
(
Pstream
::
nProcs
());
nFacesAtProc
[
Pstream
::
myProcNo
()]
=
bFaces
.
size
();
Pstream
::
gatherList
(
nFacesAtProc
);
Pstream
::
scatterList
(
nFacesAtProc
);
Pstream
::
allGatherList
(
nFacesAtProc
);
label
startFace
(
0
);
for
(
label
i
=
0
;
i
<
Pstream
::
myProcNo
();
++
i
)
...
...