mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use restricted dictionary lookup for utilities (issue #762)
- get<label>, get<scalar> instead of readLabel, readScalar, etc.
This commit is contained in:
@ -32,8 +32,8 @@ IOdictionary turbulenceProperties
|
||||
);
|
||||
const dictionary& MaxwellCoeffs =
|
||||
turbulenceProperties.subDict("laminar").subDict("MaxwellCoeffs");
|
||||
const scalar nu1 = readScalar(MaxwellCoeffs.lookup("nuM"));
|
||||
const scalar lambda = readScalar(MaxwellCoeffs.lookup("lambda"));
|
||||
const scalar nu1 = MaxwellCoeffs.get<scalar>("nuM");
|
||||
const scalar lambda = MaxwellCoeffs.get<scalar>("lambda");
|
||||
|
||||
const scalar rho = 1;
|
||||
|
||||
@ -52,7 +52,7 @@ IOdictionary fvOptions
|
||||
const dictionary& gradPDict =
|
||||
fvOptions.subDict("momentumSource").subDict("injectionRateSuSp");
|
||||
const scalar K =
|
||||
Tuple2<vector, scalar>(gradPDict.lookup("U")).first().x();
|
||||
gradPDict.get<Tuple2<vector, scalar>>("U").first().x();
|
||||
|
||||
dictionary probes(IFstream(runTime.system()/"probes")());
|
||||
const point location = pointField(probes.lookup("probeLocations"))[0];
|
||||
|
||||
Reference in New Issue
Block a user