all initialization before first evaluate()

This commit is contained in:
ignis 2018-09-06 17:37:43 +09:00
parent 5a9fba7a78
commit 88e6fbff82

View file

@ -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);
}