mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
src/OpenFOAM: Use Zero rather than pTraits<Type>
This commit is contained in:
@ -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);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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_)
|
||||
{
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user