BUG: gradingDescriptor stream input ignores negative expansion (Fix #1841)

- mostly only tripped when using fractional edge grading, since this
  is where the list reading is used. Overseen in commit 7da0b5bee1.
This commit is contained in:
Mark Olesen
2020-09-16 09:19:45 +02:00
parent 73057447a2
commit 9762b547fe

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2015 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -129,6 +129,11 @@ Foam::Istream& Foam::operator>>(Istream& is, gradingDescriptor& gd)
is.readEnd("gradingDescriptor");
}
if (expansionRatio_ < 0)
{
expansionRatio_ = 1.0/(-expansionRatio_);
}
is.check(FUNCTION_NAME);
return is;
}