diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C index 49f36d3309..2b2cd7c4fd 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,7 +79,7 @@ Foam::PDRDragModel::~PDRDragModel() bool Foam::PDRDragModel::read(const dictionary& PDRProperties) { - PDRDragModelCoeffs_ = PDRProperties.subDict(type() + "Coeffs"); + PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs"); PDRDragModelCoeffs_.lookup("drag") >> on_; diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C index a6301ba973..7e3b2536b1 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -67,7 +67,7 @@ Foam::XiEqModel::~XiEqModel() bool Foam::XiEqModel::read(const dictionary& XiEqProperties) { - XiEqModelCoeffs_ = XiEqProperties.subDict(type() + "Coeffs"); + XiEqModelCoeffs_ = XiEqProperties.optionalSubDict(type() + "Coeffs"); return true; } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C index 12bd713060..217242b24b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -67,7 +67,7 @@ Foam::XiGModel::~XiGModel() bool Foam::XiGModel::read(const dictionary& XiGProperties) { - XiGModelCoeffs_ = XiGProperties.subDict(type() + "Coeffs"); + XiGModelCoeffs_ = XiGProperties.optionalSubDict(type() + "Coeffs"); return true; } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C index 0bb0cd1e0b..9580728905 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,7 +85,7 @@ Foam::XiModel::~XiModel() bool Foam::XiModel::read(const dictionary& XiProperties) { - XiModelCoeffs_ = XiProperties.subDict(type() + "Coeffs"); + XiModelCoeffs_ = XiProperties.optionalSubDict(type() + "Coeffs"); return true; } diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index 947c62132e..afdebbd2c6 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,7 +80,7 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE dict.lookup("fuelFile") ) )() - ).subDict(typeName + "Coeffs") + ).optionalSubDict(typeName + "Coeffs") ), LFL_(readScalar(coeffsDict_.lookup("lowerFlamabilityLimit"))), UFL_(readScalar(coeffsDict_.lookup("upperFlamabilityLimit"))), diff --git a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/plastic/plastic.C b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/plastic/plastic.C index 5eb7e0f9ce..c096513474 100644 --- a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/plastic/plastic.C +++ b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/plastic/plastic.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ Foam::mixtureViscosityModels::plastic::plastic ) : mixtureViscosityModel(name, viscosityProperties, U, phi), - plasticCoeffs_(viscosityProperties.subDict(modelName + "Coeffs")), + plasticCoeffs_(viscosityProperties.optionalSubDict(modelName + "Coeffs")), plasticViscosityCoeff_ ( "coeff", @@ -117,7 +117,7 @@ bool Foam::mixtureViscosityModels::plastic::read { mixtureViscosityModel::read(viscosityProperties); - plasticCoeffs_ = viscosityProperties.subDict(typeName + "Coeffs"); + plasticCoeffs_ = viscosityProperties.optionalSubDict(typeName + "Coeffs"); plasticCoeffs_.lookup("k") >> plasticViscosityCoeff_; plasticCoeffs_.lookup("n") >> plasticViscosityExponent_; diff --git a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C index b6e7fbae00..103ad496b7 100644 --- a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C +++ b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -126,7 +126,7 @@ Foam::autoPtr Foam::relativeVelocityModel::New ( cstrIter() ( - dict.subDict(modelType + "Coeffs"), + dict.optionalSubDict(modelType + "Coeffs"), mixture ) ); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C index 74c0ec248b..32d3fe4308 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C @@ -102,7 +102,7 @@ bool Foam::phaseChangeTwoPhaseMixtures::Kunz::read() { if (phaseChangeTwoPhaseMixture::read()) { - phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs"); + phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs"); phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf") >> UInf_; phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf") >> tInf_; diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C index 853884b794..ade26e86a4 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C @@ -97,7 +97,7 @@ bool Foam::phaseChangeTwoPhaseMixtures::Merkle::read() { if (phaseChangeTwoPhaseMixture::read()) { - phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs"); + phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs"); phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf") >> UInf_; phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf") >> tInf_; diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C index 7f7771cec4..07fe4a2331 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C @@ -151,7 +151,7 @@ bool Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::read() { if (phaseChangeTwoPhaseMixture::read()) { - phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs"); + phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs"); phaseChangeTwoPhaseMixtureCoeffs_.lookup("n") >> n_; phaseChangeTwoPhaseMixtureCoeffs_.lookup("dNuc") >> dNuc_; diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C index b9a5e69bf8..c4fe701a2f 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,7 +43,7 @@ Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixture ) : incompressibleTwoPhaseMixture(U, phi), - phaseChangeTwoPhaseMixtureCoeffs_(subDict(type + "Coeffs")), + phaseChangeTwoPhaseMixtureCoeffs_(optionalSubDict(type + "Coeffs")), pSat_("pSat", dimPressure, lookup("pSat")) {} @@ -77,7 +77,7 @@ bool Foam::phaseChangeTwoPhaseMixture::read() { if (incompressibleTwoPhaseMixture::read()) { - phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs"); + phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs"); lookup("pSat") >> pSat_; return true; diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C index b58f00291b..ef872df0cc 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,11 @@ Foam::autoPtr Foam::diameterModel::New << exit(FatalError); } - return cstrIter()(dict.subDict(diameterModelType + "Coeffs"), phase); + return cstrIter() + ( + dict.optionalSubDict(diameterModelType + "Coeffs"), + phase + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/diameterModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/diameterModel.C index a956565b47..d7eaa2f081 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/diameterModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/diameterModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,7 +61,7 @@ void Foam::diameterModel::correct() bool Foam::diameterModel::read(const dictionary& phaseProperties) { - diameterProperties_ = phaseProperties.subDict(type() + "Coeffs"); + diameterProperties_ = phaseProperties.optionalSubDict(type() + "Coeffs"); return true; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C index b58f00291b..ef872df0cc 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,11 @@ Foam::autoPtr Foam::diameterModel::New << exit(FatalError); } - return cstrIter()(dict.subDict(diameterModelType + "Coeffs"), phase); + return cstrIter() + ( + dict.optionalSubDict(diameterModelType + "Coeffs"), + phase + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C index 5abe9f3561..a1794a7820 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair ) : conductivityModel(dict), - coeffDict_(dict.subDict(typeName + "Coeffs")), + coeffDict_(dict.optionalSubDict(typeName + "Coeffs")), L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_) {} @@ -103,7 +103,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::kappa bool Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::read() { - coeffDict_ <<= dict_.subDict(typeName + "Coeffs"); + coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs"); L_.readIfPresent(coeffDict_); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C index ab6d3d354a..6b110d3731 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,7 +57,7 @@ JohnsonJackson ) : frictionalStressModel(dict), - coeffDict_(dict.subDict(typeName + "Coeffs")), + coeffDict_(dict.optionalSubDict(typeName + "Coeffs")), Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_), eta_("eta", dimless, coeffDict_), p_("p", dimless, coeffDict_), @@ -130,7 +130,7 @@ Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::nu bool Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::read() { - coeffDict_ <<= dict_.subDict(typeName + "Coeffs"); + coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs"); Fr_.read(coeffDict_); eta_.read(coeffDict_); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C index 3b69aa8a62..67517beb07 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,7 +57,7 @@ JohnsonJacksonSchaeffer::JohnsonJacksonSchaeffer ) : frictionalStressModel(dict), - coeffDict_(dict.subDict(typeName + "Coeffs")), + coeffDict_(dict.optionalSubDict(typeName + "Coeffs")), Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_), eta_("eta", dimless, coeffDict_), p_("p", dimless, coeffDict_), @@ -190,7 +190,7 @@ JohnsonJacksonSchaeffer::nu bool Foam::kineticTheoryModels::frictionalStressModels:: JohnsonJacksonSchaeffer::read() { - coeffDict_ <<= dict_.subDict(typeName + "Coeffs"); + coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs"); Fr_.read(coeffDict_); eta_.read(coeffDict_); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C index be2555958c..eeabe622e1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,7 +55,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer ) : frictionalStressModel(dict), - coeffDict_(dict.subDict(typeName + "Coeffs")), + coeffDict_(dict.optionalSubDict(typeName + "Coeffs")), phi_("phi", dimless, coeffDict_) { phi_ *= constant::mathematical::pi/180.0; @@ -178,7 +178,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu bool Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::read() { - coeffDict_ <<= dict_.subDict(typeName + "Coeffs"); + coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs"); phi_.read(coeffDict_); phi_ *= constant::mathematical::pi/180.0; diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C index 415bb3145a..6607b16443 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::HrenyaSinclair ) : viscosityModel(dict), - coeffDict_(dict.subDict(typeName + "Coeffs")), + coeffDict_(dict.optionalSubDict(typeName + "Coeffs")), L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_) {} @@ -100,7 +100,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::nu bool Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::read() { - coeffDict_ <<= dict_.subDict(typeName + "Coeffs"); + coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs"); L_.readIfPresent(coeffDict_); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C index 5abe9f3561..a1794a7820 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair ) : conductivityModel(dict), - coeffDict_(dict.subDict(typeName + "Coeffs")), + coeffDict_(dict.optionalSubDict(typeName + "Coeffs")), L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_) {} @@ -103,7 +103,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::kappa bool Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::read() { - coeffDict_ <<= dict_.subDict(typeName + "Coeffs"); + coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs"); L_.readIfPresent(coeffDict_); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C index ab6d3d354a..6b110d3731 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,7 +57,7 @@ JohnsonJackson ) : frictionalStressModel(dict), - coeffDict_(dict.subDict(typeName + "Coeffs")), + coeffDict_(dict.optionalSubDict(typeName + "Coeffs")), Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_), eta_("eta", dimless, coeffDict_), p_("p", dimless, coeffDict_), @@ -130,7 +130,7 @@ Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::nu bool Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::read() { - coeffDict_ <<= dict_.subDict(typeName + "Coeffs"); + coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs"); Fr_.read(coeffDict_); eta_.read(coeffDict_); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C index 3b69aa8a62..67517beb07 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,7 +57,7 @@ JohnsonJacksonSchaeffer::JohnsonJacksonSchaeffer ) : frictionalStressModel(dict), - coeffDict_(dict.subDict(typeName + "Coeffs")), + coeffDict_(dict.optionalSubDict(typeName + "Coeffs")), Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_), eta_("eta", dimless, coeffDict_), p_("p", dimless, coeffDict_), @@ -190,7 +190,7 @@ JohnsonJacksonSchaeffer::nu bool Foam::kineticTheoryModels::frictionalStressModels:: JohnsonJacksonSchaeffer::read() { - coeffDict_ <<= dict_.subDict(typeName + "Coeffs"); + coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs"); Fr_.read(coeffDict_); eta_.read(coeffDict_); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C index be2555958c..eeabe622e1 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,7 +55,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer ) : frictionalStressModel(dict), - coeffDict_(dict.subDict(typeName + "Coeffs")), + coeffDict_(dict.optionalSubDict(typeName + "Coeffs")), phi_("phi", dimless, coeffDict_) { phi_ *= constant::mathematical::pi/180.0; @@ -178,7 +178,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu bool Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::read() { - coeffDict_ <<= dict_.subDict(typeName + "Coeffs"); + coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs"); phi_.read(coeffDict_); phi_ *= constant::mathematical::pi/180.0; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C index 415bb3145a..6607b16443 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::HrenyaSinclair ) : viscosityModel(dict), - coeffDict_(dict.subDict(typeName + "Coeffs")), + coeffDict_(dict.optionalSubDict(typeName + "Coeffs")), L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_) {} @@ -100,7 +100,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::nu bool Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::read() { - coeffDict_ <<= dict_.subDict(typeName + "Coeffs"); + coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs"); L_.readIfPresent(coeffDict_); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/diameterModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/diameterModel.C index 55225147ac..d7eaa2f081 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/diameterModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/diameterModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,7 +61,7 @@ void Foam::diameterModel::correct() bool Foam::diameterModel::read(const dictionary& phaseProperties) { - diameterProperties_ = phaseProperties.subDict(type() + "Coeffs"); + diameterProperties_ = phaseProperties.optionalSubDict(type() + "Coeffs"); return true; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C index b58f00291b..ef872df0cc 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,11 @@ Foam::autoPtr Foam::diameterModel::New << exit(FatalError); } - return cstrIter()(dict.subDict(diameterModelType + "Coeffs"), phase); + return cstrIter() + ( + dict.optionalSubDict(diameterModelType + "Coeffs"), + phase + ); } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.C index c0db55e558..3e6860c7a5 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,7 +58,7 @@ Foam::cellSizeFunction::cellSizeFunction defaultCellSize ) ), - coeffsDict_(subDict(type + "Coeffs")), + coeffsDict_(optionalSubDict(type + "Coeffs")), defaultCellSize_(defaultCellSize), regionIndices_(regionIndices), sideMode_(), diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C index 025ba5885d..5f85fc260e 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,7 +107,7 @@ Foam::automatic::automatic surface, defaultCellSize ), - coeffsDict_(cellSizeCalcTypeDict.subDict(typeName + "Coeffs")), + coeffsDict_(cellSizeCalcTypeDict.optionalSubDict(typeName + "Coeffs")), surfaceName_(surface.searchableSurface::name()), readCurvature_(Switch(coeffsDict_.lookup("curvature"))), curvatureFile_(coeffsDict_.lookup("curvatureFile")), diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C index 6d6b56e7b6..c4f2014caf 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,10 +58,13 @@ Foam::fieldFromFile::fieldFromFile surface, defaultCellSize ), - coeffsDict_(cellSizeCalcTypeDict.subDict(typeName + "Coeffs")), + coeffsDict_(cellSizeCalcTypeDict.optionalSubDict(typeName + "Coeffs")), fileName_ ( - cellSizeCalcTypeDict.subDict(typeName + "Coeffs").lookup("fieldFile") + cellSizeCalcTypeDict.optionalSubDict + ( + typeName + "Coeffs" + ).lookup("fieldFile") ), cellSizeMultipleCoeff_ ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/surfaceCellSizeFunction/surfaceCellSizeFunction.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/surfaceCellSizeFunction/surfaceCellSizeFunction.C index cac1837021..33d7267d7d 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/surfaceCellSizeFunction/surfaceCellSizeFunction.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/surfaceCellSizeFunction/surfaceCellSizeFunction.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,7 +46,7 @@ Foam::surfaceCellSizeFunction::surfaceCellSizeFunction : dictionary(surfaceCellSizeFunctionDict), surface_(surface), - coeffsDict_(subDict(type + "Coeffs")), + coeffsDict_(optionalSubDict(type + "Coeffs")), defaultCellSize_(defaultCellSize), refinementFactor_ ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/faceAreaWeightModel/faceAreaWeightModel/faceAreaWeightModel.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/faceAreaWeightModel/faceAreaWeightModel/faceAreaWeightModel.C index 6388c0c6c8..0aa043cb1e 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/faceAreaWeightModel/faceAreaWeightModel/faceAreaWeightModel.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/faceAreaWeightModel/faceAreaWeightModel/faceAreaWeightModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,7 +46,7 @@ faceAreaWeightModel::faceAreaWeightModel ) : dictionary(relaxationDict), - coeffDict_(subDict(type + "Coeffs")) + coeffDict_(optionalSubDict(type + "Coeffs")) {} diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/initialPointsMethod/initialPointsMethod.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/initialPointsMethod/initialPointsMethod.C index 1100784155..d7b93caba4 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/initialPointsMethod/initialPointsMethod.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/initialPointsMethod/initialPointsMethod.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ initialPointsMethod::initialPointsMethod geometryToConformTo_(geometryToConformTo), cellShapeControls_(cellShapeControls), decomposition_(decomposition), - detailsDict_(subDict(type + "Coeffs")), + detailsDict_(optionalSubDict(type + "Coeffs")), minimumSurfaceDistanceCoeffSqr_ ( sqr diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/relaxationModel/relaxationModel/relaxationModel.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/relaxationModel/relaxationModel/relaxationModel.C index e47cbf4aaa..c06c5ed969 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/relaxationModel/relaxationModel/relaxationModel.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/relaxationModel/relaxationModel/relaxationModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,7 +48,7 @@ relaxationModel::relaxationModel : dictionary(relaxationDict), runTime_(runTime), - coeffDict_(subDict(type + "Coeffs")) + coeffDict_(optionalSubDict(type + "Coeffs")) {} diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index e9d308d3a9..277189151a 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -138,7 +138,7 @@ autoPtr createRefinementSurfaces const word scsFuncName = shapeDict.lookup("surfaceCellSizeFunction"); const dictionary& scsDict = - shapeDict.subDict(scsFuncName + "Coeffs"); + shapeDict.optionalSubDict(scsFuncName + "Coeffs"); const scalar surfaceCellSize = readScalar(scsDict.lookup("surfaceCellSizeCoeff")); diff --git a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/tabulatedWallFunction.C b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/tabulatedWallFunction.C index 9079b11941..aa881bdc9d 100644 --- a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/tabulatedWallFunction.C +++ b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/tabulatedWallFunction.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,7 +49,7 @@ Foam::tabulatedWallFunctions::tabulatedWallFunction::tabulatedWallFunction : dict_(dict), mesh_(mesh), - coeffDict_(dict.subDict(name + "Coeffs")), + coeffDict_(dict.optionalSubDict(name + "Coeffs")), invertedTableName_(dict.lookup("invertedTableName")), invertedTable_(invertedTableName_, mesh_, dict, true) {} diff --git a/etc/caseDicts/postProcessing/visualization/streamlines.cfg b/etc/caseDicts/postProcessing/visualization/streamlines.cfg index 891b4c6d0c..7d9e242c7e 100644 --- a/etc/caseDicts/postProcessing/visualization/streamlines.cfg +++ b/etc/caseDicts/postProcessing/visualization/streamlines.cfg @@ -19,8 +19,8 @@ lifeTime 10000; nSubCycle 5; cloudName particleTracks; -seedSampleSet uniform; -uniformCoeffs + +seedSampleSet { type uniform; axis x; diff --git a/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C index 49cbbbb237..5fa7be8268 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.C +++ b/src/OpenFOAM/db/dictionary/dictionary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -755,6 +755,24 @@ Foam::dictionary Foam::dictionary::subOrEmptyDict } +const Foam::dictionary& Foam::dictionary::optionalSubDict +( + const word& keyword +) const +{ + const entry* entryPtr = lookupEntryPtr(keyword, false, true); + + if (entryPtr) + { + return entryPtr->dict(); + } + else + { + return *this; + } +} + + Foam::wordList Foam::dictionary::toc() const { wordList keys(size()); diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H index 95339b4835..2507da9088 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -419,6 +419,10 @@ public: const bool mustRead = false ) const; + //- Find and return a sub-dictionary if found + // otherwise return this dictionary + const dictionary& optionalSubDict(const word&) const; + //- Return the table of contents wordList toc() const; diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C index 4e767ca3ad..1208979f7d 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ Foam::reactionRateFlameArea::reactionRateFlameArea const combustionModel& combModel ) : - coeffDict_(dict.subDict(modelType + "Coeffs")), + coeffDict_(dict.optionalSubDict(modelType + "Coeffs")), mesh_(mesh), combModel_(combModel), fuel_(dict.lookup("fuel")), diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C index c714bc5cd2..3ae9d31c29 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,9 +56,12 @@ Foam::reactionRateFlameAreaModels::relaxation::relaxation ) : reactionRateFlameArea(modelType, dict, mesh, combModel), - correlation_(dict.subDict(typeName + "Coeffs").subDict(fuel_)), - C_(readScalar(dict.subDict(typeName + "Coeffs").lookup("C"))), - alpha_(readScalar(dict.subDict(typeName + "Coeffs").lookup("alpha"))) + correlation_(dict.optionalSubDict(typeName + "Coeffs").subDict(fuel_)), + C_(readScalar(dict.optionalSubDict(typeName + "Coeffs").lookup("C"))), + alpha_ + ( + readScalar(dict.optionalSubDict(typeName + "Coeffs").lookup("alpha")) + ) {} @@ -148,7 +151,7 @@ bool Foam::reactionRateFlameAreaModels::relaxation::read { if (reactionRateFlameArea::read(dict)) { - coeffDict_ = dict.subDict(typeName + "Coeffs"); + coeffDict_ = dict.optionalSubDict(typeName + "Coeffs"); coeffDict_.lookup("C") >> C_; coeffDict_.lookup("alpha") >> alpha_; correlation_.read diff --git a/src/combustionModels/combustionModel/combustionModel.C b/src/combustionModels/combustionModel/combustionModel.C index 3094e4bdff..1ed899200c 100644 --- a/src/combustionModels/combustionModel/combustionModel.C +++ b/src/combustionModels/combustionModel/combustionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,7 +62,7 @@ Foam::combustionModel::combustionModel turbulencePtr_(), mesh_(mesh), active_(lookupOrDefault("active", true)), - coeffs_(subDict(modelType + "Coeffs")), + coeffs_(optionalSubDict(modelType + "Coeffs")), modelType_(modelType), phaseName_(phaseName) {} @@ -86,7 +86,7 @@ bool Foam::combustionModel::read() if (regIOobject::read()) { this->lookup("active") >> active_; - coeffs_ = subDict(modelType_ + "Coeffs"); + coeffs_ = optionalSubDict(modelType_ + "Coeffs"); return true; } else diff --git a/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C b/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C index a26ea293d3..737e27877e 100644 --- a/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C +++ b/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,7 +55,7 @@ Foam::dynamicInkJetFvMesh::dynamicInkJetFvMesh(const IOobject& io) IOobject::NO_WRITE, false ) - ).subDict(typeName + "Coeffs") + ).optionalSubDict(typeName + "Coeffs") ), amplitude_(readScalar(dynamicMeshCoeffs_.lookup("amplitude"))), frequency_(readScalar(dynamicMeshCoeffs_.lookup("frequency"))), diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index 1ef7aadb3e..e8045134c4 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -191,7 +191,7 @@ void Foam::dynamicRefineFvMesh::readDict() IOobject::NO_WRITE, false ) - ).subDict(typeName + "Coeffs") + ).optionalSubDict(typeName + "Coeffs") ); List> fluxVelocities = List> @@ -1202,7 +1202,7 @@ bool Foam::dynamicRefineFvMesh::update() IOobject::NO_WRITE, false ) - ).subDict(typeName + "Coeffs") + ).optionalSubDict(typeName + "Coeffs") ); label refineInterval = readLabel(refineDict.lookup("refineInterval")); diff --git a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.C b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.C index fd2fb3a9d2..e57fc35ee5 100644 --- a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.C +++ b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ Foam::solidBodyMotionFunction::solidBodyMotionFunction : SBMFCoeffs_ ( - SBMFCoeffs.subDict + SBMFCoeffs.optionalSubDict ( word(SBMFCoeffs.lookup("solidBodyMotionFunction")) + "Coeffs" ) @@ -63,7 +63,7 @@ Foam::solidBodyMotionFunction::~solidBodyMotionFunction() bool Foam::solidBodyMotionFunction::read(const dictionary& SBMFCoeffs) { - SBMFCoeffs_ = SBMFCoeffs.subDict(type() + "Coeffs"); + SBMFCoeffs_ = SBMFCoeffs.optionalSubDict(type() + "Coeffs"); return true; } diff --git a/src/dynamicMesh/motionSolvers/motionSolver/motionSolver.C b/src/dynamicMesh/motionSolvers/motionSolver/motionSolver.C index a637338472..85c8466040 100644 --- a/src/dynamicMesh/motionSolvers/motionSolver/motionSolver.C +++ b/src/dynamicMesh/motionSolvers/motionSolver/motionSolver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,7 +85,7 @@ Foam::motionSolver::motionSolver : IOdictionary(stealRegistration(dict), dict), mesh_(mesh), - coeffDict_(dict.subDict(type + "Coeffs")) + coeffDict_(dict.optionalSubDict(type + "Coeffs")) {} @@ -104,7 +104,7 @@ Foam::autoPtr Foam::motionSolver::New const IOdictionary& solverDict ) { - const word solverTypeName(solverDict.lookup("solver")); + const word solverTypeName(solverDict.lookup("motionSolver")); Info<< "Selecting motion solver: " << solverTypeName << endl; @@ -227,7 +227,7 @@ bool Foam::motionSolver::read() { if (regIOobject::read()) { - coeffDict_ = subDict(type() + "Coeffs"); + coeffDict_ = optionalSubDict(type() + "Coeffs"); return true; } diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C index 3e1c92a108..9d7d2c2516 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,7 +61,7 @@ Foam::SRF::SRFModel::SRFModel mesh_(Urel_.mesh()), origin_("origin", dimLength, lookup("origin")), axis_(lookup("axis")), - SRFModelCoeffs_(subDict(type + "Coeffs")), + SRFModelCoeffs_(optionalSubDict(type + "Coeffs")), omega_(dimensionedVector("omega", dimless/dimTime, Zero)) { // Normalise the axis @@ -89,7 +89,7 @@ bool Foam::SRF::SRFModel::read() axis_ /= mag(axis_); // Re-read sub-model coeffs - SRFModelCoeffs_ = subDict(type() + "Coeffs"); + SRFModelCoeffs_ = optionalSubDict(type() + "Coeffs"); return true; } diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C b/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C index be200396ea..446c917a4e 100644 --- a/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C +++ b/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C @@ -52,12 +52,7 @@ Foam::fv::option::option modelType_(modelType), mesh_(mesh), dict_(dict), - coeffs_ - ( - dict.found(modelType + "Coeffs") - ? dict.subDict(modelType + "Coeffs") - : dict - ), + coeffs_(dict.optionalSubDict(modelType + "Coeffs")), active_(dict_.lookupOrDefault("active", true)), fieldNames_(), applied_() diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOptionIO.C b/src/finiteVolume/cfdTools/general/fvOptions/fvOptionIO.C index 5308fa623b..88730167b8 100644 --- a/src/finiteVolume/cfdTools/general/fvOptions/fvOptionIO.C +++ b/src/finiteVolume/cfdTools/general/fvOptions/fvOptionIO.C @@ -54,14 +54,7 @@ bool Foam::fv::option::read(const dictionary& dict) { dict.readIfPresent("active", active_); - if (dict.found(modelType_ + "Coeffs")) - { - coeffs_ = dict.subDict(modelType_ + "Coeffs"); - } - else - { - coeffs_ = dict; - } + coeffs_ = dict.optionalSubDict(modelType_ + "Coeffs"); return true; } diff --git a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C index 635b864c45..adc20bb5c8 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C @@ -97,12 +97,7 @@ Foam::porosityModel::porosityModel name_(name), mesh_(mesh), dict_(dict), - coeffs_ - ( - dict.found(modelType + "Coeffs") - ? dict.subDict(modelType + "Coeffs") - : dict - ), + coeffs_(dict.optionalSubDict(modelType + "Coeffs")), active_(true), zoneName_(cellZoneName), cellZoneIDs_(), @@ -234,14 +229,7 @@ bool Foam::porosityModel::read(const dictionary& dict) { dict.readIfPresent("active", active_); - if (dict.found(type() + "Coeffs")) - { - coeffs_ = dict.subDict(type() + "Coeffs"); - } - else - { - coeffs_ = dict; - } + coeffs_ = dict.optionalSubDict(type() + "Coeffs"); dict.lookup("cellZone") >> zoneName_; cellZoneIDs_ = mesh_.cellZones().findIndices(zoneName_); diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C index 78f25810e5..9e0826340a 100644 --- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C +++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ Foam::patchDistMethods::advectionDiffusion::advectionDiffusion ) : patchDistMethod(mesh, patchIDs), - coeffs_(dict.subDict(type() + "Coeffs")), + coeffs_(dict.optionalSubDict(type() + "Coeffs")), pdmPredictor_ ( patchDistMethod::New diff --git a/src/functionObjects/field/streamLine/streamLine.C b/src/functionObjects/field/streamLine/streamLine.C index a05a0ad94f..1ed8a2ff8b 100644 --- a/src/functionObjects/field/streamLine/streamLine.C +++ b/src/functionObjects/field/streamLine/streamLine.C @@ -372,19 +372,17 @@ bool Foam::functionObjects::streamLine::read(const dictionary& dict) ); cloudName_ = dict.lookupOrDefault("cloudName", "streamLine"); - dict.lookup("seedSampleSet") >> seedSet_; meshSearchPtr_.reset(new meshSearch(mesh_)); - const dictionary& coeffsDict = dict.subDict(seedSet_ + "Coeffs"); sampledSetPtr_ = sampledSet::New ( - seedSet_, + "seedSampleSet", mesh_, meshSearchPtr_(), - coeffsDict + dict.subDict("seedSampleSet") ); - coeffsDict.lookup("axis") >> sampledSetAxis_; + sampledSetAxis_ = sampledSetPtr_->axis(); scalarFormatterPtr_ = writer::New(dict.lookup("setFormat")); vectorFormatterPtr_ = writer::New(dict.lookup("setFormat")); diff --git a/src/functionObjects/field/streamLine/streamLine.H b/src/functionObjects/field/streamLine/streamLine.H index 07a124c481..b16f4109a7 100644 --- a/src/functionObjects/field/streamLine/streamLine.H +++ b/src/functionObjects/field/streamLine/streamLine.H @@ -55,8 +55,7 @@ Description nSubCycle 5; cloudName particleTracks; - seedSampleSet uniform; - uniformCoeffs + seedSampleSet { type uniform; axis x; //distance; @@ -81,7 +80,7 @@ Usage seedSampleSet| Seeding method (see below)| yes | \endtable - Where \c seedSampleSet is typically one of + Where \c seedSampleSet \c type is typically one of \plaintable uniform | uniform particle seeding cloud | cloud of points diff --git a/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C b/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C index 23892ba776..3a65c2d570 100644 --- a/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C +++ b/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C @@ -469,18 +469,15 @@ bool Foam::functionObjects::wallBoundedStreamLine::read(const dictionary& dict) "cloudName", "wallBoundedStreamLine" ); - dict.lookup("seedSampleSet") >> seedSet_; - - const dictionary& coeffsDict = dict.subDict(seedSet_ + "Coeffs"); sampledSetPtr_ = sampledSet::New ( - seedSet_, + "seedSampleSet", mesh_, meshSearchMeshObject::New(mesh_), - coeffsDict + dict.subDict("seedSampleSet") ); - coeffsDict.lookup("axis") >> sampledSetAxis_; + sampledSetAxis_ = sampledSetPtr_->axis(); scalarFormatterPtr_ = writer::New(dict.lookup("setFormat")); vectorFormatterPtr_ = writer::New(dict.lookup("setFormat")); diff --git a/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H b/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H index 0d19e45423..619d4ed86d 100644 --- a/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H +++ b/src/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,8 +56,7 @@ Description nSubCycle 5; cloudName particleTracks; - seedSampleSet patchSeed; - patchSeedCoeffs + seedSampleSet { type patchSeed; patches (wall); @@ -81,10 +80,10 @@ Usage seedSampleSet| Seeding method (see below)| yes | \endtable - Where \c seedSampleSet is typically one of + Where \c seedSampleSet \c type is typically one of \plaintable - uniform | uniform particle seeding - cloud | cloud of points + uniform | uniform particle seeding + cloud | cloud of points patchSeed | seeding via patch faces triSurfaceMeshPointSet | points according to a tri-surface mesh \endplaintable diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C index f4a9e60683..149dffec64 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,7 +57,7 @@ Foam::displacementSBRStressFvMotionSolver::displacementSBRStressFvMotionSolver const IOdictionary& dict ) : - displacementMotionSolver(mesh, dict, dict.lookup("solver")), + displacementMotionSolver(mesh, dict, typeName), fvMotionSolver(mesh), cellDisplacement_ ( diff --git a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/trimModel/trimModel.C b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/trimModel/trimModel.C index 9126ee841d..bfd9f3d935 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/trimModel/trimModel.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/trimModel/trimModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,7 +60,7 @@ Foam::trimModel::~trimModel() void Foam::trimModel::read(const dictionary& dict) { - coeffs_ = dict.subDict(name_ + "Coeffs"); + coeffs_ = dict.optionalSubDict(name_ + "Coeffs"); } diff --git a/src/mesh/extrudeModel/extrudeModel/extrudeModel.C b/src/mesh/extrudeModel/extrudeModel/extrudeModel.C index f6a2a13289..cb041871f6 100644 --- a/src/mesh/extrudeModel/extrudeModel/extrudeModel.C +++ b/src/mesh/extrudeModel/extrudeModel/extrudeModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,7 +44,7 @@ Foam::extrudeModel::extrudeModel nLayers_(dict.lookupOrDefault