dictionary scalar lookup: simplified syntax using the type templated lookup function

Replaced
    readScalar(dict.lookup("name"))
with
    dict.lookup<scalar>("name")
This commit is contained in:
Henry Weller
2019-11-27 14:56:32 +00:00
parent d987648ef4
commit 5eaf74c3a4
375 changed files with 1160 additions and 1632 deletions

View File

@ -12,6 +12,6 @@
)
);
scalar Ea(readScalar(boxTurbDict.lookup("Ea")));
scalar Ea(boxTurbDict.lookup<scalar>("Ea"));
scalar k0(readScalar(boxTurbDict.lookup("k0")));
scalar k0(boxTurbDict.lookup<scalar>("k0"));

View File

@ -2,7 +2,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-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -124,8 +124,8 @@ Foam::tabulatedWallFunctions::SpaldingsLaw::SpaldingsLaw
)
:
tabulatedWallFunction(dict, mesh, typeName),
kappa_(readScalar(coeffDict_.lookup("kappa"))),
E_(readScalar(coeffDict_.lookup("E")))
kappa_(coeffDict_.lookup<scalar>("kappa")),
E_(coeffDict_.lookup<scalar>("E"))
{
invertFunction();