ENH: use 0.0-value instead of -value for inv(dimensionSet)

- the automatic rounding avoids generation of negative zero values.
  For other exponent values it has no effect.
This commit is contained in:
Mark Olesen 2019-02-26 22:43:56 +01:00 committed by Andrew Heather
parent d50c5ce86f
commit 8a459cdba6

View File

@ -463,13 +463,13 @@ Foam::dimensionSet Foam::inv(const dimensionSet& ds)
{ {
return dimensionSet return dimensionSet
( (
-ds[dimensionSet::MASS], 0.0-ds[dimensionSet::MASS],
-ds[dimensionSet::LENGTH], 0.0-ds[dimensionSet::LENGTH],
-ds[dimensionSet::TIME], 0.0-ds[dimensionSet::TIME],
-ds[dimensionSet::TEMPERATURE], 0.0-ds[dimensionSet::TEMPERATURE],
-ds[dimensionSet::MOLES], 0.0-ds[dimensionSet::MOLES],
-ds[dimensionSet::CURRENT], 0.0-ds[dimensionSet::CURRENT],
-ds[dimensionSet::LUMINOUS_INTENSITY] 0.0-ds[dimensionSet::LUMINOUS_INTENSITY]
); );
} }