dictionary scalar lookup: simplified syntax using the type templated lookup function
Replaced
readScalar(dict.lookup("name"))
with
dict.lookup<scalar>("name")
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,7 +49,7 @@ Foam::XiGModels::basicSubGrid::basicSubGrid
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||||
k1(readScalar(XiGModelCoeffs_.lookup("k1"))),
|
k1(XiGModelCoeffs_.lookup<scalar>("k1")),
|
||||||
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,9 +49,9 @@ Foam::XiEqModels::Gulder::Gulder
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||||
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
XiEqCoef_(XiEqModelCoeffs_.lookup<scalar>("XiEqCoef")),
|
||||||
SuMin_(0.01*Su.average()),
|
SuMin_(0.01*Su.average()),
|
||||||
uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef"))),
|
uPrimeCoef_(XiEqModelCoeffs_.lookup<scalar>("uPrimeCoef")),
|
||||||
subGridSchelkin_
|
subGridSchelkin_
|
||||||
(
|
(
|
||||||
readBool(XiEqModelCoeffs_.lookup("subGridSchelkin"))
|
readBool(XiEqModelCoeffs_.lookup("subGridSchelkin"))
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,11 +49,11 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||||
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
|
XiEqCoef_(XiEqModelCoeffs_.lookup<scalar>("XiEqCoef")),
|
||||||
XiEqExp_(readScalar(XiEqModelCoeffs_.lookup("XiEqExp"))),
|
XiEqExp_(XiEqModelCoeffs_.lookup<scalar>("XiEqExp")),
|
||||||
lCoef_(readScalar(XiEqModelCoeffs_.lookup("lCoef"))),
|
lCoef_(XiEqModelCoeffs_.lookup<scalar>("lCoef")),
|
||||||
SuMin_(0.01*Su.average()),
|
SuMin_(0.01*Su.average()),
|
||||||
uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef"))),
|
uPrimeCoef_(XiEqModelCoeffs_.lookup<scalar>("uPrimeCoef")),
|
||||||
subGridSchelkin_
|
subGridSchelkin_
|
||||||
(
|
(
|
||||||
readBool(XiEqModelCoeffs_.lookup("subGridSchelkin"))
|
readBool(XiEqModelCoeffs_.lookup("subGridSchelkin"))
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,7 +49,7 @@ Foam::XiEqModels::instability::instability
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
||||||
XiEqIn(readScalar(XiEqModelCoeffs_.lookup("XiEqIn"))),
|
XiEqIn(XiEqModelCoeffs_.lookup<scalar>("XiEqIn")),
|
||||||
XiEqModel_(XiEqModel::New(XiEqModelCoeffs_, thermo, turbulence, Su))
|
XiEqModel_(XiEqModel::New(XiEqModelCoeffs_, thermo, turbulence, Su))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,7 +49,7 @@ Foam::XiGModels::KTS::KTS
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
XiGModel(XiGProperties, thermo, turbulence, Su),
|
||||||
GEtaCoef_(readScalar(XiGModelCoeffs_.lookup("GEtaCoef")))
|
GEtaCoef_(XiGModelCoeffs_.lookup<scalar>("GEtaCoef"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -52,7 +52,7 @@ Foam::XiModels::algebraic::algebraic
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
||||||
XiShapeCoef(readScalar(XiModelCoeffs_.lookup("XiShapeCoef"))),
|
XiShapeCoef(XiModelCoeffs_.lookup<scalar>("XiShapeCoef")),
|
||||||
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
||||||
XiGModel_(XiGModel::New(XiProperties, thermo, turbulence, Su))
|
XiGModel_(XiGModel::New(XiProperties, thermo, turbulence, Su))
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -57,7 +57,7 @@ Foam::XiModels::transport::transport
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
||||||
XiShapeCoef(readScalar(XiModelCoeffs_.lookup("XiShapeCoef"))),
|
XiShapeCoef(XiModelCoeffs_.lookup<scalar>("XiShapeCoef")),
|
||||||
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
||||||
XiGModel_(XiGModel::New(XiProperties, thermo, turbulence, Su))
|
XiGModel_(XiGModel::New(XiProperties, thermo, turbulence, Su))
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -53,8 +53,8 @@ Foam::laminarFlameSpeedModels::SCOPE::polynomial::polynomial
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
FixedList<scalar, 7>(polyDict.lookup("coefficients")),
|
FixedList<scalar, 7>(polyDict.lookup("coefficients")),
|
||||||
ll(readScalar(polyDict.lookup("lowerLimit"))),
|
ll(polyDict.lookup<scalar>("lowerLimit")),
|
||||||
ul(readScalar(polyDict.lookup("upperLimit"))),
|
ul(polyDict.lookup<scalar>("upperLimit")),
|
||||||
llv(polyPhi(ll, *this)),
|
llv(polyPhi(ll, *this)),
|
||||||
ulv(polyPhi(ul, *this)),
|
ulv(polyPhi(ul, *this)),
|
||||||
lu(0)
|
lu(0)
|
||||||
@ -82,12 +82,12 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE
|
|||||||
)()
|
)()
|
||||||
).optionalSubDict(typeName + "Coeffs")
|
).optionalSubDict(typeName + "Coeffs")
|
||||||
),
|
),
|
||||||
LFL_(readScalar(coeffsDict_.lookup("lowerFlamabilityLimit"))),
|
LFL_(coeffsDict_.lookup<scalar>("lowerFlamabilityLimit")),
|
||||||
UFL_(readScalar(coeffsDict_.lookup("upperFlamabilityLimit"))),
|
UFL_(coeffsDict_.lookup<scalar>("upperFlamabilityLimit")),
|
||||||
SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")),
|
SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")),
|
||||||
SuPolyU_(coeffsDict_.subDict("upperSuPolynomial")),
|
SuPolyU_(coeffsDict_.subDict("upperSuPolynomial")),
|
||||||
Texp_(readScalar(coeffsDict_.lookup("Texp"))),
|
Texp_(coeffsDict_.lookup<scalar>("Texp")),
|
||||||
pexp_(readScalar(coeffsDict_.lookup("pexp"))),
|
pexp_(coeffsDict_.lookup<scalar>("pexp")),
|
||||||
MaPolyL_(coeffsDict_.subDict("lowerMaPolynomial")),
|
MaPolyL_(coeffsDict_.subDict("lowerMaPolynomial")),
|
||||||
MaPolyU_(coeffsDict_.subDict("upperMaPolynomial"))
|
MaPolyU_(coeffsDict_.subDict("upperMaPolynomial"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
Switch adjustTimeStep(runTime.controlDict().lookup("adjustTimeStep"));
|
Switch adjustTimeStep(runTime.controlDict().lookup("adjustTimeStep"));
|
||||||
scalar maxDeltaT(readScalar(runTime.controlDict().lookup("maxDeltaT")));
|
scalar maxDeltaT(runTime.controlDict().lookup<scalar>("maxDeltaT"));
|
||||||
|
|||||||
@ -18,8 +18,8 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar p0 = readScalar(initialConditions.lookup("p"));
|
scalar p0 = initialConditions.lookup<scalar>("p");
|
||||||
scalar T0 = readScalar(initialConditions.lookup("T"));
|
scalar T0 = initialConditions.lookup<scalar>("T");
|
||||||
|
|
||||||
#include "createBaseFields.H"
|
#include "createBaseFields.H"
|
||||||
|
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
runTime.controlDict().lookup("adjustTimeStep") >> adjustTimeStep;
|
runTime.controlDict().lookup("adjustTimeStep") >> adjustTimeStep;
|
||||||
maxDeltaT = readScalar(runTime.controlDict().lookup("maxDeltaT"));
|
maxDeltaT = runTime.controlDict().lookup<scalar>("maxDeltaT");
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
const word& name = Y[i].name();
|
const word& name = Y[i].name();
|
||||||
if (fractions.found(name))
|
if (fractions.found(name))
|
||||||
{
|
{
|
||||||
X0[i] = readScalar(fractions.lookup(name));
|
X0[i] = fractions.lookup<scalar>(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +59,7 @@
|
|||||||
const word& name = Y[i].name();
|
const word& name = Y[i].name();
|
||||||
if (fractions.found(name))
|
if (fractions.found(name))
|
||||||
{
|
{
|
||||||
Y0[i] = readScalar(fractions.lookup(name));
|
Y0[i] = fractions.lookup<scalar>(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ License
|
|||||||
const dictionary& pimpleDict = pimple.dict();
|
const dictionary& pimpleDict = pimple.dict();
|
||||||
|
|
||||||
// Maximum flow Courant number
|
// Maximum flow Courant number
|
||||||
scalar maxCo(readScalar(pimpleDict.lookup("maxCo")));
|
scalar maxCo(pimpleDict.lookup<scalar>("maxCo"));
|
||||||
|
|
||||||
// Maximum time scale
|
// Maximum time scale
|
||||||
scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", great));
|
scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", great));
|
||||||
@ -118,7 +118,7 @@ License
|
|||||||
if (Yref.found(Yi.name()))
|
if (Yref.found(Yi.name()))
|
||||||
{
|
{
|
||||||
foundY = true;
|
foundY = true;
|
||||||
scalar Yrefi = readScalar(Yref.lookup(Yi.name()));
|
scalar Yrefi = Yref.lookup<scalar>(Yi.name());
|
||||||
|
|
||||||
rDeltaTY.field() = max
|
rDeltaTY.field() = max
|
||||||
(
|
(
|
||||||
|
|||||||
@ -84,7 +84,7 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
|||||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||||
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
||||||
muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")),
|
muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")),
|
||||||
accommodationCoeff_(readScalar(dict.lookup("accommodationCoeff"))),
|
accommodationCoeff_(dict.lookup<scalar>("accommodationCoeff")),
|
||||||
Twall_("Twall", dict, p.size()),
|
Twall_("Twall", dict, p.size()),
|
||||||
gamma_(dict.lookupOrDefault<scalar>("gamma", 1.4))
|
gamma_(dict.lookupOrDefault<scalar>("gamma", 1.4))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -85,7 +85,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
|||||||
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
||||||
muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")),
|
muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")),
|
||||||
tauMCName_(dict.lookupOrDefault<word>("tauMC", "tauMC")),
|
tauMCName_(dict.lookupOrDefault<word>("tauMC", "tauMC")),
|
||||||
accommodationCoeff_(readScalar(dict.lookup("accommodationCoeff"))),
|
accommodationCoeff_(dict.lookup<scalar>("accommodationCoeff")),
|
||||||
Uwall_("Uwall", dict, p.size()),
|
Uwall_("Uwall", dict, p.size()),
|
||||||
thermalCreep_(dict.lookupOrDefault("thermalCreep", true)),
|
thermalCreep_(dict.lookupOrDefault("thermalCreep", true)),
|
||||||
curvature_(dict.lookupOrDefault("curvature", true))
|
curvature_(dict.lookupOrDefault("curvature", true))
|
||||||
|
|||||||
@ -12,7 +12,5 @@ IOdictionary mdEquilibrationDict
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar targetTemperature = readScalar
|
scalar targetTemperature =
|
||||||
(
|
mdEquilibrationDict.lookup<scalar>("targetTemperature");
|
||||||
mdEquilibrationDict.lookup("targetTemperature")
|
|
||||||
);
|
|
||||||
|
|||||||
@ -139,11 +139,8 @@ basicKinematicTypeCloud kinematicCloud
|
|||||||
scalar alphacMin
|
scalar alphacMin
|
||||||
(
|
(
|
||||||
1.0
|
1.0
|
||||||
- readScalar
|
- kinematicCloud.particleProperties().subDict("constantProperties")
|
||||||
(
|
.lookup<scalar>("alphaMax")
|
||||||
kinematicCloud.particleProperties().subDict("constantProperties")
|
|
||||||
.lookup("alphaMax")
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Update alphac from the particle locations
|
// Update alphac from the particle locations
|
||||||
|
|||||||
@ -29,7 +29,7 @@ License
|
|||||||
const dictionary& pimpleDict = pimple.dict();
|
const dictionary& pimpleDict = pimple.dict();
|
||||||
|
|
||||||
// Maximum flow Courant number
|
// Maximum flow Courant number
|
||||||
scalar maxCo(readScalar(pimpleDict.lookup("maxCo")));
|
scalar maxCo(pimpleDict.lookup<scalar>("maxCo"));
|
||||||
|
|
||||||
// Maximum time scale
|
// Maximum time scale
|
||||||
scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", great));
|
scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", great));
|
||||||
|
|||||||
@ -29,7 +29,7 @@ License
|
|||||||
const dictionary& pimpleDict = pimple.dict();
|
const dictionary& pimpleDict = pimple.dict();
|
||||||
|
|
||||||
// Maximum flow Courant number
|
// Maximum flow Courant number
|
||||||
scalar maxCo(readScalar(pimpleDict.lookup("maxCo")));
|
scalar maxCo(pimpleDict.lookup<scalar>("maxCo"));
|
||||||
|
|
||||||
// Maximum time scale
|
// Maximum time scale
|
||||||
scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", great));
|
scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", great));
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,7 +31,7 @@ Description
|
|||||||
|
|
||||||
scalar maxAlphaCo
|
scalar maxAlphaCo
|
||||||
(
|
(
|
||||||
readScalar(runTime.controlDict().lookup("maxAlphaCo"))
|
runTime.controlDict().lookup<scalar>("maxAlphaCo")
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar alphaCoNum = 0.0;
|
scalar alphaCoNum = 0.0;
|
||||||
|
|||||||
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
scalar maxAcousticCo
|
scalar maxAcousticCo
|
||||||
(
|
(
|
||||||
readScalar(runTime.controlDict().lookup("maxAcousticCo"))
|
runTime.controlDict().lookup<scalar>("maxAcousticCo")
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
#include "readDyMControls.H"
|
#include "readDyMControls.H"
|
||||||
|
|
||||||
maxAcousticCo = readScalar(runTime.controlDict().lookup("maxAcousticCo"));
|
maxAcousticCo = runTime.controlDict().lookup<scalar>("maxAcousticCo");
|
||||||
|
|||||||
@ -892,7 +892,7 @@ void Foam::multiphaseMixtureThermo::solve()
|
|||||||
|
|
||||||
const dictionary& alphaControls = mesh_.solverDict("alpha");
|
const dictionary& alphaControls = mesh_.solverDict("alpha");
|
||||||
label nAlphaSubCycles(alphaControls.lookup<label>("nAlphaSubCycles"));
|
label nAlphaSubCycles(alphaControls.lookup<label>("nAlphaSubCycles"));
|
||||||
scalar cAlpha(readScalar(alphaControls.lookup("cAlpha")));
|
scalar cAlpha(alphaControls.lookup<scalar>("cAlpha"));
|
||||||
|
|
||||||
volScalarField& alpha = phases_.first();
|
volScalarField& alpha = phases_.first();
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -160,13 +160,10 @@ Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties
|
|||||||
mixture_(mixture),
|
mixture_(mixture),
|
||||||
cAlpha_
|
cAlpha_
|
||||||
(
|
(
|
||||||
readScalar
|
mixture.U().mesh().solverDict
|
||||||
(
|
(
|
||||||
mixture.U().mesh().solverDict
|
mixture_.alpha1().name()
|
||||||
(
|
).lookup<scalar>("cAlpha")
|
||||||
mixture_.alpha1().name()
|
|
||||||
).lookup("cAlpha")
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
sigma12_("sigma12", dimensionSet(1, 0, -2, 0, 0), mixture),
|
sigma12_("sigma12", dimensionSet(1, 0, -2, 0, 0), mixture),
|
||||||
sigma13_("sigma13", dimensionSet(1, 0, -2, 0, 0), mixture),
|
sigma13_("sigma13", dimensionSet(1, 0, -2, 0, 0), mixture),
|
||||||
|
|||||||
@ -309,7 +309,7 @@ void Foam::multiphaseMixture::solve()
|
|||||||
|
|
||||||
const dictionary& alphaControls = mesh_.solverDict("alpha");
|
const dictionary& alphaControls = mesh_.solverDict("alpha");
|
||||||
label nAlphaSubCycles(alphaControls.lookup<label>("nAlphaSubCycles"));
|
label nAlphaSubCycles(alphaControls.lookup<label>("nAlphaSubCycles"));
|
||||||
scalar cAlpha(readScalar(alphaControls.lookup("cAlpha")));
|
scalar cAlpha(alphaControls.lookup<scalar>("cAlpha"));
|
||||||
|
|
||||||
if (nAlphaSubCycles > 1)
|
if (nAlphaSubCycles > 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -61,7 +61,7 @@ KocamustafaogullariIshiiDepartureDiameter
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
departureDiameterModel(),
|
departureDiameterModel(),
|
||||||
phi_(readScalar(dict.lookup("phi")))
|
phi_(dict.lookup<scalar>("phi"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ Foam::wallBoilingModels::partitioningModels::
|
|||||||
Lavieville::Lavieville(const dictionary& dict)
|
Lavieville::Lavieville(const dictionary& dict)
|
||||||
:
|
:
|
||||||
partitioningModel(),
|
partitioningModel(),
|
||||||
alphaCrit_(readScalar(dict.lookup("alphaCrit")))
|
alphaCrit_(dict.lookup<scalar>("alphaCrit"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -52,8 +52,8 @@ Foam::wallBoilingModels::partitioningModels::
|
|||||||
cosine::cosine(const dictionary& dict)
|
cosine::cosine(const dictionary& dict)
|
||||||
:
|
:
|
||||||
partitioningModel(),
|
partitioningModel(),
|
||||||
alphaLiquid1_(readScalar(dict.lookup("alphaLiquid1"))),
|
alphaLiquid1_(dict.lookup<scalar>("alphaLiquid1")),
|
||||||
alphaLiquid0_(readScalar(dict.lookup("alphaLiquid0")))
|
alphaLiquid0_(dict.lookup<scalar>("alphaLiquid0"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -52,8 +52,8 @@ Foam::wallBoilingModels::partitioningModels::
|
|||||||
linear::linear(const dictionary& dict)
|
linear::linear(const dictionary& dict)
|
||||||
:
|
:
|
||||||
partitioningModel(),
|
partitioningModel(),
|
||||||
alphaLiquid1_(readScalar(dict.lookup("alphaLiquid1"))),
|
alphaLiquid1_(dict.lookup<scalar>("alphaLiquid1")),
|
||||||
alphaLiquid0_(readScalar(dict.lookup("alphaLiquid0")))
|
alphaLiquid0_(dict.lookup<scalar>("alphaLiquid0"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ Foam::phaseTransferModels::deposition::deposition
|
|||||||
phaseTransferModel(dict, pair),
|
phaseTransferModel(dict, pair),
|
||||||
dropletName_(dict.lookup("droplet")),
|
dropletName_(dict.lookup("droplet")),
|
||||||
surfaceName_(dict.lookup("surface")),
|
surfaceName_(dict.lookup("surface")),
|
||||||
efficiency_(readScalar(dict.lookup("efficiency")))
|
efficiency_(dict.lookup<scalar>("efficiency"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -55,7 +55,7 @@ Foam::wallLubricationModels::Frank::Frank
|
|||||||
wallLubricationModel(dict, pair),
|
wallLubricationModel(dict, pair),
|
||||||
Cwd_("Cwd", dimless, dict),
|
Cwd_("Cwd", dimless, dict),
|
||||||
Cwc_("Cwc", dimless, dict),
|
Cwc_("Cwc", dimless, dict),
|
||||||
p_(readScalar(dict.lookup("p")))
|
p_(dict.lookup<scalar>("p"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -136,7 +136,7 @@ Foam::diameterModels::shapeModels::fractal::fractal
|
|||||||
kappa_.boundaryFieldRef()[patchi]
|
kappa_.boundaryFieldRef()[patchi]
|
||||||
);
|
);
|
||||||
|
|
||||||
kappa.refValue() = readScalar(sizeGroup_.dict().lookup("kappa"));
|
kappa.refValue() = sizeGroup_.dict().lookup<scalar>("kappa");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -56,10 +56,10 @@ KochFriedlander
|
|||||||
:
|
:
|
||||||
sinteringModel(dict, fractalShape),
|
sinteringModel(dict, fractalShape),
|
||||||
dict_(dict.subDict(type() + "Coeffs")),
|
dict_(dict.subDict(type() + "Coeffs")),
|
||||||
Cs_(readScalar(dict_.lookup("Cs"))),
|
Cs_(dict_.lookup<scalar>("Cs")),
|
||||||
n_(readScalar(dict_.lookup("n"))),
|
n_(dict_.lookup<scalar>("n")),
|
||||||
m_(readScalar(dict_.lookup("m"))),
|
m_(dict_.lookup<scalar>("m")),
|
||||||
Ta_(readScalar(dict_.lookup("Ta")))
|
Ta_(dict_.lookup<scalar>("Ta"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,7 @@ Foam::diameterModels::sizeGroup::sizeGroup
|
|||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar(name, dimless, readScalar(dict.lookup("value"))),
|
dimensionedScalar(name, dimless, dict.lookup<scalar>("value")),
|
||||||
velocityGroup.f().boundaryField().types()
|
velocityGroup.f().boundaryField().types()
|
||||||
),
|
),
|
||||||
dict_(dict),
|
dict_(dict),
|
||||||
@ -72,7 +72,7 @@ Foam::diameterModels::sizeGroup::sizeGroup
|
|||||||
velocityGroup_(velocityGroup),
|
velocityGroup_(velocityGroup),
|
||||||
dSph_("dSph", dimLength, dict),
|
dSph_("dSph", dimLength, dict),
|
||||||
x_("x", pi/6.0*pow3(dSph_)),
|
x_("x", pi/6.0*pow3(dSph_)),
|
||||||
value_(readScalar(dict.lookup("value")))
|
value_(dict.lookup<scalar>("value"))
|
||||||
{
|
{
|
||||||
// Adjust refValue at mixedFvPatchField boundaries
|
// Adjust refValue at mixedFvPatchField boundaries
|
||||||
forAll(this->boundaryField(), patchi)
|
forAll(this->boundaryField(), patchi)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -56,7 +56,7 @@ powerLawUniformBinary
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
binaryBreakupModel(popBal, dict),
|
binaryBreakupModel(popBal, dict),
|
||||||
power_(readScalar(dict.lookup("power")))
|
power_(dict.lookup<scalar>("power"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -50,8 +50,8 @@ Foam::diameterModels::breakupModels::exponential::exponential
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
breakupModel(popBal, dict),
|
breakupModel(popBal, dict),
|
||||||
exponent_(readScalar(dict.lookup("exponent"))),
|
exponent_(dict.lookup<scalar>("exponent")),
|
||||||
C_(readScalar(dict.lookup("C")))
|
C_(dict.lookup<scalar>("C"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -50,7 +50,7 @@ Foam::diameterModels::breakupModels::powerLaw::powerLaw
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
breakupModel(popBal, dict),
|
breakupModel(popBal, dict),
|
||||||
power_(readScalar(dict.lookup("power")))
|
power_(dict.lookup<scalar>("power"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1265,7 +1265,7 @@ void Foam::diameterModels::populationBalanceModel::solve()
|
|||||||
{
|
{
|
||||||
const label nCorr = this->nCorr();
|
const label nCorr = this->nCorr();
|
||||||
const scalar tolerance =
|
const scalar tolerance =
|
||||||
readScalar(solutionControls.lookup("tolerance"));
|
solutionControls.lookup<scalar>("tolerance");
|
||||||
|
|
||||||
if (nCorr > 0)
|
if (nCorr > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -55,9 +55,9 @@ Foam::RASModels::phasePressureModel::phasePressureModel
|
|||||||
propertiesName
|
propertiesName
|
||||||
),
|
),
|
||||||
|
|
||||||
alphaMax_(readScalar(coeffDict_.lookup("alphaMax"))),
|
alphaMax_(coeffDict_.lookup<scalar>("alphaMax")),
|
||||||
preAlphaExp_(readScalar(coeffDict_.lookup("preAlphaExp"))),
|
preAlphaExp_(coeffDict_.lookup<scalar>("preAlphaExp")),
|
||||||
expMax_(readScalar(coeffDict_.lookup("expMax"))),
|
expMax_(coeffDict_.lookup<scalar>("expMax")),
|
||||||
g0_
|
g0_
|
||||||
(
|
(
|
||||||
"g0",
|
"g0",
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,7 +31,7 @@ Description
|
|||||||
|
|
||||||
scalar maxAlphaCo
|
scalar maxAlphaCo
|
||||||
(
|
(
|
||||||
readScalar(runTime.controlDict().lookup("maxAlphaCo"))
|
runTime.controlDict().lookup<scalar>("maxAlphaCo")
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar alphaCoNum = 0.0;
|
scalar alphaCoNum = 0.0;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -55,7 +55,7 @@ Foam::wallLubricationModels::Frank::Frank
|
|||||||
wallLubricationModel(dict, pair),
|
wallLubricationModel(dict, pair),
|
||||||
Cwd_("Cwd", dimless, dict),
|
Cwd_("Cwd", dimless, dict),
|
||||||
Cwc_("Cwc", dimless, dict),
|
Cwc_("Cwc", dimless, dict),
|
||||||
p_(readScalar(dict.lookup("p")))
|
p_(dict.lookup<scalar>("p"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -58,9 +58,9 @@ Foam::RASModels::phasePressureModel::phasePressureModel
|
|||||||
propertiesName
|
propertiesName
|
||||||
),
|
),
|
||||||
|
|
||||||
alphaMax_(readScalar(coeffDict_.lookup("alphaMax"))),
|
alphaMax_(coeffDict_.lookup<scalar>("alphaMax")),
|
||||||
preAlphaExp_(readScalar(coeffDict_.lookup("preAlphaExp"))),
|
preAlphaExp_(coeffDict_.lookup<scalar>("preAlphaExp")),
|
||||||
expMax_(readScalar(coeffDict_.lookup("expMax"))),
|
expMax_(coeffDict_.lookup<scalar>("expMax")),
|
||||||
g0_
|
g0_
|
||||||
(
|
(
|
||||||
"g0",
|
"g0",
|
||||||
|
|||||||
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
int nCorr = stressControl.lookupOrDefault<int>("nCorrectors", 1);
|
int nCorr = stressControl.lookupOrDefault<int>("nCorrectors", 1);
|
||||||
|
|
||||||
scalar convergenceTolerance(readScalar(stressControl.lookup("D")));
|
scalar convergenceTolerance(stressControl.lookup<scalar>("D"));
|
||||||
|
|||||||
@ -52,8 +52,8 @@ hydrostaticDisplacementFvPatchVectorField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
tractionDisplacementFvPatchVectorField(p, iF),
|
tractionDisplacementFvPatchVectorField(p, iF),
|
||||||
rhoLiquid_(readScalar(dict.lookup("rhoLiquid"))),
|
rhoLiquid_(dict.lookup<scalar>("rhoLiquid")),
|
||||||
liquidSurfacePressure_(readScalar(dict.lookup("liquidSurfacePressure"))),
|
liquidSurfacePressure_(dict.lookup<scalar>("liquidSurfacePressure")),
|
||||||
liquidSurfacePoint_(dict.lookup("liquidSurfacePoint"))
|
liquidSurfacePoint_(dict.lookup("liquidSurfacePoint"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
nCorr = stressControl.lookupOrDefault<int>("nCorrectors", 1);
|
nCorr = stressControl.lookupOrDefault<int>("nCorrectors", 1);
|
||||||
convergenceTolerance = readScalar(stressControl.lookup("D"));
|
convergenceTolerance = stressControl.lookup<scalar>("D");
|
||||||
stressControl.lookup("compactNormalStress") >> compactNormalStress;
|
stressControl.lookup("compactNormalStress") >> compactNormalStress;
|
||||||
|
|||||||
@ -45,7 +45,7 @@ void Foam::solidDisplacementThermo::readProperty(volScalarField& prop) const
|
|||||||
(
|
(
|
||||||
prop.name(),
|
prop.name(),
|
||||||
prop.dimensions(),
|
prop.dimensions(),
|
||||||
readScalar(propDict.lookup("value"))
|
propDict.lookup<scalar>("value")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (propType == "field")
|
else if (propType == "field")
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
scalar accFac(readScalar(stressControl.lookup("accelerationFactor")));
|
scalar accFac(stressControl.lookup<scalar>("accelerationFactor"));
|
||||||
|
|||||||
@ -52,8 +52,8 @@ int main(int argc, char *argv[])
|
|||||||
Function1<scalar>::New("function", dict);
|
Function1<scalar>::New("function", dict);
|
||||||
const Function1<scalar>& function = functionPtr();
|
const Function1<scalar>& function = functionPtr();
|
||||||
|
|
||||||
const scalar x0 = readScalar(dict.lookup("x0"));
|
const scalar x0 = dict.lookup<scalar>("x0");
|
||||||
const scalar x1 = readScalar(dict.lookup("x1"));
|
const scalar x1 = dict.lookup<scalar>("x1");
|
||||||
const label nX = dict.lookup<label>("nX");
|
const label nX = dict.lookup<label>("nX");
|
||||||
const scalar dx = (x1 - x0)/(nX - 1);
|
const scalar dx = (x1 - x0)/(nX - 1);
|
||||||
const scalarField xs
|
const scalarField xs
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,7 +30,6 @@ Description
|
|||||||
#include "HashTable.H"
|
#include "HashTable.H"
|
||||||
#include "HashPtrTable.H"
|
#include "HashPtrTable.H"
|
||||||
#include "Map.H"
|
#include "Map.H"
|
||||||
#include "StaticHashTable.H"
|
|
||||||
#include "cpuTime.H"
|
#include "cpuTime.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
@ -49,7 +48,6 @@ int main(int argc, char *argv[])
|
|||||||
// ie, a
|
// ie, a
|
||||||
// Map<label> map(2 * nSize);
|
// Map<label> map(2 * nSize);
|
||||||
// HashTable<label, label, Hash<label>> map(2 * nSize);
|
// HashTable<label, label, Hash<label>> map(2 * nSize);
|
||||||
// StaticHashTable<label, label, Hash<label>> map(2 * nSize);
|
|
||||||
HashTable<label, label, Hash<label>> map(2 * nSize);
|
HashTable<label, label, Hash<label>> map(2 * nSize);
|
||||||
|
|
||||||
Info<< "Constructed map of size: " << nSize
|
Info<< "Constructed map of size: " << nSize
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -53,6 +53,7 @@ public:
|
|||||||
(
|
(
|
||||||
const scalar x,
|
const scalar x,
|
||||||
const scalarField& y,
|
const scalarField& y,
|
||||||
|
const label li,
|
||||||
scalarField& dydx
|
scalarField& dydx
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
@ -66,6 +67,7 @@ public:
|
|||||||
(
|
(
|
||||||
const scalar x,
|
const scalar x,
|
||||||
const scalarField& y,
|
const scalarField& y,
|
||||||
|
const label li,
|
||||||
scalarField& dfdx,
|
scalarField& dfdx,
|
||||||
scalarSquareMatrix& dfdy
|
scalarSquareMatrix& dfdy
|
||||||
) const
|
) const
|
||||||
@ -125,7 +127,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Print the evolution of the solution and the time-step
|
// Print the evolution of the solution and the time-step
|
||||||
scalarField dyStart(ode.nEqns());
|
scalarField dyStart(ode.nEqns());
|
||||||
ode.derivatives(xStart, yStart, dyStart);
|
ode.derivatives(xStart, yStart, 0, dyStart);
|
||||||
|
|
||||||
Info<< setw(10) << "relTol" << setw(12) << "dxEst";
|
Info<< setw(10) << "relTol" << setw(12) << "dxEst";
|
||||||
Info<< setw(13) << "dxDid" << setw(14) << "dxNext" << endl;
|
Info<< setw(13) << "dxDid" << setw(14) << "dxNext" << endl;
|
||||||
@ -142,7 +144,7 @@ int main(int argc, char *argv[])
|
|||||||
scalar dxNext = dxEst;
|
scalar dxNext = dxEst;
|
||||||
|
|
||||||
odeSolver->relTol() = relTol;
|
odeSolver->relTol() = relTol;
|
||||||
odeSolver->solve(x, y, dxNext);
|
odeSolver->solve(x, y, 0, dxNext);
|
||||||
|
|
||||||
Info<< scientific << setw(13) << relTol;
|
Info<< scientific << setw(13) << relTol;
|
||||||
Info<< fixed << setw(11) << dxEst;
|
Info<< fixed << setw(11) << dxEst;
|
||||||
@ -165,7 +167,7 @@ int main(int argc, char *argv[])
|
|||||||
scalar dxEst = 0.5;
|
scalar dxEst = 0.5;
|
||||||
|
|
||||||
odeSolver->relTol() = 1e-4;
|
odeSolver->relTol() = 1e-4;
|
||||||
odeSolver->solve(x, xEnd, y, dxEst);
|
odeSolver->solve(x, xEnd, y, 0, dxEst);
|
||||||
|
|
||||||
Info<< nl << "Analytical: y(2.0) = " << yEnd << endl;
|
Info<< nl << "Analytical: y(2.0) = " << yEnd << endl;
|
||||||
Info << "Numerical: y(2.0) = " << y << ", dxEst = " << dxEst << endl;
|
Info << "Numerical: y(2.0) = " << y << ", dxEst = " << dxEst << endl;
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
Test-PackedList2.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/Test-PackedList2
|
|
||||||
@ -1,379 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Application
|
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "argList.H"
|
|
||||||
#include "boolList.H"
|
|
||||||
#include "PackedBoolList.H"
|
|
||||||
#include "HashSet.H"
|
|
||||||
#include "StaticHashTable.H"
|
|
||||||
#include "cpuTime.H"
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
using namespace Foam;
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// Main program:
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
const label n = 1000000;
|
|
||||||
const label nIters = 1000;
|
|
||||||
|
|
||||||
unsigned int sum = 0;
|
|
||||||
|
|
||||||
PackedBoolList packed(n, 1);
|
|
||||||
boolList unpacked(n, true);
|
|
||||||
std::vector<bool> stlVector(n, true);
|
|
||||||
|
|
||||||
labelHashSet emptyHash;
|
|
||||||
labelHashSet fullHash(1000);
|
|
||||||
for (label i = 0; i < n; i++)
|
|
||||||
{
|
|
||||||
fullHash.insert(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
// fullStaticHash is really slow
|
|
||||||
// give it lots of slots to help
|
|
||||||
StaticHashTable<nil, label, Hash<label>> emptyStaticHash;
|
|
||||||
StaticHashTable<nil, label, Hash<label>> fullStaticHash(100000);
|
|
||||||
for (label i = 0; i < n; i++)
|
|
||||||
{
|
|
||||||
fullStaticHash.insert(i, nil());
|
|
||||||
}
|
|
||||||
|
|
||||||
emptyHash.printInfo(Info);
|
|
||||||
fullHash.printInfo(Info);
|
|
||||||
emptyStaticHash.printInfo(Info);
|
|
||||||
fullStaticHash.printInfo(Info);
|
|
||||||
|
|
||||||
|
|
||||||
cpuTime timer;
|
|
||||||
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
packed.resize(40);
|
|
||||||
packed.shrink();
|
|
||||||
packed.resize(n, 1);
|
|
||||||
}
|
|
||||||
Info<< "resize/shrink/resize:" << timer.cpuTimeIncrement() << " s\n\n";
|
|
||||||
|
|
||||||
// set every other bit on:
|
|
||||||
Info<< "set every other bit on and count\n";
|
|
||||||
packed.storage() = 0xAAAAAAAAu;
|
|
||||||
|
|
||||||
// Count packed
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAll(packed, i)
|
|
||||||
{
|
|
||||||
sum += packed[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Counting brute-force:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Count packed
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
sum += packed.count();
|
|
||||||
}
|
|
||||||
Info<< "Counting via count():" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Dummy addition
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAll(unpacked, i)
|
|
||||||
{
|
|
||||||
sum += i + 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Dummy loop:" << timer.cpuTimeIncrement() << " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Read
|
|
||||||
//
|
|
||||||
|
|
||||||
// Read stl
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
for (unsigned int i = 0; i < stlVector.size(); i++)
|
|
||||||
{
|
|
||||||
sum += stlVector[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Reading stl:" << timer.cpuTimeIncrement() << " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Read unpacked
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAll(unpacked, i)
|
|
||||||
{
|
|
||||||
sum += unpacked[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Reading unpacked:" << timer.cpuTimeIncrement() << " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Read packed
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAll(packed, i)
|
|
||||||
{
|
|
||||||
sum += packed.get(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Reading packed using get:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Read packed
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAll(packed, i)
|
|
||||||
{
|
|
||||||
sum += packed[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Reading packed using reference:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Read via iterator
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAllIter(PackedBoolList, packed, it)
|
|
||||||
{
|
|
||||||
sum += it;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Reading packed using iterator:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Read via iterator
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAllConstIter(PackedBoolList, packed, cit)
|
|
||||||
{
|
|
||||||
sum += cit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Reading packed using const_iterator():" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Read empty hash
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAll(unpacked, i)
|
|
||||||
{
|
|
||||||
sum += emptyHash.found(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Reading empty labelHashSet:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Read full hash
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAll(unpacked, i)
|
|
||||||
{
|
|
||||||
sum += fullHash.found(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Reading full labelHashSet:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Read empty static hash
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAll(unpacked, i)
|
|
||||||
{
|
|
||||||
sum += emptyStaticHash.found(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Reading empty StaticHash:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// we can skip this test - it is usually quite slow
|
|
||||||
// Read full static hash
|
|
||||||
sum = 0;
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAll(unpacked, i)
|
|
||||||
{
|
|
||||||
sum += fullStaticHash.found(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Reading full StaticHash:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
Info<< " sum " << sum << endl;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Info<< "Starting write tests" << endl;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Write
|
|
||||||
//
|
|
||||||
|
|
||||||
// Write stl
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
for (unsigned int i = 0; i < stlVector.size(); i++)
|
|
||||||
{
|
|
||||||
stlVector[i] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Writing stl:" << timer.cpuTimeIncrement() << " s" << endl;
|
|
||||||
|
|
||||||
// Write unpacked
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAll(unpacked, i)
|
|
||||||
{
|
|
||||||
unpacked[i] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Writing unpacked:" << timer.cpuTimeIncrement() << " s" << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Write packed
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAll(packed, i)
|
|
||||||
{
|
|
||||||
packed[i] = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Writing packed using reference:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Write packed
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAll(packed, i)
|
|
||||||
{
|
|
||||||
packed.set(i, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Writing packed using set:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Write packed
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
forAllIter(PackedBoolList, packed, it)
|
|
||||||
{
|
|
||||||
it() = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Info<< "Writing packed using iterator:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Write packed
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
packed = 0;
|
|
||||||
}
|
|
||||||
Info<< "Writing packed uniform 0:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Write packed
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
packed = 1;
|
|
||||||
}
|
|
||||||
Info<< "Writing packed uniform 1:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
|
|
||||||
|
|
||||||
PackedList<3> oddPacked(n, 3);
|
|
||||||
|
|
||||||
// Write packed
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
packed = 0;
|
|
||||||
}
|
|
||||||
Info<< "Writing packed<3> uniform 0:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Write packed
|
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
|
||||||
{
|
|
||||||
packed = 1;
|
|
||||||
}
|
|
||||||
Info<< "Writing packed<3> uniform 1:" << timer.cpuTimeIncrement()
|
|
||||||
<< " s" << endl;
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,7 +30,6 @@ Description
|
|||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "boolList.H"
|
#include "boolList.H"
|
||||||
#include "HashSet.H"
|
#include "HashSet.H"
|
||||||
#include "StaticHashTable.H"
|
|
||||||
#include "cpuTime.H"
|
#include "cpuTime.H"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "PackedBoolList.H"
|
#include "PackedBoolList.H"
|
||||||
|
|||||||
@ -144,7 +144,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "\ntest Istream constructor\n";
|
Info<< "\ntest Istream constructor\n";
|
||||||
|
|
||||||
list4.printInfo(Info, true);
|
list4.printInfo(Info, true);
|
||||||
Info<< list4 << " indices: " << list4.used()() <<endl;
|
Info<< list4 << " indices: " << list4.used() <<endl;
|
||||||
|
|
||||||
Info<< "\nassign from labelList\n";
|
Info<< "\nassign from labelList\n";
|
||||||
list4 = labelList
|
list4 = labelList
|
||||||
@ -156,7 +156,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
list4.printInfo(Info, true);
|
list4.printInfo(Info, true);
|
||||||
Info<< list4 << " indices: " << list4.used()() <<endl;
|
Info<< list4 << " indices: " << list4.used() <<endl;
|
||||||
|
|
||||||
Info<< "\nassign from indices\n";
|
Info<< "\nassign from indices\n";
|
||||||
list4.read
|
list4.read
|
||||||
@ -169,7 +169,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
list4.printInfo(Info, true);
|
list4.printInfo(Info, true);
|
||||||
Info<< list4 << " indices: " << list4.used()() <<endl;
|
Info<< list4 << " indices: " << list4.used() <<endl;
|
||||||
|
|
||||||
List<bool> boolLst(list4.size());
|
List<bool> boolLst(list4.size());
|
||||||
forAll(list4, i)
|
forAll(list4, i)
|
||||||
|
|||||||
@ -94,7 +94,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
{
|
{
|
||||||
dictionary dict(IFstream("testDictRegex")());
|
dictionary dict(IFstream("testDictRegex")());
|
||||||
dict.add(keyType("fooba[rz]", true), "anything");
|
dict.add(keyType("fooba[rz]"), "anything");
|
||||||
|
|
||||||
Info<< "dict:" << dict << nl
|
Info<< "dict:" << dict << nl
|
||||||
<< "toc: " << dict.toc() << nl
|
<< "toc: " << dict.toc() << nl
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -186,7 +186,7 @@ int main(int argc, char *argv[])
|
|||||||
if (names[nameI] != oldNames[nameI])
|
if (names[nameI] != oldNames[nameI])
|
||||||
{
|
{
|
||||||
// make "(abc|def)" pattern
|
// make "(abc|def)" pattern
|
||||||
keyType renamed( "(" + names[nameI] + ")", true);
|
keyType renamed(string("(" + names[nameI] + ")"));
|
||||||
|
|
||||||
solverDict.changeKeyword(oldNames[nameI], renamed);
|
solverDict.changeKeyword(oldNames[nameI], renamed);
|
||||||
|
|
||||||
|
|||||||
@ -51,9 +51,9 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Read the model, time controls and plot outlines from the dictionary
|
// Read the model, time controls and plot outlines from the dictionary
|
||||||
rigidBodyMotion motion(dict);
|
rigidBodyMotion motion(dict);
|
||||||
const scalar deltaT(readScalar(dict.lookup("deltaT")));
|
const scalar deltaT(dict.lookup<scalar>("deltaT"));
|
||||||
const label nIter(dict.lookupOrDefault<label>("nIter", 1));
|
const label nIter(dict.lookupOrDefault<label>("nIter", 1));
|
||||||
const scalar endTime(readScalar(dict.lookup("endTime")));
|
const scalar endTime(dict.lookup<scalar>("endTime"));
|
||||||
const dictionary& bodiesDict = dict.subDict("bodies");
|
const dictionary& bodiesDict = dict.subDict("bodies");
|
||||||
List<vectorField> outlines;
|
List<vectorField> outlines;
|
||||||
labelList outlineBodyIDs;
|
labelList outlineBodyIDs;
|
||||||
|
|||||||
@ -688,10 +688,10 @@ int main(int argc, char *argv[])
|
|||||||
bool selectOutside(readBool(refineDict.lookup("selectOutside")));
|
bool selectOutside(readBool(refineDict.lookup("selectOutside")));
|
||||||
bool selectHanging(readBool(refineDict.lookup("selectHanging")));
|
bool selectHanging(readBool(refineDict.lookup("selectHanging")));
|
||||||
|
|
||||||
scalar minEdgeLen(readScalar(refineDict.lookup("minEdgeLen")));
|
scalar minEdgeLen(refineDict.lookup<scalar>("minEdgeLen"));
|
||||||
scalar maxEdgeLen(readScalar(refineDict.lookup("maxEdgeLen")));
|
scalar maxEdgeLen(refineDict.lookup<scalar>("maxEdgeLen"));
|
||||||
scalar curvature(readScalar(refineDict.lookup("curvature")));
|
scalar curvature(refineDict.lookup<scalar>("curvature"));
|
||||||
scalar curvDist(readScalar(refineDict.lookup("curvatureDistance")));
|
scalar curvDist(refineDict.lookup<scalar>("curvatureDistance"));
|
||||||
pointField outsidePts(refineDict.lookup("outsidePoints"));
|
pointField outsidePts(refineDict.lookup("outsidePoints"));
|
||||||
label refinementLimit(refineDict.lookup<label>("splitLevel"));
|
label refinementLimit(refineDict.lookup<label>("splitLevel"));
|
||||||
bool writeMesh(readBool(refineDict.lookup("writeMesh")));
|
bool writeMesh(readBool(refineDict.lookup("writeMesh")));
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -360,7 +360,7 @@ int main(int argc, char *argv[])
|
|||||||
bool selectCut(readBool(refineDict.lookup("selectCut")));
|
bool selectCut(readBool(refineDict.lookup("selectCut")));
|
||||||
bool selectInside(readBool(refineDict.lookup("selectInside")));
|
bool selectInside(readBool(refineDict.lookup("selectInside")));
|
||||||
bool selectOutside(readBool(refineDict.lookup("selectOutside")));
|
bool selectOutside(readBool(refineDict.lookup("selectOutside")));
|
||||||
scalar nearDist(readScalar(refineDict.lookup("nearDistance")));
|
scalar nearDist(refineDict.lookup<scalar>("nearDistance"));
|
||||||
|
|
||||||
|
|
||||||
if (useSurface)
|
if (useSurface)
|
||||||
|
|||||||
@ -37,14 +37,14 @@ Foam::cv2DControls::cv2DControls
|
|||||||
motionControl_(controlDict.subDict("motionControl")),
|
motionControl_(controlDict.subDict("motionControl")),
|
||||||
conformationControl_(controlDict.subDict("surfaceConformation")),
|
conformationControl_(controlDict.subDict("surfaceConformation")),
|
||||||
|
|
||||||
minCellSize_(readScalar(motionControl_.lookup("minCellSize"))),
|
minCellSize_(motionControl_.lookup<scalar>("minCellSize")),
|
||||||
minCellSize2_(Foam::sqr(minCellSize_)),
|
minCellSize2_(Foam::sqr(minCellSize_)),
|
||||||
|
|
||||||
maxQuadAngle_(readScalar(conformationControl_.lookup("maxQuadAngle"))),
|
maxQuadAngle_(conformationControl_.lookup<scalar>("maxQuadAngle")),
|
||||||
|
|
||||||
nearWallAlignedDist_
|
nearWallAlignedDist_
|
||||||
(
|
(
|
||||||
readScalar(motionControl_.lookup("nearWallAlignedDist"))*minCellSize_
|
motionControl_.lookup<scalar>("nearWallAlignedDist")*minCellSize_
|
||||||
),
|
),
|
||||||
nearWallAlignedDist2_(Foam::sqr(nearWallAlignedDist_)),
|
nearWallAlignedDist2_(Foam::sqr(nearWallAlignedDist_)),
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ Foam::cv2DControls::cv2DControls
|
|||||||
randomiseInitialGrid_(conformationControl_.lookup("randomiseInitialGrid")),
|
randomiseInitialGrid_(conformationControl_.lookup("randomiseInitialGrid")),
|
||||||
randomPerturbation_
|
randomPerturbation_
|
||||||
(
|
(
|
||||||
readScalar(conformationControl_.lookup("randomPerturbation"))
|
conformationControl_.lookup<scalar>("randomPerturbation")
|
||||||
),
|
),
|
||||||
|
|
||||||
maxBoundaryConformingIter_
|
maxBoundaryConformingIter_
|
||||||
@ -85,28 +85,28 @@ Foam::cv2DControls::cv2DControls
|
|||||||
|
|
||||||
minEdgeLen_
|
minEdgeLen_
|
||||||
(
|
(
|
||||||
readScalar(conformationControl_.lookup("minEdgeLenCoeff"))
|
conformationControl_.lookup<scalar>("minEdgeLenCoeff")
|
||||||
*minCellSize_
|
*minCellSize_
|
||||||
),
|
),
|
||||||
minEdgeLen2_(Foam::sqr(minEdgeLen_)),
|
minEdgeLen2_(Foam::sqr(minEdgeLen_)),
|
||||||
|
|
||||||
maxNotchLen_
|
maxNotchLen_
|
||||||
(
|
(
|
||||||
readScalar(conformationControl_.lookup("maxNotchLenCoeff"))
|
conformationControl_.lookup<scalar>("maxNotchLenCoeff")
|
||||||
*minCellSize_
|
*minCellSize_
|
||||||
),
|
),
|
||||||
maxNotchLen2_(Foam::sqr(maxNotchLen_)),
|
maxNotchLen2_(Foam::sqr(maxNotchLen_)),
|
||||||
|
|
||||||
minNearPointDist_
|
minNearPointDist_
|
||||||
(
|
(
|
||||||
readScalar(conformationControl_.lookup("minNearPointDistCoeff"))
|
conformationControl_.lookup<scalar>("minNearPointDistCoeff")
|
||||||
*minCellSize_
|
*minCellSize_
|
||||||
),
|
),
|
||||||
minNearPointDist2_(Foam::sqr(minNearPointDist_)),
|
minNearPointDist2_(Foam::sqr(minNearPointDist_)),
|
||||||
|
|
||||||
ppDist_
|
ppDist_
|
||||||
(
|
(
|
||||||
readScalar(conformationControl_.lookup("pointPairDistanceCoeff"))
|
conformationControl_.lookup<scalar>("pointPairDistanceCoeff")
|
||||||
*minCellSize_
|
*minCellSize_
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -814,14 +814,14 @@ Foam::backgroundMeshDecomposition::backgroundMeshDecomposition
|
|||||||
),
|
),
|
||||||
decomposerPtr_(decompositionMethod::New(decomposeDict_)),
|
decomposerPtr_(decompositionMethod::New(decomposeDict_)),
|
||||||
mergeDist_(1e-6*mesh_.bounds().mag()),
|
mergeDist_(1e-6*mesh_.bounds().mag()),
|
||||||
spanScale_(readScalar(coeffsDict.lookup("spanScale"))),
|
spanScale_(coeffsDict.lookup<scalar>("spanScale")),
|
||||||
minCellSizeLimit_
|
minCellSizeLimit_
|
||||||
(
|
(
|
||||||
coeffsDict.lookupOrDefault<scalar>("minCellSizeLimit", 0.0)
|
coeffsDict.lookupOrDefault<scalar>("minCellSizeLimit", 0.0)
|
||||||
),
|
),
|
||||||
minLevels_(coeffsDict.lookup<label>("minLevels")),
|
minLevels_(coeffsDict.lookup<label>("minLevels")),
|
||||||
volRes_(coeffsDict.lookup<label>("sampleResolution")),
|
volRes_(coeffsDict.lookup<label>("sampleResolution")),
|
||||||
maxCellWeightCoeff_(readScalar(coeffsDict.lookup("maxCellWeightCoeff")))
|
maxCellWeightCoeff_(coeffsDict.lookup<scalar>("maxCellWeightCoeff"))
|
||||||
{
|
{
|
||||||
if (!Pstream::parRun())
|
if (!Pstream::parRun())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -60,12 +60,12 @@ linearDistance::linearDistance
|
|||||||
),
|
),
|
||||||
distanceCellSize_
|
distanceCellSize_
|
||||||
(
|
(
|
||||||
readScalar(coeffsDict().lookup("distanceCellSizeCoeff"))
|
coeffsDict().lookup<scalar>("distanceCellSizeCoeff")
|
||||||
*defaultCellSize
|
*defaultCellSize
|
||||||
),
|
),
|
||||||
distance_
|
distance_
|
||||||
(
|
(
|
||||||
readScalar(coeffsDict().lookup("distanceCoeff"))*defaultCellSize
|
coeffsDict().lookup<scalar>("distanceCoeff")*defaultCellSize
|
||||||
),
|
),
|
||||||
distanceSqr_(sqr(distance_))
|
distanceSqr_(sqr(distance_))
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -59,11 +59,11 @@ linearSpatial::linearSpatial
|
|||||||
referencePoint_(coeffsDict().lookup("referencePoint")),
|
referencePoint_(coeffsDict().lookup("referencePoint")),
|
||||||
referenceCellSize_
|
referenceCellSize_
|
||||||
(
|
(
|
||||||
readScalar(coeffsDict().lookup("referenceCellSizeCoeff"))
|
coeffsDict().lookup<scalar>("referenceCellSizeCoeff")
|
||||||
*defaultCellSize
|
*defaultCellSize
|
||||||
),
|
),
|
||||||
direction_(coeffsDict().lookup("direction")),
|
direction_(coeffsDict().lookup("direction")),
|
||||||
cellSizeGradient_(readScalar(coeffsDict().lookup("cellSizeGradient")))
|
cellSizeGradient_(coeffsDict().lookup<scalar>("cellSizeGradient"))
|
||||||
{
|
{
|
||||||
direction_ /= mag(direction_);
|
direction_ /= mag(direction_);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -62,12 +62,12 @@ surfaceOffsetLinearDistance::surfaceOffsetLinearDistance
|
|||||||
),
|
),
|
||||||
distanceCellSize_
|
distanceCellSize_
|
||||||
(
|
(
|
||||||
readScalar(coeffsDict().lookup("distanceCellSizeCoeff"))
|
coeffsDict().lookup<scalar>("distanceCellSizeCoeff")
|
||||||
*defaultCellSize
|
*defaultCellSize
|
||||||
),
|
),
|
||||||
surfaceOffset_
|
surfaceOffset_
|
||||||
(
|
(
|
||||||
readScalar(coeffsDict().lookup("surfaceOffsetCoeff"))*defaultCellSize
|
coeffsDict().lookup<scalar>("surfaceOffsetCoeff")*defaultCellSize
|
||||||
),
|
),
|
||||||
totalDistance_(),
|
totalDistance_(),
|
||||||
totalDistanceSqr_()
|
totalDistanceSqr_()
|
||||||
@ -93,13 +93,13 @@ surfaceOffsetLinearDistance::surfaceOffsetLinearDistance
|
|||||||
if (coeffsDict().found("totalDistanceCoeff"))
|
if (coeffsDict().found("totalDistanceCoeff"))
|
||||||
{
|
{
|
||||||
totalDistance_ =
|
totalDistance_ =
|
||||||
readScalar(coeffsDict().lookup("totalDistanceCoeff"))
|
coeffsDict().lookup<scalar>("totalDistanceCoeff")
|
||||||
*defaultCellSize;
|
*defaultCellSize;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
totalDistance_ =
|
totalDistance_ =
|
||||||
readScalar(coeffsDict().lookup("linearDistanceCoeff"))
|
coeffsDict().lookup<scalar>("linearDistanceCoeff")
|
||||||
*defaultCellSize
|
*defaultCellSize
|
||||||
+ surfaceOffset_;
|
+ surfaceOffset_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -57,7 +57,7 @@ uniformDistance::uniformDistance
|
|||||||
),
|
),
|
||||||
distance_
|
distance_
|
||||||
(
|
(
|
||||||
readScalar(coeffsDict().lookup("distanceCoeff"))*defaultCellSize
|
coeffsDict().lookup<scalar>("distanceCoeff")*defaultCellSize
|
||||||
),
|
),
|
||||||
distanceSqr_(sqr(distance_))
|
distanceSqr_(sqr(distance_))
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -117,15 +117,15 @@ Foam::automatic::automatic
|
|||||||
internalClosenessFile_(coeffsDict_.lookup("internalClosenessFile")),
|
internalClosenessFile_(coeffsDict_.lookup("internalClosenessFile")),
|
||||||
internalClosenessCellSizeCoeff_
|
internalClosenessCellSizeCoeff_
|
||||||
(
|
(
|
||||||
readScalar(coeffsDict_.lookup("internalClosenessCellSizeCoeff"))
|
coeffsDict_.lookup<scalar>("internalClosenessCellSizeCoeff")
|
||||||
),
|
),
|
||||||
curvatureCellSizeCoeff_
|
curvatureCellSizeCoeff_
|
||||||
(
|
(
|
||||||
readScalar(coeffsDict_.lookup("curvatureCellSizeCoeff"))
|
coeffsDict_.lookup<scalar>("curvatureCellSizeCoeff")
|
||||||
),
|
),
|
||||||
maximumCellSize_
|
maximumCellSize_
|
||||||
(
|
(
|
||||||
readScalar(coeffsDict_.lookup("maximumCellSizeCoeff"))*defaultCellSize
|
coeffsDict_.lookup<scalar>("maximumCellSizeCoeff")*defaultCellSize
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,7 +58,7 @@ Foam::uniformValue::uniformValue
|
|||||||
),
|
),
|
||||||
surfaceCellSize_
|
surfaceCellSize_
|
||||||
(
|
(
|
||||||
readScalar(coeffsDict().lookup("surfaceCellSizeCoeff"))*defaultCellSize
|
coeffsDict().lookup<scalar>("surfaceCellSizeCoeff")*defaultCellSize
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -520,10 +520,8 @@ void Foam::conformalVoronoiMesh::buildCellSizeAndAlignmentMesh()
|
|||||||
const dictionary& motionControlDict
|
const dictionary& motionControlDict
|
||||||
= foamyHexMeshControls().foamyHexMeshDict().subDict("motionControl");
|
= foamyHexMeshControls().foamyHexMeshDict().subDict("motionControl");
|
||||||
|
|
||||||
label nMaxIter = readLabel
|
const label nMaxIter =
|
||||||
(
|
motionControlDict.lookup<label>("maxRefinementIterations");
|
||||||
motionControlDict.lookup("maxRefinementIterations")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Maximum number of refinement iterations : " << nMaxIter << endl;
|
Info<< "Maximum number of refinement iterations : " << nMaxIter << endl;
|
||||||
|
|
||||||
@ -557,10 +555,9 @@ void Foam::conformalVoronoiMesh::buildCellSizeAndAlignmentMesh()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
label maxSmoothingIterations = readLabel
|
const label maxSmoothingIterations =
|
||||||
(
|
motionControlDict.lookup<label>("maxSmoothingIterations");
|
||||||
motionControlDict.lookup("maxSmoothingIterations")
|
|
||||||
);
|
|
||||||
meshAlignmentSmoother.smoothAlignments(maxSmoothingIterations);
|
meshAlignmentSmoother.smoothAlignments(maxSmoothingIterations);
|
||||||
|
|
||||||
Info<< "Background cell size and alignment mesh:" << endl;
|
Info<< "Background cell size and alignment mesh:" << endl;
|
||||||
|
|||||||
@ -840,7 +840,7 @@ void Foam::conformalVoronoiMesh::checkCellSizing()
|
|||||||
= dict.subDict("meshQualityControls");
|
= dict.subDict("meshQualityControls");
|
||||||
|
|
||||||
const scalar maxNonOrtho =
|
const scalar maxNonOrtho =
|
||||||
readScalar(meshQualityDict.lookup("maxNonOrtho", true));
|
meshQualityDict.lookup<scalar>("maxNonOrtho", true);
|
||||||
|
|
||||||
label nWrongFaces = 0;
|
label nWrongFaces = 0;
|
||||||
|
|
||||||
|
|||||||
@ -42,38 +42,25 @@ Foam::cvControls::cvControls
|
|||||||
foamyHexMeshDict_.subDict("surfaceConformation")
|
foamyHexMeshDict_.subDict("surfaceConformation")
|
||||||
);
|
);
|
||||||
|
|
||||||
pointPairDistanceCoeff_ = readScalar
|
pointPairDistanceCoeff_ =
|
||||||
(
|
surfDict.lookup<scalar>("pointPairDistanceCoeff");
|
||||||
surfDict.lookup("pointPairDistanceCoeff")
|
|
||||||
);
|
|
||||||
|
|
||||||
mixedFeaturePointPPDistanceCoeff_ = readScalar
|
mixedFeaturePointPPDistanceCoeff_ =
|
||||||
(
|
surfDict.lookup<scalar>("mixedFeaturePointPPDistanceCoeff");
|
||||||
surfDict.lookup("mixedFeaturePointPPDistanceCoeff")
|
|
||||||
);
|
|
||||||
|
|
||||||
featurePointExclusionDistanceCoeff_ = readScalar
|
featurePointExclusionDistanceCoeff_ =
|
||||||
(
|
surfDict.lookup<scalar>("featurePointExclusionDistanceCoeff");
|
||||||
surfDict.lookup("featurePointExclusionDistanceCoeff")
|
|
||||||
);
|
|
||||||
|
|
||||||
featureEdgeExclusionDistanceCoeff_ = readScalar
|
featureEdgeExclusionDistanceCoeff_ =
|
||||||
(
|
surfDict.lookup<scalar>("featureEdgeExclusionDistanceCoeff");
|
||||||
surfDict.lookup("featureEdgeExclusionDistanceCoeff")
|
|
||||||
);
|
|
||||||
|
|
||||||
|
surfaceSearchDistanceCoeff_ =
|
||||||
|
surfDict.lookup<scalar>("surfaceSearchDistanceCoeff");
|
||||||
|
|
||||||
surfaceSearchDistanceCoeff_ = readScalar
|
maxSurfaceProtrusionCoeff_ =
|
||||||
(
|
surfDict.lookup<scalar>("maxSurfaceProtrusionCoeff");
|
||||||
surfDict.lookup("surfaceSearchDistanceCoeff")
|
|
||||||
);
|
|
||||||
|
|
||||||
maxSurfaceProtrusionCoeff_ = readScalar
|
maxQuadAngle_ = surfDict.lookup<scalar>("maxQuadAngle");
|
||||||
(
|
|
||||||
surfDict.lookup("maxSurfaceProtrusionCoeff")
|
|
||||||
);
|
|
||||||
|
|
||||||
maxQuadAngle_ = readScalar(surfDict.lookup("maxQuadAngle"));
|
|
||||||
|
|
||||||
surfaceConformationRebuildFrequency_ = max
|
surfaceConformationRebuildFrequency_ = max
|
||||||
(
|
(
|
||||||
@ -122,46 +109,40 @@ Foam::cvControls::cvControls
|
|||||||
surfDict.subDict("conformationControls")
|
surfDict.subDict("conformationControls")
|
||||||
);
|
);
|
||||||
|
|
||||||
surfacePtExclusionDistanceCoeff_ = readScalar
|
surfacePtExclusionDistanceCoeff_ =
|
||||||
(
|
conformationControlsDict.lookup<scalar>
|
||||||
conformationControlsDict.lookup("surfacePtExclusionDistanceCoeff")
|
(
|
||||||
);
|
"surfacePtExclusionDistanceCoeff"
|
||||||
|
);
|
||||||
|
|
||||||
edgeSearchDistCoeffSqr_ = sqr
|
edgeSearchDistCoeffSqr_ = sqr
|
||||||
(
|
(
|
||||||
readScalar
|
conformationControlsDict.lookup<scalar>("edgeSearchDistCoeff")
|
||||||
(
|
|
||||||
conformationControlsDict.lookup("edgeSearchDistCoeff")
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
surfacePtReplaceDistCoeffSqr_ = sqr
|
surfacePtReplaceDistCoeffSqr_ = sqr
|
||||||
(
|
(
|
||||||
readScalar
|
conformationControlsDict.lookup<scalar>("surfacePtReplaceDistCoeff")
|
||||||
|
);
|
||||||
|
|
||||||
|
maxConformationIterations_ =
|
||||||
|
conformationControlsDict.lookup<label>("maxIterations");
|
||||||
|
|
||||||
|
iterationToInitialHitRatioLimit_ =
|
||||||
|
conformationControlsDict.lookup<scalar>
|
||||||
(
|
(
|
||||||
conformationControlsDict.lookup("surfacePtReplaceDistCoeff")
|
"iterationToInitialHitRatioLimit"
|
||||||
)
|
);
|
||||||
);
|
|
||||||
|
|
||||||
maxConformationIterations_ = readLabel
|
|
||||||
(
|
|
||||||
conformationControlsDict.lookup("maxIterations")
|
|
||||||
);
|
|
||||||
|
|
||||||
iterationToInitialHitRatioLimit_ = readScalar
|
|
||||||
(
|
|
||||||
conformationControlsDict.lookup("iterationToInitialHitRatioLimit")
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Motion control controls
|
// Motion control controls
|
||||||
|
|
||||||
const dictionary& motionDict(foamyHexMeshDict_.subDict("motionControl"));
|
const dictionary& motionDict(foamyHexMeshDict_.subDict("motionControl"));
|
||||||
|
|
||||||
defaultCellSize_ = readScalar(motionDict.lookup("defaultCellSize"));
|
defaultCellSize_ = motionDict.lookup<scalar>("defaultCellSize");
|
||||||
|
|
||||||
minimumCellSize_ =
|
minimumCellSize_ =
|
||||||
readScalar(motionDict.lookup("minimumCellSizeCoeff"))*defaultCellSize_;
|
motionDict.lookup<scalar>("minimumCellSizeCoeff")*defaultCellSize_;
|
||||||
|
|
||||||
objOutput_ = Switch(motionDict.lookupOrDefault<Switch>("objOutput", false));
|
objOutput_ = Switch(motionDict.lookupOrDefault<Switch>("objOutput", false));
|
||||||
|
|
||||||
@ -177,7 +158,7 @@ Foam::cvControls::cvControls
|
|||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
maxLoadUnbalance_ = readScalar(motionDict.lookup("maxLoadUnbalance"));
|
maxLoadUnbalance_ = motionDict.lookup<scalar>("maxLoadUnbalance");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -186,7 +167,7 @@ Foam::cvControls::cvControls
|
|||||||
|
|
||||||
cosAlignmentAcceptanceAngle_ = cos
|
cosAlignmentAcceptanceAngle_ = cos
|
||||||
(
|
(
|
||||||
degToRad(readScalar(motionDict.lookup("alignmentAcceptanceAngle")))
|
degToRad(motionDict.lookup<scalar>("alignmentAcceptanceAngle"))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -197,19 +178,15 @@ Foam::cvControls::cvControls
|
|||||||
motionDict.subDict("pointInsertionCriteria")
|
motionDict.subDict("pointInsertionCriteria")
|
||||||
);
|
);
|
||||||
|
|
||||||
insertionDistCoeff_ = readScalar
|
insertionDistCoeff_ =
|
||||||
(
|
insertionDict.lookup<scalar>("cellCentreDistCoeff");
|
||||||
insertionDict.lookup("cellCentreDistCoeff")
|
|
||||||
);
|
|
||||||
|
|
||||||
faceAreaRatioCoeff_ = readScalar
|
faceAreaRatioCoeff_ =
|
||||||
(
|
insertionDict.lookup<scalar>("faceAreaRatioCoeff");
|
||||||
insertionDict.lookup("faceAreaRatioCoeff")
|
|
||||||
);
|
|
||||||
|
|
||||||
cosInsertionAcceptanceAngle_ = cos
|
cosInsertionAcceptanceAngle_ = cos
|
||||||
(
|
(
|
||||||
degToRad(readScalar(insertionDict.lookup("acceptanceAngle")))
|
degToRad(insertionDict.lookup<scalar>("acceptanceAngle"))
|
||||||
);
|
);
|
||||||
|
|
||||||
// Point removal criteria
|
// Point removal criteria
|
||||||
@ -219,10 +196,8 @@ Foam::cvControls::cvControls
|
|||||||
motionDict.subDict("pointRemovalCriteria")
|
motionDict.subDict("pointRemovalCriteria")
|
||||||
);
|
);
|
||||||
|
|
||||||
removalDistCoeff_ = readScalar
|
removalDistCoeff_ =
|
||||||
(
|
removalDict.lookup<scalar>("cellCentreDistCoeff");
|
||||||
removalDict.lookup("cellCentreDistCoeff")
|
|
||||||
);
|
|
||||||
|
|
||||||
// polyMesh filtering controls
|
// polyMesh filtering controls
|
||||||
|
|
||||||
@ -260,7 +235,6 @@ Foam::cvControls::cvControls
|
|||||||
{
|
{
|
||||||
writeBackgroundMeshDecomposition_ = Switch(false);
|
writeBackgroundMeshDecomposition_ = Switch(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,8 +49,8 @@ piecewiseLinearRamp::piecewiseLinearRamp
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
faceAreaWeightModel(typeName, faceAreaWeightDict),
|
faceAreaWeightModel(typeName, faceAreaWeightDict),
|
||||||
lAF_(readScalar(coeffDict().lookup("lowerAreaFraction"))),
|
lAF_(coeffDict().lookup<scalar>("lowerAreaFraction")),
|
||||||
uAF_(readScalar(coeffDict().lookup("upperAreaFraction")))
|
uAF_(coeffDict().lookup<scalar>("upperAreaFraction"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -885,7 +885,7 @@ autoDensity::autoDensity
|
|||||||
detailsDict().lookupOrDefault<scalar>("minCellSizeLimit", 0.0)
|
detailsDict().lookupOrDefault<scalar>("minCellSizeLimit", 0.0)
|
||||||
),
|
),
|
||||||
minLevels_(detailsDict().lookup<label>("minLevels")),
|
minLevels_(detailsDict().lookup<label>("minLevels")),
|
||||||
maxSizeRatio_(readScalar(detailsDict().lookup("maxSizeRatio"))),
|
maxSizeRatio_(detailsDict().lookup<scalar>("maxSizeRatio")),
|
||||||
volRes_(detailsDict().lookup<label>("sampleResolution")),
|
volRes_(detailsDict().lookup<label>("sampleResolution")),
|
||||||
surfRes_
|
surfRes_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,11 +58,11 @@ bodyCentredCubic::bodyCentredCubic
|
|||||||
cellShapeControls,
|
cellShapeControls,
|
||||||
decomposition
|
decomposition
|
||||||
),
|
),
|
||||||
initialCellSize_(readScalar(detailsDict().lookup("initialCellSize"))),
|
initialCellSize_(detailsDict().lookup<scalar>("initialCellSize")),
|
||||||
randomiseInitialGrid_(detailsDict().lookup("randomiseInitialGrid")),
|
randomiseInitialGrid_(detailsDict().lookup("randomiseInitialGrid")),
|
||||||
randomPerturbationCoeff_
|
randomPerturbationCoeff_
|
||||||
(
|
(
|
||||||
readScalar(detailsDict().lookup("randomPerturbationCoeff"))
|
detailsDict().lookup<scalar>("randomPerturbationCoeff")
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,11 +58,11 @@ faceCentredCubic::faceCentredCubic
|
|||||||
cellShapeControls,
|
cellShapeControls,
|
||||||
decomposition
|
decomposition
|
||||||
),
|
),
|
||||||
initialCellSize_(readScalar(detailsDict().lookup("initialCellSize"))),
|
initialCellSize_(detailsDict().lookup<scalar>("initialCellSize")),
|
||||||
randomiseInitialGrid_(detailsDict().lookup("randomiseInitialGrid")),
|
randomiseInitialGrid_(detailsDict().lookup("randomiseInitialGrid")),
|
||||||
randomPerturbationCoeff_
|
randomPerturbationCoeff_
|
||||||
(
|
(
|
||||||
readScalar(detailsDict().lookup("randomPerturbationCoeff"))
|
detailsDict().lookup<scalar>("randomPerturbationCoeff")
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -59,13 +59,7 @@ initialPointsMethod::initialPointsMethod
|
|||||||
detailsDict_(optionalSubDict(type + "Coeffs")),
|
detailsDict_(optionalSubDict(type + "Coeffs")),
|
||||||
minimumSurfaceDistanceCoeffSqr_
|
minimumSurfaceDistanceCoeffSqr_
|
||||||
(
|
(
|
||||||
sqr
|
sqr( initialPointsDict.lookup<scalar>("minimumSurfaceDistanceCoeff"))
|
||||||
(
|
|
||||||
readScalar
|
|
||||||
(
|
|
||||||
initialPointsDict.lookup("minimumSurfaceDistanceCoeff")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
fixInitialPoints_(Switch(initialPointsDict.lookup("fixInitialPoints")))
|
fixInitialPoints_(Switch(initialPointsDict.lookup("fixInitialPoints")))
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -63,7 +63,7 @@ pointFile::pointFile
|
|||||||
randomiseInitialGrid_(detailsDict().lookup("randomiseInitialGrid")),
|
randomiseInitialGrid_(detailsDict().lookup("randomiseInitialGrid")),
|
||||||
randomPerturbationCoeff_
|
randomPerturbationCoeff_
|
||||||
(
|
(
|
||||||
readScalar(detailsDict().lookup("randomPerturbationCoeff"))
|
detailsDict().lookup<scalar>("randomPerturbationCoeff")
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Info<< " Inside/Outside check is " << insideOutsideCheck_.asText()
|
Info<< " Inside/Outside check is " << insideOutsideCheck_.asText()
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -140,7 +140,7 @@ rayShooting::rayShooting
|
|||||||
randomiseInitialGrid_(detailsDict().lookup("randomiseInitialGrid")),
|
randomiseInitialGrid_(detailsDict().lookup("randomiseInitialGrid")),
|
||||||
randomPerturbationCoeff_
|
randomPerturbationCoeff_
|
||||||
(
|
(
|
||||||
readScalar(detailsDict().lookup("randomPerturbationCoeff"))
|
detailsDict().lookup<scalar>("randomPerturbationCoeff")
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,11 +58,11 @@ uniformGrid::uniformGrid
|
|||||||
cellShapeControls,
|
cellShapeControls,
|
||||||
decomposition
|
decomposition
|
||||||
),
|
),
|
||||||
initialCellSize_(readScalar(detailsDict().lookup("initialCellSize"))),
|
initialCellSize_(detailsDict().lookup<scalar>("initialCellSize")),
|
||||||
randomiseInitialGrid_(detailsDict().lookup("randomiseInitialGrid")),
|
randomiseInitialGrid_(detailsDict().lookup("randomiseInitialGrid")),
|
||||||
randomPerturbationCoeff_
|
randomPerturbationCoeff_
|
||||||
(
|
(
|
||||||
readScalar(detailsDict().lookup("randomPerturbationCoeff"))
|
detailsDict().lookup<scalar>("randomPerturbationCoeff")
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,8 +45,8 @@ adaptiveLinear::adaptiveLinear
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
relaxationModel(typeName, relaxationDict, runTime),
|
relaxationModel(typeName, relaxationDict, runTime),
|
||||||
relaxationStart_(readScalar(coeffDict().lookup("relaxationStart"))),
|
relaxationStart_(coeffDict().lookup<scalar>("relaxationStart")),
|
||||||
relaxationEnd_(readScalar(coeffDict().lookup("relaxationEnd"))),
|
relaxationEnd_(coeffDict().lookup<scalar>("relaxationEnd")),
|
||||||
lastTimeValue_(runTime_.time().timeOutputValue()),
|
lastTimeValue_(runTime_.time().timeOutputValue()),
|
||||||
relaxation_(relaxationStart_)
|
relaxation_(relaxationStart_)
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,11 +45,11 @@ rampHoldFall::rampHoldFall
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
relaxationModel(typeName, relaxationDict, runTime),
|
relaxationModel(typeName, relaxationDict, runTime),
|
||||||
rampStartRelaxation_(readScalar(coeffDict().lookup("rampStartRelaxation"))),
|
rampStartRelaxation_(coeffDict().lookup<scalar>("rampStartRelaxation")),
|
||||||
holdRelaxation_(readScalar(coeffDict().lookup("holdRelaxation"))),
|
holdRelaxation_(coeffDict().lookup<scalar>("holdRelaxation")),
|
||||||
fallEndRelaxation_(readScalar(coeffDict().lookup("fallEndRelaxation"))),
|
fallEndRelaxation_(coeffDict().lookup<scalar>("fallEndRelaxation")),
|
||||||
rampEndFraction_(readScalar(coeffDict().lookup("rampEndFraction"))),
|
rampEndFraction_(coeffDict().lookup<scalar>("rampEndFraction")),
|
||||||
fallStartFraction_(readScalar(coeffDict().lookup("fallStartFraction"))),
|
fallStartFraction_(coeffDict().lookup<scalar>("fallStartFraction")),
|
||||||
rampGradient_((holdRelaxation_ - rampStartRelaxation_)/(rampEndFraction_)),
|
rampGradient_((holdRelaxation_ - rampStartRelaxation_)/(rampEndFraction_)),
|
||||||
fallGradient_
|
fallGradient_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -57,7 +57,7 @@ Foam::triSurfaceMeshFeatures::triSurfaceMeshFeatures
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
searchableSurfaceFeatures(surface, dict),
|
searchableSurfaceFeatures(surface, dict),
|
||||||
includedAngle_(readScalar(dict.lookup("includedAngle"))),
|
includedAngle_(dict.lookup<scalar>("includedAngle")),
|
||||||
mode_
|
mode_
|
||||||
(
|
(
|
||||||
extendedFeatureEdgeMesh::sideVolumeTypeNames_
|
extendedFeatureEdgeMesh::sideVolumeTypeNames_
|
||||||
|
|||||||
@ -151,7 +151,7 @@ Foam::shortEdgeFilter2D::shortEdgeFilter2D
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
shortEdgeFilterFactor_(readScalar(dict.lookup("shortEdgeFilterFactor"))),
|
shortEdgeFilterFactor_(dict.lookup<scalar>("shortEdgeFilterFactor")),
|
||||||
edgeAttachedToBoundaryFactor_
|
edgeAttachedToBoundaryFactor_
|
||||||
(
|
(
|
||||||
dict.lookupOrDefault<scalar>("edgeAttachedToBoundaryFactor", 2.0)
|
dict.lookupOrDefault<scalar>("edgeAttachedToBoundaryFactor", 2.0)
|
||||||
|
|||||||
@ -141,7 +141,7 @@ autoPtr<refinementSurfaces> createRefinementSurfaces
|
|||||||
shapeDict.optionalSubDict(scsFuncName + "Coeffs");
|
shapeDict.optionalSubDict(scsFuncName + "Coeffs");
|
||||||
|
|
||||||
const scalar surfaceCellSize =
|
const scalar surfaceCellSize =
|
||||||
readScalar(scsDict.lookup("surfaceCellSizeCoeff"));
|
scsDict.lookup<scalar>("surfaceCellSizeCoeff");
|
||||||
|
|
||||||
const label refLevel = sizeCoeffToRefinement
|
const label refLevel = sizeCoeffToRefinement
|
||||||
(
|
(
|
||||||
@ -228,10 +228,7 @@ autoPtr<refinementSurfaces> createRefinementSurfaces
|
|||||||
);
|
);
|
||||||
|
|
||||||
const scalar surfaceCellSize =
|
const scalar surfaceCellSize =
|
||||||
readScalar
|
scsDict.lookup<scalar>("surfaceCellSizeCoeff");
|
||||||
(
|
|
||||||
scsDict.lookup("surfaceCellSizeCoeff")
|
|
||||||
);
|
|
||||||
|
|
||||||
const label refLevel = sizeCoeffToRefinement
|
const label refLevel = sizeCoeffToRefinement
|
||||||
(
|
(
|
||||||
@ -758,7 +755,7 @@ int main(int argc, char *argv[])
|
|||||||
const scalar mergeDist = getMergeDistance
|
const scalar mergeDist = getMergeDistance
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
readScalar(meshDict.lookup("mergeTolerance"))
|
meshDict.lookup<scalar>("mergeTolerance")
|
||||||
);
|
);
|
||||||
|
|
||||||
const Switch keepPatches(meshDict.lookupOrDefault("keepPatches", false));
|
const Switch keepPatches(meshDict.lookupOrDefault("keepPatches", false));
|
||||||
@ -918,7 +915,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Calculate current ratio of hex cells v.s. wanted cell size
|
// Calculate current ratio of hex cells v.s. wanted cell size
|
||||||
const scalar defaultCellSize =
|
const scalar defaultCellSize =
|
||||||
readScalar(motionDict.lookup("defaultCellSize"));
|
motionDict.lookup<scalar>("defaultCellSize");
|
||||||
|
|
||||||
const scalar initialCellSize = ::pow(meshPtr().V()[0], 1.0/3.0);
|
const scalar initialCellSize = ::pow(meshPtr().V()[0], 1.0/3.0);
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io, const word& dictName)
|
|||||||
|
|
||||||
scalar planeTolerance
|
scalar planeTolerance
|
||||||
(
|
(
|
||||||
readScalar(mirrorMeshDict_.lookup("planeTolerance"))
|
mirrorMeshDict_.lookup<scalar>("planeTolerance")
|
||||||
);
|
);
|
||||||
|
|
||||||
const pointField& oldPoints = points();
|
const pointField& oldPoints = points();
|
||||||
|
|||||||
@ -16,5 +16,5 @@
|
|||||||
|
|
||||||
scalar planeTolerance
|
scalar planeTolerance
|
||||||
(
|
(
|
||||||
readScalar(mirrorMeshDict.lookup("planeTolerance"))
|
mirrorMeshDict.lookup<scalar>("planeTolerance")
|
||||||
);
|
);
|
||||||
|
|||||||
@ -96,14 +96,11 @@ Foam::domainDecomposition::domainDecomposition
|
|||||||
),
|
),
|
||||||
nProcs_
|
nProcs_
|
||||||
(
|
(
|
||||||
readInt
|
decompositionModel::New
|
||||||
(
|
(
|
||||||
decompositionModel::New
|
*this,
|
||||||
(
|
dictFile
|
||||||
*this,
|
).lookup<int>("numberOfSubdomains")
|
||||||
dictFile
|
|
||||||
).lookup("numberOfSubdomains")
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
distributed_(false),
|
distributed_(false),
|
||||||
cellToProc_(nCells()),
|
cellToProc_(nCells()),
|
||||||
|
|||||||
@ -13,7 +13,7 @@ IOdictionary conversionProperties
|
|||||||
|
|
||||||
scalar startTime
|
scalar startTime
|
||||||
(
|
(
|
||||||
readScalar(conversionProperties.lookup("startTime"))
|
conversionProperties.lookup<scalar>("startTime")
|
||||||
);
|
);
|
||||||
|
|
||||||
word vComp
|
word vComp
|
||||||
|
|||||||
@ -12,6 +12,6 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar Ea(readScalar(boxTurbDict.lookup("Ea")));
|
scalar Ea(boxTurbDict.lookup<scalar>("Ea"));
|
||||||
|
|
||||||
scalar k0(readScalar(boxTurbDict.lookup("k0")));
|
scalar k0(boxTurbDict.lookup<scalar>("k0"));
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -124,8 +124,8 @@ Foam::tabulatedWallFunctions::SpaldingsLaw::SpaldingsLaw
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
tabulatedWallFunction(dict, mesh, typeName),
|
tabulatedWallFunction(dict, mesh, typeName),
|
||||||
kappa_(readScalar(coeffDict_.lookup("kappa"))),
|
kappa_(coeffDict_.lookup<scalar>("kappa")),
|
||||||
E_(readScalar(coeffDict_.lookup("E")))
|
E_(coeffDict_.lookup<scalar>("E"))
|
||||||
{
|
{
|
||||||
invertFunction();
|
invertFunction();
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -190,7 +190,7 @@ int main(int argc, char *argv[])
|
|||||||
surfaceDict.subDict("extractFromSurfaceCoeffs");
|
surfaceDict.subDict("extractFromSurfaceCoeffs");
|
||||||
|
|
||||||
includedAngle =
|
includedAngle =
|
||||||
readScalar(extractFromSurfaceDict.lookup("includedAngle"));
|
extractFromSurfaceDict.lookup<scalar>("includedAngle");
|
||||||
|
|
||||||
const Switch geometricTestOnly =
|
const Switch geometricTestOnly =
|
||||||
extractFromSurfaceDict.lookupOrDefault<Switch>
|
extractFromSurfaceDict.lookupOrDefault<Switch>
|
||||||
@ -592,7 +592,7 @@ int main(int argc, char *argv[])
|
|||||||
<< "edges to the surface" << endl;
|
<< "edges to the surface" << endl;
|
||||||
|
|
||||||
const scalar searchDistance =
|
const scalar searchDistance =
|
||||||
readScalar(surfaceDict.lookup("maxFeatureProximity"));
|
surfaceDict.lookup<scalar>("maxFeatureProximity");
|
||||||
|
|
||||||
scalarField featureProximity(surf.size(), searchDistance);
|
scalarField featureProximity(surf.size(), searchDistance);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -193,7 +193,7 @@ namespace Foam
|
|||||||
// Either construct features from surface & featureAngle or read set.
|
// Either construct features from surface & featureAngle or read set.
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
const scalar includedAngle = readScalar(dict.lookup("includedAngle"));
|
const scalar includedAngle = dict.lookup<scalar>("includedAngle");
|
||||||
|
|
||||||
autoPtr<surfaceFeatures> set
|
autoPtr<surfaceFeatures> set
|
||||||
(
|
(
|
||||||
@ -585,7 +585,7 @@ namespace Foam
|
|||||||
<< "edges to the surface" << endl;
|
<< "edges to the surface" << endl;
|
||||||
|
|
||||||
const scalar searchDistance =
|
const scalar searchDistance =
|
||||||
readScalar(dict.lookup("maxFeatureProximity"));
|
dict.lookup<scalar>("maxFeatureProximity");
|
||||||
|
|
||||||
scalarField featureProximity(surf.size(), searchDistance);
|
scalarField featureProximity(surf.size(), searchDistance);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -284,8 +284,8 @@ int main(int argc, char *argv[])
|
|||||||
const dictionary& planeDict = meshSubsetDict.subDict("plane");
|
const dictionary& planeDict = meshSubsetDict.subDict("plane");
|
||||||
|
|
||||||
const plane pl(planeDict);
|
const plane pl(planeDict);
|
||||||
const scalar distance(readScalar(planeDict.lookup("distance")));
|
const scalar distance(planeDict.lookup<scalar>("distance"));
|
||||||
const scalar cosAngle(readScalar(planeDict.lookup("cosAngle")));
|
const scalar cosAngle(planeDict.lookup<scalar>("cosAngle"));
|
||||||
|
|
||||||
// Select all triangles that are close to the plane and
|
// Select all triangles that are close to the plane and
|
||||||
// whose normal aligns with the plane as well.
|
// whose normal aligns with the plane as well.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,11 +71,11 @@ int main(int argc, char *argv[])
|
|||||||
dictionary control(propertiesDict);
|
dictionary control(propertiesDict);
|
||||||
|
|
||||||
|
|
||||||
scalar P(readScalar(control.lookup("P")));
|
scalar P(control.lookup<scalar>("P"));
|
||||||
scalar T0(readScalar(control.lookup("T0")));
|
scalar T0(control.lookup<scalar>("T0"));
|
||||||
const word fuelName(control.lookup("fuel"));
|
const word fuelName(control.lookup("fuel"));
|
||||||
scalar n(readScalar(control.lookup("n")));
|
scalar n(control.lookup<scalar>("n"));
|
||||||
scalar m(readScalar(control.lookup("m")));
|
scalar m(control.lookup<scalar>("m"));
|
||||||
|
|
||||||
|
|
||||||
Info<< nl << "Reading thermodynamic data dictionary" << endl;
|
Info<< nl << "Reading thermodynamic data dictionary" << endl;
|
||||||
|
|||||||
@ -74,10 +74,10 @@ int main(int argc, char *argv[])
|
|||||||
dictionary control(propertiesDict);
|
dictionary control(propertiesDict);
|
||||||
|
|
||||||
|
|
||||||
scalar P(readScalar(control.lookup("P")));
|
scalar P(control.lookup<scalar>("P"));
|
||||||
const word fuelName(control.lookup("fuel"));
|
const word fuelName(control.lookup("fuel"));
|
||||||
scalar n(readScalar(control.lookup("n")));
|
scalar n(control.lookup<scalar>("n"));
|
||||||
scalar m(readScalar(control.lookup("m")));
|
scalar m(control.lookup<scalar>("m"));
|
||||||
|
|
||||||
|
|
||||||
Info<< nl << "Reading thermodynamic data dictionary" << endl;
|
Info<< nl << "Reading thermodynamic data dictionary" << endl;
|
||||||
|
|||||||
@ -73,8 +73,8 @@ int main(int argc, char *argv[])
|
|||||||
dictionary properties(propertiesFile);
|
dictionary properties(propertiesFile);
|
||||||
|
|
||||||
|
|
||||||
scalar p(readScalar(properties.lookup("P")));
|
scalar p(properties.lookup<scalar>("P"));
|
||||||
scalar T0(readScalar(properties.lookup("T0")));
|
scalar T0(properties.lookup<scalar>("T0"));
|
||||||
mixture rMix(properties.lookup("reactants"));
|
mixture rMix(properties.lookup("reactants"));
|
||||||
mixture pMix(properties.lookup("products"));
|
mixture pMix(properties.lookup("products"));
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ CONSTRUCT
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
PARENT(p, iF),
|
PARENT(p, iF),
|
||||||
scalarData_(readScalar(dict.lookup("scalarData"))),
|
scalarData_(dict.lookup<scalar>("scalarData")),
|
||||||
data_(pTraits<TYPE>(dict.lookup("data"))),
|
data_(pTraits<TYPE>(dict.lookup("data"))),
|
||||||
fieldData_("fieldData", dict, p.size()),
|
fieldData_("fieldData", dict, p.size()),
|
||||||
timeVsData_(Function1<TYPE>::New("timeVsData", dict)),
|
timeVsData_(Function1<TYPE>::New("timeVsData", dict)),
|
||||||
|
|||||||
@ -51,7 +51,7 @@ Foam::functionObjects::FUNCTIONOBJECT::FUNCTIONOBJECT
|
|||||||
:
|
:
|
||||||
fvMeshFunctionObject(name, runTime, dict),
|
fvMeshFunctionObject(name, runTime, dict),
|
||||||
wordData_(dict.lookupOrDefault<word>("wordData", "defaultWord")),
|
wordData_(dict.lookupOrDefault<word>("wordData", "defaultWord")),
|
||||||
scalarData_(readScalar(dict.lookup("scalarData"))),
|
scalarData_(dict.lookup<scalar>("scalarData")),
|
||||||
labelData_(dict.lookup<label>("labelData"))
|
labelData_(dict.lookup<label>("labelData"))
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
|
|||||||
@ -287,7 +287,6 @@ DebugSwitches
|
|||||||
SpalartAllmarasIDDES 0;
|
SpalartAllmarasIDDES 0;
|
||||||
SphereDrag 0;
|
SphereDrag 0;
|
||||||
StandardWallInteraction 0;
|
StandardWallInteraction 0;
|
||||||
StaticHashTable 0;
|
|
||||||
StochasticDispersionRAS 0;
|
StochasticDispersionRAS 0;
|
||||||
SuperBee 0;
|
SuperBee 0;
|
||||||
SuperBeeV 0;
|
SuperBeeV 0;
|
||||||
|
|||||||
@ -242,7 +242,7 @@ void Foam::Time::readDict()
|
|||||||
|
|
||||||
if (!deltaTchanged_)
|
if (!deltaTchanged_)
|
||||||
{
|
{
|
||||||
deltaT_ = readScalar(controlDict_.lookup("deltaT"));
|
deltaT_ = controlDict_.lookup<scalar>("deltaT");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controlDict_.found("writeControl"))
|
if (controlDict_.found("writeControl"))
|
||||||
@ -376,7 +376,7 @@ void Foam::Time::readDict()
|
|||||||
{
|
{
|
||||||
IOstream::defaultPrecision
|
IOstream::defaultPrecision
|
||||||
(
|
(
|
||||||
readUint(controlDict_.lookup("writePrecision"))
|
controlDict_.lookup<uint>("writePrecision")
|
||||||
);
|
);
|
||||||
|
|
||||||
Sout.precision(IOstream::defaultPrecision());
|
Sout.precision(IOstream::defaultPrecision());
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user