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

@ -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
@ -284,8 +284,8 @@ int main(int argc, char *argv[])
const dictionary& planeDict = meshSubsetDict.subDict("plane");
const plane pl(planeDict);
const scalar distance(readScalar(planeDict.lookup("distance")));
const scalar cosAngle(readScalar(planeDict.lookup("cosAngle")));
const scalar distance(planeDict.lookup<scalar>("distance"));
const scalar cosAngle(planeDict.lookup<scalar>("cosAngle"));
// Select all triangles that are close to the plane and
// whose normal aligns with the plane as well.