BUGFIX: In parallel run, if no cells are on a processor, min() returns no ::max instead of ::zero and max() returns ::min instead of ::zero. Author: Pablo Higuera. Merge: Dominik Christ.

This commit is contained in:
Dominik Christ 2014-08-07 11:59:41 +01:00
commit c5a2b9d772

View file

@ -318,10 +318,7 @@ Type max(const UList<Type>& f)
}
else
{
WarningIn("max(const UList<Type>&)")
<< "empty field, returning zero" << endl;
return pTraits<Type>::zero;
return pTraits<Type>::min;
}
}
@ -338,10 +335,7 @@ Type min(const UList<Type>& f)
}
else
{
WarningIn("min(const UList<Type>&)")
<< "empty field, returning zero" << endl;
return pTraits<Type>::zero;
return pTraits<Type>::max;
}
}