src/OpenFOAM: Use Zero rather than pTraits<Type>

This commit is contained in:
Henry Weller
2016-03-22 10:38:30 +00:00
parent ce81b44dc6
commit 34361493f9
28 changed files with 78 additions and 86 deletions

View File

@ -35,7 +35,7 @@ Foam::Function1Types::Constant<Type>::Constant
)
:
Function1<Type>(entryName),
value_(pTraits<Type>::zero)
value_(Zero)
{
Istream& is(dict.lookup(entryName));
word entryType(is);

View File

@ -69,7 +69,7 @@ Type Foam::Function1<Type>::value(const scalar x) const
{
NotImplemented;
return pTraits<Type>::zero;
return Zero;
}
@ -78,7 +78,7 @@ Type Foam::Function1<Type>::integrate(const scalar x1, const scalar x2) const
{
NotImplemented;
return pTraits<Type>::zero;
return Zero;
}

View File

@ -146,7 +146,7 @@ void Foam::Function1Types::Polynomial<Type>::convertTimeBase(const Time& t)
template<class Type>
Type Foam::Function1Types::Polynomial<Type>::value(const scalar x) const
{
Type y(pTraits<Type>::zero);
Type y(Zero);
forAll(coeffs_, i)
{
y += cmptMultiply
@ -167,7 +167,7 @@ Type Foam::Function1Types::Polynomial<Type>::integrate
const scalar x2
) const
{
Type intx(pTraits<Type>::zero);
Type intx(Zero);
if (canIntegrate_)
{

View File

@ -394,7 +394,7 @@ Foam::tmp<Foam::scalarField> Foam::Function1Types::TableBase<Type>::x() const
template<class Type>
Foam::tmp<Foam::Field<Type>> Foam::Function1Types::TableBase<Type>::y() const
{
tmp<Field<Type>> tfld(new Field<Type>(table_.size(), pTraits<Type>::zero));
tmp<Field<Type>> tfld(new Field<Type>(table_.size(), Zero));
Field<Type>& fld = tfld.ref();
forAll(table_, i)