diff --git a/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C b/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C index 076c5c11e5..45819e2aa3 100644 --- a/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C +++ b/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -400,7 +400,10 @@ int main(int argc, char *argv[]) // Do not expand functionEntries except during dictionary expansion // with the -expand option - entry::disableFunctionEntries = true; + if (!args.optionFound("expand")) + { + entry::disableFunctionEntries = true; + } const fileName dictPath(args[1]); @@ -470,10 +473,8 @@ int main(int argc, char *argv[]) { return 0; } - else if (args.optionFound("expand")) + else if (args.optionFound("expand") && !args.optionFound("entry")) { - entry::disableFunctionEntries = false; - IOobject::writeBanner(Info) <<"//\n// " << dictPath << "\n//\n"; dict.dictionary::write(Info, false); diff --git a/bin/foamJob b/bin/foamJob index adf7a4abdf..d8fdd1effd 100755 --- a/bin/foamJob +++ b/bin/foamJob @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | Website: https://openfoam.org -# \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -177,7 +177,7 @@ then # if [ -r "processor0" -o -r "processors" -o "$(echo processors[1-9]*)" != "processors[1-9]*" ] then - NPROCS="$(foamDictionary -entry numberOfSubdomains -value system/decomposeParDict)" + NPROCS="$(foamDictionary -expand -entry numberOfSubdomains -value system/decomposeParDict)" else echo "Case is not currently decomposed" if [ -r system/decomposeParDict ]