mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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
This commit is contained in:
@ -183,7 +183,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
bool moveMeshOuterCorrectors
|
||||
(
|
||||
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false)
|
||||
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false)
|
||||
);
|
||||
|
||||
while (runTime.loop())
|
||||
|
||||
@ -282,10 +282,10 @@ int main(int argc, char *argv[])
|
||||
const word viewFactorWall("viewFactorWall");
|
||||
|
||||
const bool writeViewFactors =
|
||||
viewFactorDict.lookupOrDefault<bool>("writeViewFactorMatrix", false);
|
||||
viewFactorDict.lookupOrDefault("writeViewFactorMatrix", false);
|
||||
|
||||
const bool dumpRays =
|
||||
viewFactorDict.lookupOrDefault<bool>("dumpRays", false);
|
||||
viewFactorDict.lookupOrDefault("dumpRays", false);
|
||||
|
||||
const label debug = viewFactorDict.lookupOrDefault<label>("debug", 0);
|
||||
|
||||
|
||||
@ -463,7 +463,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// Suboption: "nonManifoldEdges" (false: remove non-manifold edges)
|
||||
if (!subsetDict.lookupOrDefault<bool>("nonManifoldEdges", true))
|
||||
if (!subsetDict.lookupOrDefault("nonManifoldEdges", true))
|
||||
{
|
||||
Info<< "Removing all non-manifold edges"
|
||||
<< " (edges with > 2 connected faces) unless they"
|
||||
@ -478,7 +478,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// Suboption: "openEdges" (false: remove open edges)
|
||||
if (!subsetDict.lookupOrDefault<bool>("openEdges", true))
|
||||
if (!subsetDict.lookupOrDefault("openEdges", true))
|
||||
{
|
||||
Info<< "Removing all open edges"
|
||||
<< " (edges with 1 connected face)" << endl;
|
||||
@ -650,7 +650,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// Option: "closeness"
|
||||
if (surfaceDict.lookupOrDefault<bool>("closeness", false))
|
||||
if (surfaceDict.lookupOrDefault("closeness", false))
|
||||
{
|
||||
Pair<tmp<scalarField>> tcloseness =
|
||||
triSurfaceTools::writeCloseness
|
||||
@ -697,7 +697,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// Option: "curvature"
|
||||
if (surfaceDict.lookupOrDefault<bool>("curvature", false))
|
||||
if (surfaceDict.lookupOrDefault("curvature", false))
|
||||
{
|
||||
tmp<scalarField> tcurvatureField =
|
||||
triSurfaceTools::writeCurvature
|
||||
@ -727,7 +727,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// Option: "featureProximity"
|
||||
if (surfaceDict.lookupOrDefault<bool>("featureProximity", false))
|
||||
if (surfaceDict.lookupOrDefault("featureProximity", false))
|
||||
{
|
||||
tmp<scalarField> tproximity =
|
||||
edgeMeshTools::writeFeatureProximity
|
||||
|
||||
Reference in New Issue
Block a user