Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
2fe94812
Commit
2fe94812
authored
Aug 18, 2021
by
Andrew Heather
Committed by
Mark Olesen
Sep 08, 2021
Browse files
BUG: ParticleCollector - corrected and simplified parallel reductions. See
#2184
parent
76270c07
Changes
1
Show whitespace changes
Inline
Side-by-side
src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C
View file @
2fe94812
...
...
@@ -419,8 +419,6 @@ void Foam::ParticleCollector<CloudType>::write()
massTotal_
[
facei
]
+=
mass_
[
facei
];
}
const
label
proci
=
Pstream
::
myProcNo
();
Info
<<
type
()
<<
" output:"
<<
nl
;
Field
<
scalar
>
faceMassTotal
(
mass_
.
size
(),
Zero
);
...
...
@@ -434,15 +432,11 @@ void Foam::ParticleCollector<CloudType>::write()
scalar
sumAverageMFR
=
0
.
0
;
forAll
(
faces_
,
facei
)
{
scalarList
allProcMass
(
Pstream
::
nProcs
());
allProcMass
[
proci
]
=
massTotal_
[
facei
];
Pstream
::
gatherList
(
allProcMass
);
faceMassTotal
[
facei
]
+=
sum
(
allProcMass
);
faceMassTotal
[
facei
]
+=
returnReduce
(
massTotal_
[
facei
],
sumOp
<
scalar
>
());
scalarList
allProcMassFlowRate
(
Pstream
::
nProcs
());
allProcMassFlowRate
[
proci
]
=
massFlowRate_
[
facei
];
Pstream
::
gatherList
(
allProcMassFlowRate
);
faceMassFlowRate
[
facei
]
+=
sum
(
allProcMassFlowRate
);
faceMassFlowRate
[
facei
]
+=
returnReduce
(
massFlowRate_
[
facei
],
sumOp
<
scalar
>
());
sumTotalMass
+=
faceMassTotal
[
facei
];
sumAverageMFR
+=
faceMassFlowRate
[
facei
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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