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:
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
bool correctPhi
|
bool correctPhi
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
|
pimple.dict().lookupOrDefault("correctPhi", true)
|
||||||
);
|
);
|
||||||
|
|
||||||
bool checkMeshCourantNo
|
bool checkMeshCourantNo
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
|
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
|
||||||
|
|
||||||
checkMeshCourantNo =
|
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
|
volScalarField Qdot
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
if (pimple.dict().lookupOrDefault<bool>("hydrostaticInitialization", false))
|
if (pimple.dict().lookupOrDefault("hydrostaticInitialization", false))
|
||||||
{
|
{
|
||||||
volScalarField& ph_rgh = regIOobject::store
|
volScalarField& ph_rgh = regIOobject::store
|
||||||
(
|
(
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
const dictionary& eosDict = thermoDict.subDict("equationOfState");
|
const dictionary& eosDict = thermoDict.subDict("equationOfState");
|
||||||
|
|
||||||
bool local = eosDict.lookupOrDefault<bool>("local", false);
|
bool local = eosDict.lookupOrDefault("local", false);
|
||||||
|
|
||||||
// Evolve T as:
|
// Evolve T as:
|
||||||
//
|
//
|
||||||
|
|||||||
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
bool correctPhi
|
bool correctPhi
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
|
pimple.dict().lookupOrDefault("correctPhi", true)
|
||||||
);
|
);
|
||||||
|
|
||||||
bool checkMeshCourantNo
|
bool checkMeshCourantNo
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
|
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
|
||||||
|
|
||||||
checkMeshCourantNo =
|
checkMeshCourantNo =
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||||
|
|||||||
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
bool correctPhi
|
bool correctPhi
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
|
pimple.dict().lookupOrDefault("correctPhi", true)
|
||||||
);
|
);
|
||||||
|
|
||||||
bool checkMeshCourantNo
|
bool checkMeshCourantNo
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
|
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
|
||||||
|
|
||||||
checkMeshCourantNo =
|
checkMeshCourantNo =
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||||
|
|||||||
@ -105,9 +105,9 @@ forAll(Y, i)
|
|||||||
}
|
}
|
||||||
fields.add(thermo.he());
|
fields.add(thermo.he());
|
||||||
|
|
||||||
Switch solvePrimaryRegion
|
bool solvePrimaryRegion
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("solvePrimaryRegion", true)
|
pimple.dict().lookupOrDefault("solvePrimaryRegion", true)
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField Qdot
|
volScalarField Qdot
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
#include "createTimeControls.H"
|
#include "createTimeControls.H"
|
||||||
|
|
||||||
|
bool correctPhi
|
||||||
|
(
|
||||||
|
pimple.dict().lookupOrDefault("correctPhi", true)
|
||||||
|
);
|
||||||
|
|
||||||
scalar maxAcousticCo
|
scalar maxAcousticCo
|
||||||
(
|
(
|
||||||
readScalar(runTime.controlDict().lookup("maxAcousticCo"))
|
readScalar(runTime.controlDict().lookup("maxAcousticCo"))
|
||||||
);
|
);
|
||||||
|
|
||||||
bool correctPhi
|
|
||||||
(
|
|
||||||
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
|
|
||||||
);
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
|
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
|
||||||
maxAcousticCo = readScalar(runTime.controlDict().lookup("maxAcousticCo"));
|
maxAcousticCo = readScalar(runTime.controlDict().lookup("maxAcousticCo"));
|
||||||
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
|
|
||||||
|
|||||||
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
bool correctPhi
|
bool correctPhi
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
|
pimple.dict().lookupOrDefault("correctPhi", true)
|
||||||
);
|
);
|
||||||
|
|
||||||
bool checkMeshCourantNo
|
bool checkMeshCourantNo
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
||||||
);
|
);
|
||||||
|
|
||||||
bool moveMeshOuterCorrectors
|
bool moveMeshOuterCorrectors
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false)
|
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
|
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
|
||||||
|
|
||||||
checkMeshCourantNo =
|
checkMeshCourantNo =
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||||
|
|
||||||
moveMeshOuterCorrectors =
|
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")));
|
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
|
// Apply the compression correction from the previous iteration
|
||||||
// Improves efficiency for steady-simulations but can only be applied
|
// Improves efficiency for steady-simulations but can only be applied
|
||||||
// once the alpha field is reasonably steady, i.e. fully developed
|
// once the alpha field is reasonably steady, i.e. fully developed
|
||||||
bool alphaApplyPrevCorr
|
bool alphaApplyPrevCorr
|
||||||
(
|
(
|
||||||
alphaControls.lookupOrDefault<Switch>("alphaApplyPrevCorr", false)
|
alphaControls.lookupOrDefault("alphaApplyPrevCorr", false)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
bool correctPhi
|
bool correctPhi
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
|
pimple.dict().lookupOrDefault("correctPhi", true)
|
||||||
);
|
);
|
||||||
|
|
||||||
bool checkMeshCourantNo
|
bool checkMeshCourantNo
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
||||||
);
|
);
|
||||||
|
|
||||||
bool moveMeshOuterCorrectors
|
bool moveMeshOuterCorrectors
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false)
|
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
|
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
|
||||||
|
|
||||||
checkMeshCourantNo =
|
checkMeshCourantNo =
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||||
|
|
||||||
moveMeshOuterCorrectors =
|
moveMeshOuterCorrectors =
|
||||||
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false);
|
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false);
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
bool correctPhi
|
bool correctPhi
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
|
pimple.dict().lookupOrDefault("correctPhi", true)
|
||||||
);
|
);
|
||||||
|
|
||||||
bool checkMeshCourantNo
|
bool checkMeshCourantNo
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
||||||
);
|
);
|
||||||
|
|
||||||
bool moveMeshOuterCorrectors
|
bool moveMeshOuterCorrectors
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false)
|
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", false);
|
correctPhi = pimple.dict().lookupOrDefault("correctPhi", false);
|
||||||
|
|
||||||
checkMeshCourantNo =
|
checkMeshCourantNo =
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||||
|
|
||||||
moveMeshOuterCorrectors =
|
moveMeshOuterCorrectors =
|
||||||
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false);
|
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false);
|
||||||
|
|
||||||
massFluxInterpolation =
|
massFluxInterpolation =
|
||||||
pimple.dict().lookupOrDefault("massFluxInterpolation", false);
|
pimple.dict().lookupOrDefault("massFluxInterpolation", false);
|
||||||
|
|||||||
@ -4,14 +4,14 @@ label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr")));
|
|||||||
|
|
||||||
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
|
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
|
// Apply the compression correction from the previous iteration
|
||||||
// Improves efficiency for steady-simulations but can only be applied
|
// Improves efficiency for steady-simulations but can only be applied
|
||||||
// once the alpha field is reasonably steady, i.e. fully developed
|
// once the alpha field is reasonably steady, i.e. fully developed
|
||||||
//bool alphaApplyPrevCorr
|
//bool alphaApplyPrevCorr
|
||||||
//(
|
//(
|
||||||
// alphaControls.lookupOrDefault<Switch>("alphaApplyPrevCorr", false)
|
// alphaControls.lookupOrDefault("alphaApplyPrevCorr", false)
|
||||||
//);
|
//);
|
||||||
|
|
||||||
// Isotropic compression coefficient
|
// Isotropic compression coefficient
|
||||||
|
|||||||
@ -62,14 +62,14 @@ int main(int argc, char *argv[])
|
|||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Switch faceMomentum
|
// bool faceMomentum
|
||||||
// (
|
// (
|
||||||
// pimple.dict().lookupOrDefault<Switch>("faceMomentum", false)
|
// pimple.dict().lookupOrDefault("faceMomentum", false)
|
||||||
// );
|
// );
|
||||||
|
|
||||||
// Switch implicitPhasePressure
|
// bool implicitPhasePressure
|
||||||
// (
|
// (
|
||||||
// mesh.solverDict(alpha1.name()).lookupOrDefault<Switch>
|
// mesh.solverDict(alpha1.name()).lookupOrDefault
|
||||||
// (
|
// (
|
||||||
// "implicitPhasePressure", false
|
// "implicitPhasePressure", false
|
||||||
// )
|
// )
|
||||||
|
|||||||
@ -91,14 +91,14 @@ int main(int argc, char *argv[])
|
|||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
Switch faceMomentum
|
bool faceMomentum
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("faceMomentum", false)
|
pimple.dict().lookupOrDefault("faceMomentum", false)
|
||||||
);
|
);
|
||||||
|
|
||||||
Switch implicitPhasePressure
|
bool implicitPhasePressure
|
||||||
(
|
(
|
||||||
mesh.solverDict(alpha1.name()).lookupOrDefault<Switch>
|
mesh.solverDict(alpha1.name()).lookupOrDefault
|
||||||
(
|
(
|
||||||
"implicitPhasePressure", false
|
"implicitPhasePressure", false
|
||||||
)
|
)
|
||||||
|
|||||||
@ -57,14 +57,14 @@ int main(int argc, char *argv[])
|
|||||||
#include "CourantNos.H"
|
#include "CourantNos.H"
|
||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
Switch faceMomentum
|
bool faceMomentum
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("faceMomentum", false)
|
pimple.dict().lookupOrDefault("faceMomentum", false)
|
||||||
);
|
);
|
||||||
|
|
||||||
Switch implicitPhasePressure
|
bool implicitPhasePressure
|
||||||
(
|
(
|
||||||
mesh.solverDict(alpha1.name()).lookupOrDefault<Switch>
|
mesh.solverDict(alpha1.name()).lookupOrDefault
|
||||||
(
|
(
|
||||||
"implicitPhasePressure", false
|
"implicitPhasePressure", false
|
||||||
)
|
)
|
||||||
|
|||||||
@ -183,7 +183,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
bool moveMeshOuterCorrectors
|
bool moveMeshOuterCorrectors
|
||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false)
|
pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false)
|
||||||
);
|
);
|
||||||
|
|
||||||
while (runTime.loop())
|
while (runTime.loop())
|
||||||
|
|||||||
@ -282,10 +282,10 @@ int main(int argc, char *argv[])
|
|||||||
const word viewFactorWall("viewFactorWall");
|
const word viewFactorWall("viewFactorWall");
|
||||||
|
|
||||||
const bool writeViewFactors =
|
const bool writeViewFactors =
|
||||||
viewFactorDict.lookupOrDefault<bool>("writeViewFactorMatrix", false);
|
viewFactorDict.lookupOrDefault("writeViewFactorMatrix", false);
|
||||||
|
|
||||||
const bool dumpRays =
|
const bool dumpRays =
|
||||||
viewFactorDict.lookupOrDefault<bool>("dumpRays", false);
|
viewFactorDict.lookupOrDefault("dumpRays", false);
|
||||||
|
|
||||||
const label debug = viewFactorDict.lookupOrDefault<label>("debug", 0);
|
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)
|
// Suboption: "nonManifoldEdges" (false: remove non-manifold edges)
|
||||||
if (!subsetDict.lookupOrDefault<bool>("nonManifoldEdges", true))
|
if (!subsetDict.lookupOrDefault("nonManifoldEdges", true))
|
||||||
{
|
{
|
||||||
Info<< "Removing all non-manifold edges"
|
Info<< "Removing all non-manifold edges"
|
||||||
<< " (edges with > 2 connected faces) unless they"
|
<< " (edges with > 2 connected faces) unless they"
|
||||||
@ -478,7 +478,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Suboption: "openEdges" (false: remove open edges)
|
// Suboption: "openEdges" (false: remove open edges)
|
||||||
if (!subsetDict.lookupOrDefault<bool>("openEdges", true))
|
if (!subsetDict.lookupOrDefault("openEdges", true))
|
||||||
{
|
{
|
||||||
Info<< "Removing all open edges"
|
Info<< "Removing all open edges"
|
||||||
<< " (edges with 1 connected face)" << endl;
|
<< " (edges with 1 connected face)" << endl;
|
||||||
@ -650,7 +650,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Option: "closeness"
|
// Option: "closeness"
|
||||||
if (surfaceDict.lookupOrDefault<bool>("closeness", false))
|
if (surfaceDict.lookupOrDefault("closeness", false))
|
||||||
{
|
{
|
||||||
Pair<tmp<scalarField>> tcloseness =
|
Pair<tmp<scalarField>> tcloseness =
|
||||||
triSurfaceTools::writeCloseness
|
triSurfaceTools::writeCloseness
|
||||||
@ -697,7 +697,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Option: "curvature"
|
// Option: "curvature"
|
||||||
if (surfaceDict.lookupOrDefault<bool>("curvature", false))
|
if (surfaceDict.lookupOrDefault("curvature", false))
|
||||||
{
|
{
|
||||||
tmp<scalarField> tcurvatureField =
|
tmp<scalarField> tcurvatureField =
|
||||||
triSurfaceTools::writeCurvature
|
triSurfaceTools::writeCurvature
|
||||||
@ -727,7 +727,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Option: "featureProximity"
|
// Option: "featureProximity"
|
||||||
if (surfaceDict.lookupOrDefault<bool>("featureProximity", false))
|
if (surfaceDict.lookupOrDefault("featureProximity", false))
|
||||||
{
|
{
|
||||||
tmp<scalarField> tproximity =
|
tmp<scalarField> tproximity =
|
||||||
edgeMeshTools::writeFeatureProximity
|
edgeMeshTools::writeFeatureProximity
|
||||||
|
|||||||
@ -269,7 +269,7 @@ void Foam::Time::setControls()
|
|||||||
|
|
||||||
// Read and set the deltaT only if time-step adjustment is active
|
// Read and set the deltaT only if time-step adjustment is active
|
||||||
// otherwise use the deltaT from the controlDict
|
// otherwise use the deltaT from the controlDict
|
||||||
if (controlDict_.lookupOrDefault<Switch>("adjustTimeStep", false))
|
if (controlDict_.lookupOrDefault("adjustTimeStep", false))
|
||||||
{
|
{
|
||||||
if (timeDict.readIfPresent("deltaT", deltaT_))
|
if (timeDict.readIfPresent("deltaT", deltaT_))
|
||||||
{
|
{
|
||||||
@ -358,7 +358,7 @@ void Foam::Time::setMonitoring(const bool forceProfiling)
|
|||||||
else if
|
else if
|
||||||
(
|
(
|
||||||
profilingDict
|
profilingDict
|
||||||
&& profilingDict->lookupOrDefault<bool>("active", true)
|
&& profilingDict->lookupOrDefault("active", true)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
profiling::initialize
|
profiling::initialize
|
||||||
|
|||||||
@ -270,17 +270,17 @@ Foam::profiling::profiling
|
|||||||
timers_(),
|
timers_(),
|
||||||
sysInfo_
|
sysInfo_
|
||||||
(
|
(
|
||||||
dict.lookupOrDefault<bool>("sysInfo", false)
|
dict.lookupOrDefault("sysInfo", false)
|
||||||
? new profilingSysInfo() : nullptr
|
? new profilingSysInfo() : nullptr
|
||||||
),
|
),
|
||||||
cpuInfo_
|
cpuInfo_
|
||||||
(
|
(
|
||||||
dict.lookupOrDefault<bool>("cpuInfo", false)
|
dict.lookupOrDefault("cpuInfo", false)
|
||||||
? new cpuInfo() : nullptr
|
? new cpuInfo() : nullptr
|
||||||
),
|
),
|
||||||
memInfo_
|
memInfo_
|
||||||
(
|
(
|
||||||
dict.lookupOrDefault<bool>("memInfo", false)
|
dict.lookupOrDefault("memInfo", false)
|
||||||
? new memInfo() : nullptr
|
? new memInfo() : nullptr
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -30,7 +30,17 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const char* Foam::Switch::names[9] =
|
namespace
|
||||||
|
{
|
||||||
|
static_assert
|
||||||
|
(
|
||||||
|
Foam::Switch::INVALID+1 == 9,
|
||||||
|
"Switch::switchType does not have 9 entries"
|
||||||
|
);
|
||||||
|
|
||||||
|
//- The names corresponding to the Switch::switchType enumeration.
|
||||||
|
// Includes extra entries for "invalid".
|
||||||
|
static const char* names[9] =
|
||||||
{
|
{
|
||||||
"false", "true",
|
"false", "true",
|
||||||
"no", "yes",
|
"no", "yes",
|
||||||
@ -39,6 +49,7 @@ const char* Foam::Switch::names[9] =
|
|||||||
"invalid"
|
"invalid"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // End anonymous namespace
|
||||||
|
|
||||||
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -92,15 +92,12 @@ private:
|
|||||||
//- The logic and enumerated text representation stored in a byte
|
//- The logic and enumerated text representation stored in a byte
|
||||||
unsigned char switch_;
|
unsigned char switch_;
|
||||||
|
|
||||||
//- The set of names corresponding to the switchType enumeration.
|
|
||||||
// Includes extra entries for "invalid".
|
|
||||||
static const char* names[9];
|
|
||||||
|
|
||||||
// Static Member Functions
|
// Static Member Functions
|
||||||
|
|
||||||
//- Return enum value for input string
|
//- Return enum value for input string
|
||||||
static switchType parse(const std::string& str, bool allowBad);
|
static switchType parse(const std::string& str, bool allowBad);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|||||||
@ -139,7 +139,7 @@ const Foam::dictionary& Foam::subModelBase::properties() const
|
|||||||
|
|
||||||
bool Foam::subModelBase::defaultCoeffs(const bool printMsg) const
|
bool Foam::subModelBase::defaultCoeffs(const bool printMsg) const
|
||||||
{
|
{
|
||||||
bool def = coeffDict_.lookupOrDefault<bool>("defaultCoeffs", false);
|
bool def = coeffDict_.lookupOrDefault("defaultCoeffs", false);
|
||||||
if (printMsg && def)
|
if (printMsg && def)
|
||||||
{
|
{
|
||||||
Info<< incrIndent;
|
Info<< incrIndent;
|
||||||
|
|||||||
@ -95,7 +95,7 @@ thermalBaffle1DFvPatchScalarField
|
|||||||
mappedPatchBase(p.patch(), NEARESTPATCHFACE, dict),
|
mappedPatchBase(p.patch(), NEARESTPATCHFACE, dict),
|
||||||
mixedFvPatchScalarField(p, iF),
|
mixedFvPatchScalarField(p, iF),
|
||||||
TName_("T"),
|
TName_("T"),
|
||||||
baffleActivated_(dict.lookupOrDefault<bool>("baffleActivated", true)),
|
baffleActivated_(dict.lookupOrDefault("baffleActivated", true)),
|
||||||
thickness_(),
|
thickness_(),
|
||||||
qs_(p.size(), 0),
|
qs_(p.size(), 0),
|
||||||
solidDict_(dict),
|
solidDict_(dict),
|
||||||
|
|||||||
@ -1225,7 +1225,7 @@ Foam::edgeCollapser::edgeCollapser
|
|||||||
),
|
),
|
||||||
allowEarlyCollapseToPoint_
|
allowEarlyCollapseToPoint_
|
||||||
(
|
(
|
||||||
dict.lookupOrDefault<Switch>("allowEarlyCollapseToPoint", true)
|
dict.lookupOrDefault("allowEarlyCollapseToPoint", true)
|
||||||
),
|
),
|
||||||
allowEarlyCollapseCoeff_
|
allowEarlyCollapseCoeff_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -93,7 +93,7 @@ private:
|
|||||||
|
|
||||||
//- Allow a face to be collapsed to a point early, before the test
|
//- Allow a face to be collapsed to a point early, before the test
|
||||||
// to collapse to an edge
|
// to collapse to an edge
|
||||||
const Switch allowEarlyCollapseToPoint_;
|
const bool allowEarlyCollapseToPoint_;
|
||||||
|
|
||||||
//- Fraction of maxCollapseFaceToPointSideLengthCoeff_ to use when
|
//- Fraction of maxCollapseFaceToPointSideLengthCoeff_ to use when
|
||||||
// allowEarlyCollapseToPoint_ is on
|
// allowEarlyCollapseToPoint_ is on
|
||||||
|
|||||||
@ -153,7 +153,7 @@ bool Foam::externalFileCoupler::readDict(const dictionary& dict)
|
|||||||
dict.lookup("commsDir") >> commsDir_;
|
dict.lookup("commsDir") >> commsDir_;
|
||||||
commsDir_.expand();
|
commsDir_.expand();
|
||||||
commsDir_.clean();
|
commsDir_.clean();
|
||||||
slaveFirst_ = dict.lookupOrDefault<bool>("initByExternal", false);
|
slaveFirst_ = dict.lookupOrDefault("initByExternal", false);
|
||||||
|
|
||||||
Info<< type() << ": initialize" << nl
|
Info<< type() << ": initialize" << nl
|
||||||
<< " directory: " << commsDir_ << nl
|
<< " directory: " << commsDir_ << nl
|
||||||
@ -169,7 +169,7 @@ bool Foam::externalFileCoupler::readDict(const dictionary& dict)
|
|||||||
|
|
||||||
timeOut_ = dict.lookupOrDefault("timeOut", 100*waitInterval_);
|
timeOut_ = dict.lookupOrDefault("timeOut", 100*waitInterval_);
|
||||||
|
|
||||||
log = dict.lookupOrDefault<bool>("log", false);
|
log = dict.lookupOrDefault("log", false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,14 +4,14 @@ label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr")));
|
|||||||
|
|
||||||
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
|
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
|
// Apply the compression correction from the previous iteration
|
||||||
// Improves efficiency for steady-simulations but can only be applied
|
// Improves efficiency for steady-simulations but can only be applied
|
||||||
// once the alpha field is reasonably steady, i.e. fully developed
|
// once the alpha field is reasonably steady, i.e. fully developed
|
||||||
bool alphaApplyPrevCorr
|
bool alphaApplyPrevCorr
|
||||||
(
|
(
|
||||||
alphaControls.lookupOrDefault<Switch>("alphaApplyPrevCorr", false)
|
alphaControls.lookupOrDefault("alphaApplyPrevCorr", false)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Isotropic compression coefficient
|
// Isotropic compression coefficient
|
||||||
|
|||||||
@ -67,8 +67,8 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
|
|||||||
uniformJumpFvPatchField<Type>(p, iF, dict),
|
uniformJumpFvPatchField<Type>(p, iF, dict),
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||||
uniformJump_(dict.lookupOrDefault<bool>("uniformJump", false)),
|
uniformJump_(dict.lookupOrDefault("uniformJump", false)),
|
||||||
nonDimensional_(dict.lookupOrDefault<Switch>("nonDimensional", false)),
|
nonDimensional_(dict.lookupOrDefault("nonDimensional", false)),
|
||||||
rpm_(dict.lookupOrDefault<scalar>("rpm", 0.0)),
|
rpm_(dict.lookupOrDefault<scalar>("rpm", 0.0)),
|
||||||
dm_(dict.lookupOrDefault<scalar>("dm", 0.0))
|
dm_(dict.lookupOrDefault<scalar>("dm", 0.0))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -136,15 +136,15 @@ class fanFvPatchField
|
|||||||
bool uniformJump_;
|
bool uniformJump_;
|
||||||
|
|
||||||
//- Swtich for using non-dimensional curve
|
//- Swtich for using non-dimensional curve
|
||||||
Switch nonDimensional_;
|
bool nonDimensional_;
|
||||||
|
|
||||||
// Parameters for non-dimensional table
|
// Parameters for non-dimensional table
|
||||||
|
|
||||||
//- Fan rpm
|
//- Fan rpm
|
||||||
scalar rpm_;
|
scalar rpm_;
|
||||||
|
|
||||||
//- Fan mean diameter
|
//- Fan mean diameter
|
||||||
scalar dm_;
|
scalar dm_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|||||||
@ -96,8 +96,8 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
|
|||||||
uniformJumpFvPatchField<scalar>(p, iF),
|
uniformJumpFvPatchField<scalar>(p, iF),
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||||
uniformJump_(dict.lookupOrDefault<bool>("uniformJump", false)),
|
uniformJump_(dict.lookupOrDefault("uniformJump", false)),
|
||||||
nonDimensional_(dict.lookupOrDefault<Switch>("nonDimensional", false)),
|
nonDimensional_(dict.lookupOrDefault("nonDimensional", false)),
|
||||||
rpm_(dict.lookupOrDefault<scalar>("rpm", 0.0)),
|
rpm_(dict.lookupOrDefault<scalar>("rpm", 0.0)),
|
||||||
dm_(dict.lookupOrDefault<scalar>("dm", 0.0))
|
dm_(dict.lookupOrDefault<scalar>("dm", 0.0))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -66,7 +66,7 @@ flowRateOutletVelocityFvPatchVectorField
|
|||||||
{
|
{
|
||||||
volumetric_ = false;
|
volumetric_ = false;
|
||||||
flowRate_ = Function1<scalar>::New("massFlowRate", dict);
|
flowRate_ = Function1<scalar>::New("massFlowRate", dict);
|
||||||
rhoName_ = word(dict.lookupOrDefault<word>("rho", "rho"));
|
rhoName_ = dict.lookupOrDefault<word>("rho", "rho");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -62,7 +62,7 @@ matchedFlowRateOutletVelocityFvPatchVectorField
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rhoName_ = word(dict.lookupOrDefault<word>("rho", "rho"));
|
rhoName_ = dict.lookupOrDefault<word>("rho", "rho");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Value field require if mass based
|
// Value field require if mass based
|
||||||
|
|||||||
@ -153,7 +153,7 @@ Foam::swirlFanVelocityFvPatchField::swirlFanVelocityFvPatchField
|
|||||||
rpm_(dict.lookupOrDefault<scalar>("rpm", 0.0)),
|
rpm_(dict.lookupOrDefault<scalar>("rpm", 0.0)),
|
||||||
rEff_(dict.lookupOrDefault<scalar>("rEff", 0.0)),
|
rEff_(dict.lookupOrDefault<scalar>("rEff", 0.0)),
|
||||||
fanEff_(dict.lookupOrDefault<scalar>("fanEff", 1.0)),
|
fanEff_(dict.lookupOrDefault<scalar>("fanEff", 1.0)),
|
||||||
useRealRadius_(dict.lookupOrDefault<Switch>("useRealRadius", false)),
|
useRealRadius_(dict.lookupOrDefault("useRealRadius", false)),
|
||||||
rInner_(dict.lookupOrDefault<scalar>("rInner", 0.0)),
|
rInner_(dict.lookupOrDefault<scalar>("rInner", 0.0)),
|
||||||
rOuter_(dict.lookupOrDefault<scalar>("rOuter", 0.0))
|
rOuter_(dict.lookupOrDefault<scalar>("rOuter", 0.0))
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -140,13 +140,13 @@ class swirlFanVelocityFvPatchField
|
|||||||
scalar fanEff_;
|
scalar fanEff_;
|
||||||
|
|
||||||
//- Switch to use effective radius or inner and outer radius
|
//- Switch to use effective radius or inner and outer radius
|
||||||
Switch useRealRadius_;
|
bool useRealRadius_;
|
||||||
|
|
||||||
//- Inner radius
|
//- Inner radius
|
||||||
scalar rInner_;
|
scalar rInner_;
|
||||||
|
|
||||||
//- Outer radius
|
//- Outer radius
|
||||||
scalar rOuter_;
|
scalar rOuter_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|||||||
@ -856,7 +856,7 @@ turbulentDFSEMInletFvPatchVectorField
|
|||||||
curTimeIndex_(-1),
|
curTimeIndex_(-1),
|
||||||
patchBounds_(boundBox::invertedBox),
|
patchBounds_(boundBox::invertedBox),
|
||||||
singleProc_(false),
|
singleProc_(false),
|
||||||
writeEddies_(dict.lookupOrDefault<bool>("writeEddies", false))
|
writeEddies_(dict.lookupOrDefault("writeEddies", false))
|
||||||
{
|
{
|
||||||
eddy::debug = debug;
|
eddy::debug = debug;
|
||||||
|
|
||||||
|
|||||||
@ -82,14 +82,8 @@ Foam::isoAdvection::isoAdvection
|
|||||||
nAlphaBounds_(dict_.lookupOrDefault<label>("nAlphaBounds", 3)),
|
nAlphaBounds_(dict_.lookupOrDefault<label>("nAlphaBounds", 3)),
|
||||||
isoFaceTol_(dict_.lookupOrDefault<scalar>("isoFaceTol", 1e-8)),
|
isoFaceTol_(dict_.lookupOrDefault<scalar>("isoFaceTol", 1e-8)),
|
||||||
surfCellTol_(dict_.lookupOrDefault<scalar>("surfCellTol", 1e-8)),
|
surfCellTol_(dict_.lookupOrDefault<scalar>("surfCellTol", 1e-8)),
|
||||||
gradAlphaBasedNormal_
|
gradAlphaBasedNormal_(dict_.lookupOrDefault("gradAlphaNormal", false)),
|
||||||
(
|
writeIsoFacesToFile_(dict_.lookupOrDefault("writeIsoFaces", false)),
|
||||||
dict_.lookupOrDefault<bool>("gradAlphaNormal", false)
|
|
||||||
),
|
|
||||||
writeIsoFacesToFile_
|
|
||||||
(
|
|
||||||
dict_.lookupOrDefault<bool>("writeIsoFaces", false)
|
|
||||||
),
|
|
||||||
|
|
||||||
// Cell cutting data
|
// Cell cutting data
|
||||||
surfCells_(label(0.2*mesh_.nCells())),
|
surfCells_(label(0.2*mesh_.nCells())),
|
||||||
@ -1021,8 +1015,7 @@ void Foam::isoAdvection::applyBruteForceBounding()
|
|||||||
alpha1Changed = true;
|
alpha1Changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool clip = dict_.lookupOrDefault<bool>("clip", true);
|
if (dict_.lookupOrDefault("clip", true))
|
||||||
if (clip)
|
|
||||||
{
|
{
|
||||||
alpha1_ = min(scalar(1.0), max(scalar(0.0), alpha1_));
|
alpha1_ = min(scalar(1.0), max(scalar(0.0), alpha1_));
|
||||||
alpha1Changed = true;
|
alpha1Changed = true;
|
||||||
@ -1037,7 +1030,7 @@ void Foam::isoAdvection::applyBruteForceBounding()
|
|||||||
|
|
||||||
void Foam::isoAdvection::writeSurfaceCells() const
|
void Foam::isoAdvection::writeSurfaceCells() const
|
||||||
{
|
{
|
||||||
if (dict_.lookupOrDefault<bool>("writeSurfCells", false))
|
if (dict_.lookupOrDefault("writeSurfCells", false))
|
||||||
{
|
{
|
||||||
cellSet cSet
|
cellSet cSet
|
||||||
(
|
(
|
||||||
@ -1059,7 +1052,7 @@ void Foam::isoAdvection::writeSurfaceCells() const
|
|||||||
|
|
||||||
void Foam::isoAdvection::writeBoundedCells() const
|
void Foam::isoAdvection::writeBoundedCells() const
|
||||||
{
|
{
|
||||||
if (dict_.lookupOrDefault<bool>("writeBoundedCells", false))
|
if (dict_.lookupOrDefault("writeBoundedCells", false))
|
||||||
{
|
{
|
||||||
cellSet cSet
|
cellSet cSet
|
||||||
(
|
(
|
||||||
|
|||||||
@ -53,7 +53,7 @@ Foam::patchDistMethods::meshWave::meshWave
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
patchDistMethod(mesh, patchIDs),
|
patchDistMethod(mesh, patchIDs),
|
||||||
correctWalls_(dict.lookupOrDefault<Switch>("correctWalls", true)),
|
correctWalls_(dict.lookupOrDefault("correctWalls", true)),
|
||||||
nUnset_(0)
|
nUnset_(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -106,7 +106,7 @@ Foam::wallDist::wallDist
|
|||||||
dimensionedScalar("y" & patchTypeName_, dimLength, SMALL),
|
dimensionedScalar("y" & patchTypeName_, dimLength, SMALL),
|
||||||
patchDistMethod::patchTypes<scalar>(mesh, patchIDs_)
|
patchDistMethod::patchTypes<scalar>(mesh, patchIDs_)
|
||||||
),
|
),
|
||||||
nRequired_(dict_.lookupOrDefault<Switch>("nRequired", false)),
|
nRequired_(dict_.lookupOrDefault("nRequired", false)),
|
||||||
n_(volVectorField::null()),
|
n_(volVectorField::null()),
|
||||||
updateInterval_(dict_.lookupOrDefault<label>("updateInterval", 1)),
|
updateInterval_(dict_.lookupOrDefault<label>("updateInterval", 1)),
|
||||||
requireUpdate_(true)
|
requireUpdate_(true)
|
||||||
@ -160,7 +160,7 @@ Foam::wallDist::wallDist
|
|||||||
dimensionedScalar("y" & patchTypeName_, dimLength, SMALL),
|
dimensionedScalar("y" & patchTypeName_, dimLength, SMALL),
|
||||||
patchDistMethod::patchTypes<scalar>(mesh, patchIDs_)
|
patchDistMethod::patchTypes<scalar>(mesh, patchIDs_)
|
||||||
),
|
),
|
||||||
nRequired_(dict_.lookupOrDefault<Switch>("nRequired", false)),
|
nRequired_(dict_.lookupOrDefault("nRequired", false)),
|
||||||
n_(volVectorField::null()),
|
n_(volVectorField::null()),
|
||||||
updateInterval_(dict_.lookupOrDefault<label>("updateInterval", 1)),
|
updateInterval_(dict_.lookupOrDefault<label>("updateInterval", 1)),
|
||||||
requireUpdate_(true)
|
requireUpdate_(true)
|
||||||
|
|||||||
@ -136,7 +136,7 @@ bool Foam::functionObjects::fieldMinMax::read(const dictionary& dict)
|
|||||||
fvMeshFunctionObject::read(dict);
|
fvMeshFunctionObject::read(dict);
|
||||||
writeFile::read(dict);
|
writeFile::read(dict);
|
||||||
|
|
||||||
location_ = dict.lookupOrDefault<Switch>("location", true);
|
location_ = dict.lookupOrDefault("location", true);
|
||||||
|
|
||||||
mode_ = modeTypeNames_.lookupOrDefault("mode", dict, modeType::mdMag);
|
mode_ = modeTypeNames_.lookupOrDefault("mode", dict, modeType::mdMag);
|
||||||
|
|
||||||
|
|||||||
@ -118,8 +118,8 @@ protected:
|
|||||||
//- Mode type names
|
//- Mode type names
|
||||||
static const Enum<modeType> modeTypeNames_;
|
static const Enum<modeType> modeTypeNames_;
|
||||||
|
|
||||||
//- Switch to write location of min/max values
|
//- Write location of min/max values?
|
||||||
Switch location_;
|
bool location_;
|
||||||
|
|
||||||
//- Mode for min/max - only applicable for ranks > 0
|
//- Mode for min/max - only applicable for ranks > 0
|
||||||
modeType mode_;
|
modeType mode_;
|
||||||
|
|||||||
@ -319,7 +319,7 @@ Foam::functionObjects::regionSizeDistribution::regionSizeDistribution
|
|||||||
writeFile(obr_, name),
|
writeFile(obr_, name),
|
||||||
alphaName_(dict.lookup("field")),
|
alphaName_(dict.lookup("field")),
|
||||||
patchNames_(dict.lookup("patches")),
|
patchNames_(dict.lookup("patches")),
|
||||||
isoPlanes_(dict.lookupOrDefault<bool>("isoPlanes", false))
|
isoPlanes_(dict.lookupOrDefault("isoPlanes", false))
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,7 +89,7 @@ Foam::functionObjects::runTimePostPro::functionObjectBase::functionObjectBase
|
|||||||
fieldVisualisationBase(dict, colours),
|
fieldVisualisationBase(dict, colours),
|
||||||
state_(state),
|
state_(state),
|
||||||
functionObjectName_(""),
|
functionObjectName_(""),
|
||||||
clearObjects_(dict.lookupOrDefault<bool>("clearObjects", false))
|
clearObjects_(dict.lookupOrDefault("clearObjects", false))
|
||||||
{
|
{
|
||||||
dict.lookup("functionObject") >> functionObjectName_;
|
dict.lookup("functionObject") >> functionObjectName_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Foam::functionObjects::runTimePostPro::text::text
|
|||||||
size_(readScalar(dict.lookup("size"))),
|
size_(readScalar(dict.lookup("size"))),
|
||||||
colour_(nullptr),
|
colour_(nullptr),
|
||||||
bold_(readBool(dict.lookup("bold"))),
|
bold_(readBool(dict.lookup("bold"))),
|
||||||
timeStamp_(dict.lookupOrDefault<bool>("timeStamp", false))
|
timeStamp_(dict.lookupOrDefault("timeStamp", false))
|
||||||
{
|
{
|
||||||
if (dict.found("colour"))
|
if (dict.found("colour"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -209,7 +209,7 @@ Foam::functionObjects::scalarTransport::scalarTransport
|
|||||||
resetOnStartUp_(false),
|
resetOnStartUp_(false),
|
||||||
schemesField_("unknown-schemesField"),
|
schemesField_("unknown-schemesField"),
|
||||||
fvOptions_(mesh_),
|
fvOptions_(mesh_),
|
||||||
bounded01_(dict.lookupOrDefault<Switch>("bounded01", true))
|
bounded01_(dict.lookupOrDefault("bounded01", true))
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
|
|
||||||
|
|||||||
@ -82,7 +82,7 @@ Foam::functionObjects::runTimeControls::runTimeCondition::runTimeCondition
|
|||||||
name_(name),
|
name_(name),
|
||||||
obr_(obr),
|
obr_(obr),
|
||||||
state_(state),
|
state_(state),
|
||||||
active_(dict.lookupOrDefault<bool>("active", true)),
|
active_(dict.lookupOrDefault("active", true)),
|
||||||
conditionDict_(setConditionDict()),
|
conditionDict_(setConditionDict()),
|
||||||
log_(dict.lookupOrDefault("log", true)),
|
log_(dict.lookupOrDefault("log", true)),
|
||||||
groupID_(dict.lookupOrDefault("groupID", -1))
|
groupID_(dict.lookupOrDefault("groupID", -1))
|
||||||
|
|||||||
@ -70,7 +70,7 @@ bool Foam::functionObjects::vtkWrite::read(const dictionary& dict)
|
|||||||
// writer options - default is xml base64
|
// writer options - default is xml base64
|
||||||
//
|
//
|
||||||
writeOpts_ = vtk::formatType::INLINE_BASE64;
|
writeOpts_ = vtk::formatType::INLINE_BASE64;
|
||||||
if (dict.lookupOrDefault<bool>("legacy", false))
|
if (dict.lookupOrDefault("legacy", false))
|
||||||
{
|
{
|
||||||
writeOpts_.legacy(true);
|
writeOpts_.legacy(true);
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ bool Foam::functionObjects::vtkWrite::read(const dictionary& dict)
|
|||||||
//
|
//
|
||||||
dict.readIfPresent("directory", dirName_);
|
dict.readIfPresent("directory", dirName_);
|
||||||
|
|
||||||
writeIds_ = dict.lookupOrDefault<bool>("writeIds", false);
|
writeIds_ = dict.lookupOrDefault("writeIds", false);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@ -102,7 +102,7 @@ Foam::fv::interRegionOption::interRegionOption
|
|||||||
dict,
|
dict,
|
||||||
mesh
|
mesh
|
||||||
),
|
),
|
||||||
master_(coeffs_.lookupOrDefault<bool>("master", true)),
|
master_(coeffs_.lookupOrDefault("master", true)),
|
||||||
nbrRegionName_(coeffs_.lookup("nbrRegion")),
|
nbrRegionName_(coeffs_.lookup("nbrRegion")),
|
||||||
meshInterpPtr_()
|
meshInterpPtr_()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -224,7 +224,7 @@ void Foam::targetCoeffTrim::read(const dictionary& dict)
|
|||||||
trimModel::read(dict);
|
trimModel::read(dict);
|
||||||
|
|
||||||
const dictionary& targetDict(coeffs_.subDict("target"));
|
const dictionary& targetDict(coeffs_.subDict("target"));
|
||||||
useCoeffs_ = targetDict.lookupOrDefault<bool>("useCoeffs", true);
|
useCoeffs_ = targetDict.lookupOrDefault("useCoeffs", true);
|
||||||
word ext = "";
|
word ext = "";
|
||||||
if (useCoeffs_)
|
if (useCoeffs_)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -140,7 +140,7 @@ Foam::CloudToVTK<CloudType>::CloudToVTK
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
CloudFunctionObject<CloudType>(dict, owner, modelName, typeName),
|
CloudFunctionObject<CloudType>(dict, owner, modelName, typeName),
|
||||||
binary_(dict.lookupOrDefault<bool>("binary", true))
|
binary_(dict.lookupOrDefault("binary", true))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,15 +39,15 @@ namespace Foam
|
|||||||
Foam::blockMesh::blockMesh(const IOdictionary& dict, const word& regionName)
|
Foam::blockMesh::blockMesh(const IOdictionary& dict, const word& regionName)
|
||||||
:
|
:
|
||||||
meshDict_(dict),
|
meshDict_(dict),
|
||||||
verboseOutput(meshDict_.lookupOrDefault<Switch>("verbose", true)),
|
verboseOutput(meshDict_.lookupOrDefault("verbose", true)),
|
||||||
geometry_
|
geometry_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"geometry", // dummy name
|
"geometry", // dummy name
|
||||||
meshDict_.time().constant(), // instance
|
meshDict_.time().constant(), // instance
|
||||||
"geometry", // local
|
"geometry", // local
|
||||||
meshDict_.time(), // registry
|
meshDict_.time(), // registry
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
@ -65,9 +65,7 @@ Foam::blockMesh::blockMesh(const IOdictionary& dict, const word& regionName)
|
|||||||
vertices_(Foam::vertices(blockVertices_)),
|
vertices_(Foam::vertices(blockVertices_)),
|
||||||
topologyPtr_(createTopology(meshDict_, regionName))
|
topologyPtr_(createTopology(meshDict_, regionName))
|
||||||
{
|
{
|
||||||
Switch fastMerge(meshDict_.lookupOrDefault<Switch>("fastMerge", false));
|
if (meshDict_.lookupOrDefault("fastMerge", false))
|
||||||
|
|
||||||
if (fastMerge)
|
|
||||||
{
|
{
|
||||||
calcMergeInfoFast();
|
calcMergeInfoFast();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,7 +58,7 @@ Foam::refinementParameters::refinementParameters(const dictionary& dict)
|
|||||||
allowFreeStandingZoneFaces_(dict.lookup("allowFreeStandingZoneFaces")),
|
allowFreeStandingZoneFaces_(dict.lookup("allowFreeStandingZoneFaces")),
|
||||||
useTopologicalSnapDetection_
|
useTopologicalSnapDetection_
|
||||||
(
|
(
|
||||||
dict.lookupOrDefault<bool>("useTopologicalSnapDetection", true)
|
dict.lookupOrDefault("useTopologicalSnapDetection", true)
|
||||||
),
|
),
|
||||||
maxLoadUnbalance_(dict.lookupOrDefault<scalar>("maxLoadUnbalance", 0)),
|
maxLoadUnbalance_(dict.lookupOrDefault<scalar>("maxLoadUnbalance", 0)),
|
||||||
handleSnapProblems_
|
handleSnapProblems_
|
||||||
|
|||||||
@ -538,7 +538,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)),
|
AMIReverse_(dict.lookupOrDefault("flipNormals", false)),
|
||||||
AMIRequireMatch_(true),
|
AMIRequireMatch_(true),
|
||||||
AMILowWeightCorrection_(dict.lookupOrDefault("lowWeightCorrection", -1.0)),
|
AMILowWeightCorrection_(dict.lookupOrDefault("lowWeightCorrection", -1.0)),
|
||||||
surfPtr_(nullptr),
|
surfPtr_(nullptr),
|
||||||
|
|||||||
@ -1037,7 +1037,7 @@ Foam::mappedPatchBase::mappedPatchBase
|
|||||||
sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
|
sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
|
||||||
mapPtr_(nullptr),
|
mapPtr_(nullptr),
|
||||||
AMIPtr_(nullptr),
|
AMIPtr_(nullptr),
|
||||||
AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)),
|
AMIReverse_(dict.lookupOrDefault("flipNormals", false)),
|
||||||
surfPtr_(nullptr),
|
surfPtr_(nullptr),
|
||||||
surfDict_(dict.subOrEmptyDict("surface"))
|
surfDict_(dict.subOrEmptyDict("surface"))
|
||||||
{
|
{
|
||||||
@ -1119,7 +1119,7 @@ Foam::mappedPatchBase::mappedPatchBase
|
|||||||
sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
|
sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
|
||||||
mapPtr_(nullptr),
|
mapPtr_(nullptr),
|
||||||
AMIPtr_(nullptr),
|
AMIPtr_(nullptr),
|
||||||
AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)),
|
AMIReverse_(dict.lookupOrDefault("flipNormals", false)),
|
||||||
surfPtr_(nullptr),
|
surfPtr_(nullptr),
|
||||||
surfDict_(dict.subOrEmptyDict("surface"))
|
surfDict_(dict.subOrEmptyDict("surface"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -151,7 +151,7 @@ Foam::regionCoupledBase::regionCoupledBase
|
|||||||
nbrRegionName_(dict.lookup("neighbourRegion")),
|
nbrRegionName_(dict.lookup("neighbourRegion")),
|
||||||
sameRegion_(nbrRegionName_ == patch_.boundaryMesh().mesh().name()),
|
sameRegion_(nbrRegionName_ == patch_.boundaryMesh().mesh().name()),
|
||||||
AMIPtr_(nullptr),
|
AMIPtr_(nullptr),
|
||||||
AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)),
|
AMIReverse_(dict.lookupOrDefault("flipNormals", false)),
|
||||||
surfPtr_(nullptr),
|
surfPtr_(nullptr),
|
||||||
surfDict_(dict.subOrEmptyDict("surface"))
|
surfDict_(dict.subOrEmptyDict("surface"))
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -431,7 +431,7 @@ Foam::surfaceToCell::surfaceToCell
|
|||||||
includeOutside_(readBool(dict.lookup("includeOutside"))),
|
includeOutside_(readBool(dict.lookup("includeOutside"))),
|
||||||
useSurfaceOrientation_
|
useSurfaceOrientation_
|
||||||
(
|
(
|
||||||
dict.lookupOrDefault<bool>("useSurfaceOrientation", false)
|
dict.lookupOrDefault("useSurfaceOrientation", false)
|
||||||
),
|
),
|
||||||
nearDist_(readScalar(dict.lookup("nearDistance"))),
|
nearDist_(readScalar(dict.lookup("nearDistance"))),
|
||||||
curvature_(readScalar(dict.lookup("curvature"))),
|
curvature_(readScalar(dict.lookup("curvature"))),
|
||||||
|
|||||||
@ -55,10 +55,10 @@ void reactingOneDim::readReactingOneDimControls()
|
|||||||
solution.lookup("nNonOrthCorr") >> nNonOrthCorr_;
|
solution.lookup("nNonOrthCorr") >> nNonOrthCorr_;
|
||||||
time().controlDict().lookup("maxDi") >> maxDiff_;
|
time().controlDict().lookup("maxDi") >> maxDiff_;
|
||||||
coeffs().lookup("minimumDelta") >> minimumDelta_;
|
coeffs().lookup("minimumDelta") >> minimumDelta_;
|
||||||
gasHSource_ = coeffs().lookupOrDefault<bool>("gasHSource", false);
|
gasHSource_ = coeffs().lookupOrDefault("gasHSource", false);
|
||||||
coeffs().lookup("qrHSource") >> qrHSource_;
|
coeffs().lookup("qrHSource") >> qrHSource_;
|
||||||
useChemistrySolvers_ =
|
useChemistrySolvers_ =
|
||||||
coeffs().lookupOrDefault<bool>("useChemistrySolvers", true);
|
coeffs().lookupOrDefault("useChemistrySolvers", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -50,9 +50,9 @@ BrunDrippingInjection::BrunDrippingInjection
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
injectionModel(type(), film, dict),
|
injectionModel(type(), film, dict),
|
||||||
ubarStar_(coeffDict_.lookupOrDefault("ubarStar", 1.62208)),
|
ubarStar_(coeffDict_.lookupOrDefault<scalar>("ubarStar", 1.62208)),
|
||||||
dCoeff_(coeffDict_.lookupOrDefault("dCoeff", 3.3)),
|
dCoeff_(coeffDict_.lookupOrDefault<scalar>("dCoeff", 3.3)),
|
||||||
deltaStable_(coeffDict_.lookupOrDefault("deltaStable", scalar(0))),
|
deltaStable_(coeffDict_.lookupOrDefault<scalar>("deltaStable", 0)),
|
||||||
diameter_(film.regionMesh().nCells(), -1.0)
|
diameter_(film.regionMesh().nCells(), -1.0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -201,7 +201,7 @@ thermalBaffleModel::thermalBaffleModel
|
|||||||
thickness_(),
|
thickness_(),
|
||||||
delta_("delta", dimLength, 0.0),
|
delta_("delta", dimLength, 0.0),
|
||||||
oneD_(false),
|
oneD_(false),
|
||||||
constantThickness_(dict.lookupOrDefault<bool>("constantThickness", true))
|
constantThickness_(dict.lookupOrDefault("constantThickness", true))
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
@ -217,7 +217,7 @@ thermalBaffleModel::thermalBaffleModel
|
|||||||
thickness_(),
|
thickness_(),
|
||||||
delta_("delta", dimLength, 0.0),
|
delta_("delta", dimLength, 0.0),
|
||||||
oneD_(false),
|
oneD_(false),
|
||||||
constantThickness_(lookupOrDefault<bool>("constantThickness", true))
|
constantThickness_(lookupOrDefault("constantThickness", true))
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,7 +95,7 @@ Foam::SloanRenumber::SloanRenumber(const dictionary& renumberDict)
|
|||||||
renumberDict.optionalSubDict
|
renumberDict.optionalSubDict
|
||||||
(
|
(
|
||||||
typeName + "Coeffs"
|
typeName + "Coeffs"
|
||||||
).lookupOrDefault<Switch>("reverse", false)
|
).lookupOrDefault("reverse", false)
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class SloanRenumber Declaration
|
Class SloanRenumber Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class SloanRenumber
|
class SloanRenumber
|
||||||
@ -53,7 +53,7 @@ class SloanRenumber
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
const Switch reverse_;
|
const bool reverse_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
@ -76,8 +76,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~SloanRenumber()
|
virtual ~SloanRenumber() = default;
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -53,7 +53,7 @@ Foam::CuthillMcKeeRenumber::CuthillMcKeeRenumber(const dictionary& renumberDict)
|
|||||||
renumberDict.optionalSubDict
|
renumberDict.optionalSubDict
|
||||||
(
|
(
|
||||||
typeName + "Coeffs"
|
typeName + "Coeffs"
|
||||||
).lookupOrDefault<Switch>("reverse", false)
|
).lookupOrDefault("reverse", false)
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ class CuthillMcKeeRenumber
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
const Switch reverse_;
|
const bool reverse_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|||||||
@ -688,7 +688,7 @@ Foam::sampledTriSurfaceMesh::sampledTriSurfaceMesh
|
|||||||
),
|
),
|
||||||
sampleSource_(samplingSourceNames_.lookup("source", dict)),
|
sampleSource_(samplingSourceNames_.lookup("source", dict)),
|
||||||
needsUpdate_(true),
|
needsUpdate_(true),
|
||||||
keepIds_(dict.lookupOrDefault<Switch>("keepIds", false)),
|
keepIds_(dict.lookupOrDefault("keepIds", false)),
|
||||||
originalIds_(),
|
originalIds_(),
|
||||||
zoneIds_(),
|
zoneIds_(),
|
||||||
sampleElements_(0),
|
sampleElements_(0),
|
||||||
|
|||||||
@ -671,7 +671,7 @@ Foam::discreteSurface::discreteSurface
|
|||||||
interpolate_
|
interpolate_
|
||||||
(
|
(
|
||||||
allowInterpolate
|
allowInterpolate
|
||||||
&& dict.lookupOrDefault<Switch>("interpolate", false)
|
&& dict.lookupOrDefault("interpolate", false)
|
||||||
),
|
),
|
||||||
surface_
|
surface_
|
||||||
(
|
(
|
||||||
@ -688,7 +688,7 @@ Foam::discreteSurface::discreteSurface
|
|||||||
),
|
),
|
||||||
sampleSource_(samplingSourceNames_.lookup("source", dict)),
|
sampleSource_(samplingSourceNames_.lookup("source", dict)),
|
||||||
needsUpdate_(true),
|
needsUpdate_(true),
|
||||||
keepIds_(dict.lookupOrDefault<Switch>("keepIds", false)),
|
keepIds_(dict.lookupOrDefault("keepIds", false)),
|
||||||
originalIds_(),
|
originalIds_(),
|
||||||
zoneIds_(),
|
zoneIds_(),
|
||||||
sampleElements_(0),
|
sampleElements_(0),
|
||||||
|
|||||||
@ -79,7 +79,7 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
:
|
:
|
||||||
mixedFvPatchScalarField(p, iF),
|
mixedFvPatchScalarField(p, iF),
|
||||||
TName_(dict.lookupOrDefault<word>("T", "T")),
|
TName_(dict.lookupOrDefault<word>("T", "T")),
|
||||||
solarLoad_(dict.lookupOrDefault<bool>("solarLoad", false))
|
solarLoad_(dict.lookupOrDefault("solarLoad", false))
|
||||||
{
|
{
|
||||||
if (dict.found("refValue"))
|
if (dict.found("refValue"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -69,7 +69,7 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
|||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||||
qro_("qro", dict, p.size()),
|
qro_("qro", dict, p.size()),
|
||||||
solarLoad_(dict.lookupOrDefault<bool>("solarLoad", false))
|
solarLoad_(dict.lookupOrDefault("solarLoad", false))
|
||||||
{
|
{
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user