Commit 4e04c196 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: use dictionary::get<word>() instead of lookup() in a few places

parent 4ad73873
......@@ -48,7 +48,7 @@ Foam::XiEqModel::XiEqModel
(
XiEqProperties.subDict
(
word(XiEqProperties.lookup("XiEqModel")) + "Coeffs"
XiEqProperties.get<word>("XiEqModel") + "Coeffs"
)
),
thermo_(thermo),
......
......@@ -35,7 +35,7 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
const volScalarField& Su
)
{
const word modelType(propDict.lookup("XiEqModel"));
const word modelType(propDict.get<word>("XiEqModel"));
Info<< "Selecting flame-wrinkling model " << modelType << endl;
......
......@@ -48,7 +48,7 @@ Foam::XiGModel::XiGModel
(
XiGProperties.subDict
(
word(XiGProperties.lookup("XiGModel")) + "Coeffs"
XiGProperties.get<word>("XiGModel") + "Coeffs"
)
),
thermo_(thermo),
......
......@@ -35,7 +35,7 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
const volScalarField& Su
)
{
const word modelType(propDict.lookup("XiGModel"));
const word modelType(propDict.get<word>("XiGModel"));
Info<< "Selecting flame-wrinkling model " << modelType << endl;
......
......@@ -51,7 +51,7 @@ Foam::XiModel::XiModel
(
XiProperties.subDict
(
word(XiProperties.lookup("XiModel")) + "Coeffs"
XiProperties.get<word>("XiModel") + "Coeffs"
)
),
thermo_(thermo),
......
......@@ -38,7 +38,7 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
const surfaceScalarField& phi
)
{
const word modelType(propDict.lookup("XiModel"));
const word modelType(propDict.get<word>("XiModel"));
Info<< "Selecting flame-wrinkling model " << modelType << endl;
......
word constProp(initialConditions.lookup("constantProperty"));
if ((constProp != "pressure") && (constProp != "volume"))
word constProp(initialConditions.get<word>("constantProperty"));
if (constProp != "pressure" && constProp != "volume")
{
FatalError << "in initialConditions, unknown constantProperty type "
<< constProp << nl << " Valid types are: pressure volume."
<< abort(FatalError);
}
word fractionBasis(initialConditions.lookup("fractionBasis"));
if ((fractionBasis != "mass") && (fractionBasis != "mole"))
word fractionBasis(initialConditions.get<word>("fractionBasis"));
if (fractionBasis != "mass" && fractionBasis != "mole")
{
FatalError << "in initialConditions, unknown fractionBasis type " << nl
<< "Valid types are: mass or mole."
......
......@@ -8,7 +8,7 @@ SLGThermo slgThermo(mesh, thermo);
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.get<word>("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
......
......@@ -8,7 +8,7 @@ thermo.validate(args.executable(), "h", "e");
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.get<word>("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
......
......@@ -8,7 +8,7 @@ thermo.validate(args.executable(), "h", "e");
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.get<word>("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
......
......@@ -8,7 +8,7 @@ thermo.validate(args.executable(), "h", "e");
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.get<word>("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
......
......@@ -11,7 +11,7 @@
label inertIndex = -1;
if (Y.size())
{
const word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.get<word>("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
......
......@@ -12,7 +12,7 @@ SLGThermo slgThermo(mesh, thermo);
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.get<word>("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
......
......@@ -10,7 +10,7 @@ SLGThermo slgThermo(mesh, thermo);
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.get<word>("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
......
......@@ -10,7 +10,7 @@ SLGThermo slgThermo(mesh, thermo);
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.get<word>("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
......
......@@ -11,7 +11,7 @@ SLGThermo slgThermo(mesh, thermo);
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.get<word>("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
......
......@@ -10,7 +10,7 @@ SLGThermo slgThermo(mesh, thermo);
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
const word inertSpecie(thermo.get<word>("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
......
......@@ -37,7 +37,7 @@ Foam::autoPtr<Foam::mixtureViscosityModel> Foam::mixtureViscosityModel::New
const surfaceScalarField& phi
)
{
const word modelType(viscosityProperties.lookup("transportModel"));
const word modelType(viscosityProperties.get<word>("transportModel"));
Info<< "Selecting incompressible transport model " << modelType << endl;
......
......@@ -104,7 +104,7 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New
const incompressibleTwoPhaseInteractingMixture& mixture
)
{
const word modelType(dict.lookup(typeName));
const word modelType(dict.get<word>(typeName));
Info<< "Selecting relative velocity model " << modelType << endl;
......
......@@ -38,7 +38,7 @@ Foam::interfaceCompositionModel::New
{
word interfaceCompositionModelType
(
word(dict.lookup("type"))
dict.get<word>("type")
+ "<"
+ pair.phase1().thermo().type()
+ ","
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment