From 88e6fbff82bb18e87868b7069b2840b01ebb0627 Mon Sep 17 00:00:00 2001 From: ignis Date: Thu, 6 Sep 2018 17:37:43 +0900 Subject: [PATCH] all initialization before first evaluate() --- flowRateTiltedInletVelocityFvPatchVectorField.C | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/flowRateTiltedInletVelocityFvPatchVectorField.C b/flowRateTiltedInletVelocityFvPatchVectorField.C index 6f52306..5da5374 100644 --- a/flowRateTiltedInletVelocityFvPatchVectorField.C +++ b/flowRateTiltedInletVelocityFvPatchVectorField.C @@ -105,6 +105,12 @@ flowRateTiltedInletVelocityFvPatchVectorField << " 'massFlowRate' and 'rho'" << exit(FatalIOError); } + angle_ = degToRad(readScalar(dict.lookup("angle"))); + + vector axis(dict.lookup("axis")); + + axis_ = axis / mag(axis); + // Value field require if mass based if (dict.found("value")) { @@ -118,11 +124,6 @@ flowRateTiltedInletVelocityFvPatchVectorField evaluate(Pstream::blocking); } - angle_ = degToRad(readScalar(dict.lookup("angle"))); - - vector axis(dict.lookup("axis")); - - axis_ = axis / mag(axis); }