mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: can use bool instead of Switch version of dictionary::lookupOrDefault
- both versions handle the same input words. Only need the <Switch> version when the destination variable is also a Switch and we need to output the word later.
This commit is contained in:
@ -4,8 +4,8 @@
|
||||
simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
||||
|
||||
const bool momentumPredictor =
|
||||
simple.lookupOrDefault<bool>("momentumPredictor", true);
|
||||
simple.lookupOrDefault("momentumPredictor", true);
|
||||
|
||||
const bool transonic =
|
||||
simple.lookupOrDefault<bool>("transonic", false);
|
||||
simple.lookupOrDefault("transonic", false);
|
||||
|
||||
|
||||
@ -7,5 +7,5 @@
|
||||
pimple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
||||
|
||||
const bool momentumPredictor =
|
||||
pimple.lookupOrDefault<bool>("momentumPredictor", true);
|
||||
pimple.lookupOrDefault("momentumPredictor", true);
|
||||
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
piso.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
||||
|
||||
const bool momentumPredictor =
|
||||
piso.lookupOrDefault<bool>("momentumPredictor", true);
|
||||
piso.lookupOrDefault("momentumPredictor", true);
|
||||
|
||||
const bool transonic =
|
||||
piso.lookupOrDefault<bool>("transonic", false);
|
||||
piso.lookupOrDefault("transonic", false);
|
||||
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
#include "readPIMPLEControls.H"
|
||||
|
||||
const bool correctPhi =
|
||||
pimple.lookupOrDefault<bool>("correctPhi", false);
|
||||
pimple.lookupOrDefault("correctPhi", false);
|
||||
|
||||
const bool checkMeshCourantNo =
|
||||
pimple.lookupOrDefault<bool>("checkMeshCourantNo", false);
|
||||
pimple.lookupOrDefault("checkMeshCourantNo", false);
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
)
|
||||
);
|
||||
|
||||
if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
|
||||
if (RASProperties.lookupOrDefault("printCoeffs", false))
|
||||
{
|
||||
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
|
||||
<< "wallFunctionCoeffs" << wallFunctionDict << endl;
|
||||
|
||||
@ -20,8 +20,8 @@
|
||||
}
|
||||
|
||||
const bool correctPhi =
|
||||
piso.lookupOrDefault<bool>("correctPhi", true);
|
||||
piso.lookupOrDefault("correctPhi", true);
|
||||
|
||||
const bool checkMeshCourantNo =
|
||||
piso.lookupOrDefault<bool>("checkMeshCourantNo", false);
|
||||
piso.lookupOrDefault("checkMeshCourantNo", false);
|
||||
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
# include "readPISOControls.H"
|
||||
|
||||
const bool correctPhi =
|
||||
piso.lookupOrDefault<bool>("correctPhi", true);
|
||||
piso.lookupOrDefault("correctPhi", true);
|
||||
|
||||
const bool checkMeshCourantNo =
|
||||
piso.lookupOrDefault<bool>("checkMeshCourantNo", false);
|
||||
piso.lookupOrDefault("checkMeshCourantNo", false);
|
||||
|
||||
|
||||
@ -276,7 +276,7 @@
|
||||
)
|
||||
);
|
||||
|
||||
if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
|
||||
if (RASProperties.lookupOrDefault("printCoeffs", false))
|
||||
{
|
||||
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
|
||||
<< "wallFunctionCoeffs" << wallFunctionDict << endl;
|
||||
|
||||
Reference in New Issue
Block a user