swirlFlowRateInletVelocityFvPatchVectorField: Avoid calculating origin and axis for patches with no faces

Resolves problem with reconstructPar
This commit is contained in:
Henry Weller
2017-08-16 14:14:24 +01:00
committed by Andrew Heather
parent ef48fa1829
commit 542151b1fa

View File

@ -65,7 +65,9 @@ swirlFlowRateInletVelocityFvPatchVectorField
dict.lookupOrDefault
(
"origin",
gSum(patch().Cf()*patch().magSf())/gSum(patch().magSf())
patch().size()
? gSum(patch().Cf()*patch().magSf())/gSum(patch().magSf())
: Zero
)
),
axis_
@ -73,7 +75,9 @@ swirlFlowRateInletVelocityFvPatchVectorField
dict.lookupOrDefault
(
"axis",
-gSum(patch().Sf())/gSum(patch().magSf())
patch().size()
? -gSum(patch().Sf())/gSum(patch().magSf())
: Zero
)
),
flowRate_(Function1<scalar>::New("flowRate", dict)),