Skip to content
Snippets Groups Projects
Commit 543ac077 authored by sergio's avatar sergio
Browse files

BUG: Fixing constructors from dictionary to avoid hanging in parallel when patch size is zero

parent 7363a01a
Branches
Tags
No related merge requests found
......@@ -145,7 +145,7 @@ Foam::swirlFanVelocityFvPatchField::swirlFanVelocityFvPatchField
dict.lookupOrDefault
(
"origin",
patch().size()
returnReduce(patch().size(), maxOp<label>())
? gSum(patch().Cf()*patch().magSf())/gSum(patch().magSf())
: Zero
)
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2018 OpenCFD
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -65,7 +65,7 @@ swirlFlowRateInletVelocityFvPatchVectorField
dict.lookupOrDefault
(
"origin",
patch().size()
returnReduce(patch().size(), maxOp<label>())
? gSum(patch().Cf()*patch().magSf())/gSum(patch().magSf())
: Zero
)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment