fvPatchFields: Use 'Zero' rather than 'pTraits<Type>::zero' to initialize to 0

This new approach to 0 initialization is simpler, cleaner, more readable
and more efficient.  The rest of the OpenFOAM code will be updated in
due course.
This commit is contained in:
Henry Weller
2016-03-22 08:27:59 +00:00
parent 6f70b18bd2
commit beb00e22d6
20 changed files with 49 additions and 49 deletions

View File

@ -125,7 +125,7 @@ Foam::zeroGradientFvPatchField<Type>::valueBoundaryCoeffs
{
return tmp<Field<Type>>
(
new Field<Type>(this->size(), pTraits<Type>::zero)
new Field<Type>(this->size(), Zero)
);
}
@ -136,7 +136,7 @@ Foam::zeroGradientFvPatchField<Type>::gradientInternalCoeffs() const
{
return tmp<Field<Type>>
(
new Field<Type>(this->size(), pTraits<Type>::zero)
new Field<Type>(this->size(), Zero)
);
}
@ -147,7 +147,7 @@ Foam::zeroGradientFvPatchField<Type>::gradientBoundaryCoeffs() const
{
return tmp<Field<Type>>
(
new Field<Type>(this->size(), pTraits<Type>::zero)
new Field<Type>(this->size(), Zero)
);
}