Commit 36719bf5 authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: consistent lookupOrDefault template parameters

- in many cases can just use lookupOrDefault("key", bool) instead of
  lookupOrDefault<bool> or lookupOrDefault<Switch> since reading a
  bool from an Istream uses the Switch(Istream&) anyhow

STYLE: relocated Switch string names into file-local scope
parent 568fbf72
......@@ -2,10 +2,10 @@
bool correctPhi
(
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
pimple.dict().lookupOrDefault("correctPhi", true)
);
bool checkMeshCourantNo
(
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
);
#include "readTimeControls.H"
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
checkMeshCourantNo =
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
......@@ -121,14 +121,14 @@ IOdictionary additionalControlsDict
)
);
Switch solvePrimaryRegion
bool solvePrimaryRegion
(
additionalControlsDict.lookup("solvePrimaryRegion")
additionalControlsDict.lookupOrDefault("solvePrimaryRegion", true)
);
Switch solvePyrolysisRegion
bool solvePyrolysisRegion
(
additionalControlsDict.lookupOrDefault<bool>("solvePyrolysisRegion", true)
additionalControlsDict.lookupOrDefault("solvePyrolysisRegion", true)
);
volScalarField Qdot
......
if (pimple.dict().lookupOrDefault<bool>("hydrostaticInitialization", false))
if (pimple.dict().lookupOrDefault("hydrostaticInitialization", false))
{
volScalarField& ph_rgh = regIOobject::store
(
......
......@@ -17,7 +17,7 @@
const dictionary& eosDict = thermoDict.subDict("equationOfState");
bool local = eosDict.lookupOrDefault<bool>("local", false);
bool local = eosDict.lookupOrDefault("local", false);
// Evolve T as:
//
......
......@@ -2,10 +2,10 @@
bool correctPhi
(
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
pimple.dict().lookupOrDefault("correctPhi", true)
);
bool checkMeshCourantNo
(
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
);
#include "readTimeControls.H"
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
checkMeshCourantNo =
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
......@@ -2,10 +2,10 @@
bool correctPhi
(
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
pimple.dict().lookupOrDefault("correctPhi", true)
);
bool checkMeshCourantNo
(
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
);
#include "readTimeControls.H"
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
checkMeshCourantNo =
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
......@@ -105,9 +105,9 @@ forAll(Y, i)
}
fields.add(thermo.he());
Switch solvePrimaryRegion
bool solvePrimaryRegion
(
pimple.dict().lookupOrDefault<Switch>("solvePrimaryRegion", true)
pimple.dict().lookupOrDefault("solvePrimaryRegion", true)
);
volScalarField Qdot
......
#include "createTimeControls.H"
scalar maxAcousticCo
bool correctPhi
(
readScalar(runTime.controlDict().lookup("maxAcousticCo"))
pimple.dict().lookupOrDefault("correctPhi", true)
);
bool correctPhi
scalar maxAcousticCo
(
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
readScalar(runTime.controlDict().lookup("maxAcousticCo"))
);
#include "readTimeControls.H"
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
maxAcousticCo = readScalar(runTime.controlDict().lookup("maxAcousticCo"));
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
......@@ -2,15 +2,15 @@
bool correctPhi
(
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
pimple.dict().lookupOrDefault("correctPhi", true)
);
bool checkMeshCourantNo
(
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
);
bool moveMeshOuterCorrectors
(
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false)
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false)
);
#include "readTimeControls.H"
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
checkMeshCourantNo =
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
moveMeshOuterCorrectors =
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false);
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false);
......@@ -4,12 +4,12 @@ label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr")));
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
bool MULESCorr(alphaControls.lookupOrDefault<Switch>("MULESCorr", false));
bool MULESCorr(alphaControls.lookupOrDefault("MULESCorr", false));
// Apply the compression correction from the previous iteration
// Improves efficiency for steady-simulations but can only be applied
// once the alpha field is reasonably steady, i.e. fully developed
bool alphaApplyPrevCorr
(
alphaControls.lookupOrDefault<Switch>("alphaApplyPrevCorr", false)
alphaControls.lookupOrDefault("alphaApplyPrevCorr", false)
);
bool correctPhi
(
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
pimple.dict().lookupOrDefault("correctPhi", true)
);
bool checkMeshCourantNo
(
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
);
bool moveMeshOuterCorrectors
(
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false)
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false)
);
#include "readTimeControls.H"
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
checkMeshCourantNo =
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
moveMeshOuterCorrectors =
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false);
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false);
bool correctPhi
(
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
pimple.dict().lookupOrDefault("correctPhi", true)
);
bool checkMeshCourantNo
(
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
);
bool moveMeshOuterCorrectors
(
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false)
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false)
);
......
#include "readTimeControls.H"
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", false);
correctPhi = pimple.dict().lookupOrDefault("correctPhi", false);
checkMeshCourantNo =
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
moveMeshOuterCorrectors =
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false);
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false);
massFluxInterpolation =
pimple.dict().lookupOrDefault("massFluxInterpolation", false);
......
......@@ -4,14 +4,14 @@ label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr")));
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
bool MULESCorr(alphaControls.lookupOrDefault<Switch>("MULESCorr", false));
bool MULESCorr(alphaControls.lookupOrDefault("MULESCorr", false));
// Apply the compression correction from the previous iteration
// Improves efficiency for steady-simulations but can only be applied
// once the alpha field is reasonably steady, i.e. fully developed
//bool alphaApplyPrevCorr
//(
// alphaControls.lookupOrDefault<Switch>("alphaApplyPrevCorr", false)
// alphaControls.lookupOrDefault("alphaApplyPrevCorr", false)
//);
// Isotropic compression coefficient
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment