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:
@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user