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:
Mark Olesen
2010-05-20 14:17:18 +02:00
parent 9525d57d71
commit ff30e6b61a
21 changed files with 29 additions and 36 deletions

View File

@ -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);

View File

@ -7,5 +7,5 @@
pimple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
const bool momentumPredictor =
pimple.lookupOrDefault<bool>("momentumPredictor", true);
pimple.lookupOrDefault("momentumPredictor", true);

View File

@ -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);

View File

@ -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);

View File

@ -96,7 +96,7 @@
)
);
if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
if (RASProperties.lookupOrDefault("printCoeffs", false))
{
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
<< "wallFunctionCoeffs" << wallFunctionDict << endl;

View File

@ -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);

View File

@ -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);

View File

@ -276,7 +276,7 @@
)
);
if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
if (RASProperties.lookupOrDefault("printCoeffs", false))
{
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
<< "wallFunctionCoeffs" << wallFunctionDict << endl;