diff --git a/src/mesh/blockMesh/gradingDescriptor/gradingDescriptor.C b/src/mesh/blockMesh/gradingDescriptor/gradingDescriptor.C index ab04583dd8888526fe95d213cda401dce32afd5f..86785fa06b9d8e273433dc48b993567edb9a4164 100644 --- a/src/mesh/blockMesh/gradingDescriptor/gradingDescriptor.C +++ b/src/mesh/blockMesh/gradingDescriptor/gradingDescriptor.C @@ -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 (gd.expansionRatio_ < 0) + { + gd.expansionRatio_ = 1.0/(-gd.expansionRatio_); + } + is.check(FUNCTION_NAME); return is; }