mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Added "max" and "min" constants to the primitive types which represent the
largest and smallest representable values. Accessible directly and via pTraits.
This commit is contained in:
@ -430,10 +430,7 @@ Type max(const FieldField<Field, Type>& f)
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn("max(const FieldField<Field, Type>&) const")
|
||||
<< "empty fieldField, returning zero" << endl;
|
||||
|
||||
return pTraits<Type>::zero;
|
||||
return pTraits<Type>::min;
|
||||
}
|
||||
}
|
||||
|
||||
@ -464,10 +461,7 @@ Type min(const FieldField<Field, Type>& f)
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn("min(const FieldField<Field, Type>&) const")
|
||||
<< "empty fieldField, returning zero" << endl;
|
||||
|
||||
return pTraits<Type>::zero;
|
||||
return pTraits<Type>::max;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user