Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
a6b84927
Commit
a6b84927
authored
Jul 25, 2018
by
Mark OLESEN
Browse files
STYLE: use sortedToc() instead of toc() followed by sort()
parent
8610a95a
Changes
4
Hide whitespace changes
Inline
Side-by-side
applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.C
View file @
a6b84927
...
...
@@ -1049,8 +1049,7 @@ void Foam::faMeshDecomposition::decomposeMesh()
}
// Grab the result from the hash list
globallySharedPoints_
=
gSharedPoints
.
toc
();
sort
(
globallySharedPoints_
);
globallySharedPoints_
=
gSharedPoints
.
sortedToc
();
}
...
...
src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchBdryPoints.C
View file @
a6b84927
...
...
@@ -65,8 +65,7 @@ calcBdryPoints() const
bp
.
insert
(
curEdge
.
end
());
}
boundaryPointsPtr_
=
new
labelList
(
bp
.
toc
());
sort
(
*
boundaryPointsPtr_
);
boundaryPointsPtr_
=
new
labelList
(
bp
.
sortedToc
());
if
(
debug
)
{
...
...
src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.C
View file @
a6b84927
...
...
@@ -247,22 +247,14 @@ void Foam::distribution::add(const label valueToAdd)
void
Foam
::
distribution
::
insertMissingKeys
()
{
iterator
iter
(
this
->
begin
());
List
<
label
>
keys
=
toc
();
sort
(
keys
);
List
<
label
>
keys
=
sortedToc
();
if
(
keys
.
size
())
if
(
keys
.
size
()
>
2
)
{
for
(
label
k
=
keys
[
0
];
k
<
keys
.
last
();
k
++
)
for
(
label
k
=
keys
[
1
];
k
<
keys
.
last
();
k
++
)
{
iter
=
find
(
k
);
if
(
iter
==
this
->
end
())
{
this
->
insert
(
k
,
0
);
}
// Insert 0, if the entry does not already exist
this
->
insert
(
k
,
0
);
}
}
}
...
...
@@ -274,10 +266,7 @@ Foam::List<Foam::Pair<Foam::scalar>> Foam::distribution::normalised()
insertMissingKeys
();
List
<
label
>
keys
=
toc
();
sort
(
keys
);
List
<
label
>
keys
=
sortedToc
();
List
<
Pair
<
scalar
>>
normDist
(
size
());
forAll
(
keys
,
k
)
...
...
@@ -420,10 +409,7 @@ Foam::List<Foam::Pair<Foam::scalar>> Foam::distribution::raw()
{
insertMissingKeys
();
List
<
label
>
keys
=
toc
();
sort
(
keys
);
List
<
label
>
keys
=
sortedToc
();
List
<
Pair
<
scalar
>>
rawDist
(
size
());
forAll
(
keys
,
k
)
...
...
src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C
View file @
a6b84927
...
...
@@ -720,12 +720,9 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
if
(
problemCells
.
size
())
{
// This cycle has failed. Print out the problem cells
labelList
toc
(
problemCells
.
toc
());
sort
(
toc
);
FatalErrorInFunction
<<
"Found "
<<
problemCells
.
size
()
<<
" problem cells."
<<
nl
<<
"Cells: "
<<
toc
<<
"Cells: "
<<
problemCells
.
sortedToc
()
<<
abort
(
FatalError
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment