mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use FatalIOErrorInLookup instead of FatalErrorInLookup
This commit is contained in:
committed by
Andrew Heather
parent
5d0f1788e1
commit
f94be1bebb
@ -42,8 +42,9 @@ Foam::autoPtr<Foam::ODESolver> Foam::ODESolver::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"ODESolver",
|
||||
solverType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
|
||||
@ -102,8 +102,7 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
||||
if (!dictionaryConstructorTablePtr_)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown function type "
|
||||
<< functionType << nl << nl
|
||||
<< "Cannot load function type " << functionType << nl << nl
|
||||
<< "Table of functionObjects is empty" << endl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -112,6 +111,8 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
// FatalError (not FatalIOError) to ensure it can be caught
|
||||
// as an exception and ignored
|
||||
FatalErrorInLookup
|
||||
(
|
||||
"function",
|
||||
|
||||
@ -155,7 +155,7 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
|
||||
if (!patchTypeCstrIter.found())
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "inconsistent patch and patchField types for \n"
|
||||
<< "Inconsistent patch and patchField types for\n"
|
||||
<< " patch type " << p.type()
|
||||
<< " and patchField type " << patchFieldType
|
||||
<< exit(FatalIOError);
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::autoPtr<Foam::tableReader<Type>> Foam::tableReader<Type>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
spec,
|
||||
"reader",
|
||||
readerType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<tableReader<Type>>(cstrIter()(spec));
|
||||
|
||||
@ -135,34 +135,36 @@ Foam::LESModel<BasicTurbulenceModel>::New
|
||||
const word& propertiesName
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary modelDict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).subDict("LES").get<word>("LESModel")
|
||||
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
const dictionary& dict = modelDict.subDict("LES");
|
||||
|
||||
const word modelType(dict.get<word>("LESModel"));
|
||||
|
||||
Info<< "Selecting LES turbulence model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"LESModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<LESModel>
|
||||
|
||||
@ -80,12 +80,13 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"LESdelta",
|
||||
deltaType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<LESdelta>(cstrIter()(name, turbulence, dict));
|
||||
@ -119,14 +120,15 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"LESdelta",
|
||||
deltaType,
|
||||
additionalConstructors
|
||||
)
|
||||
<< " and " << dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<LESdelta>(cstrIter()(name, turbulence, dict));
|
||||
|
||||
@ -52,12 +52,13 @@ Foam::autoPtr<Foam::LESfilter> Foam::LESfilter::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"LESfilter",
|
||||
filterType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<LESfilter>(cstrIter()(mesh, dict));
|
||||
|
||||
@ -125,34 +125,36 @@ Foam::RASModel<BasicTurbulenceModel>::New
|
||||
const word& propertiesName
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary modelDict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).subDict("RAS").get<word>("RASModel")
|
||||
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
const dictionary& dict = modelDict.subDict("RAS");
|
||||
|
||||
const word modelType(dict.get<word>("RASModel"));
|
||||
|
||||
Info<< "Selecting RAS turbulence model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"RASModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<RASModel>
|
||||
|
||||
@ -87,34 +87,34 @@ Foam::TurbulenceModel<Alpha, Rho, BasicTurbulenceModel, TransportModel>::New
|
||||
const word& propertiesName
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).get<word>("simulationType")
|
||||
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
const word modelType(dict.get<word>("simulationType"));
|
||||
|
||||
Info<< "Selecting turbulence model type " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"simulationType",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<TurbulenceModel>
|
||||
|
||||
@ -92,7 +92,7 @@ Foam::laminarModel<BasicTurbulenceModel>::New
|
||||
const word& propertiesName
|
||||
)
|
||||
{
|
||||
IOdictionary modelDict
|
||||
const IOdictionary modelDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -105,12 +105,13 @@ Foam::laminarModel<BasicTurbulenceModel>::New
|
||||
)
|
||||
);
|
||||
|
||||
if (modelDict.found("laminar"))
|
||||
const dictionary* dictptr = modelDict.findDict("laminar");
|
||||
|
||||
if (dictptr)
|
||||
{
|
||||
const word modelType
|
||||
(
|
||||
modelDict.subDict("laminar").get<word>("laminarModel")
|
||||
);
|
||||
const dictionary& dict = *dictptr;
|
||||
|
||||
const word modelType(dict.get<word>("laminarModel"));
|
||||
|
||||
Info<< "Selecting laminar stress model " << modelType << endl;
|
||||
|
||||
@ -118,12 +119,13 @@ Foam::laminarModel<BasicTurbulenceModel>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"laminarModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<laminarModel>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
@ -75,12 +75,16 @@ Foam::autoPtr<CombustionModel> Foam::combustionModel::New
|
||||
typedef typename CombustionModel::dictionaryConstructorTable cstrTableType;
|
||||
cstrTableType* cstrTable = CombustionModel::dictionaryConstructorTablePtr_;
|
||||
|
||||
const word compCombModelName =
|
||||
combModelName + '<' + CombustionModel::reactionThermo::typeName + '>';
|
||||
const word compCombModelName
|
||||
(
|
||||
combModelName + '<' + CombustionModel::reactionThermo::typeName + '>'
|
||||
);
|
||||
|
||||
const word thermoCombModelName =
|
||||
const word thermoCombModelName
|
||||
(
|
||||
combModelName + '<' + CombustionModel::reactionThermo::typeName + ','
|
||||
+ thermo.thermoName() + '>';
|
||||
+ thermo.thermoName() + '>'
|
||||
);
|
||||
|
||||
auto compCstrIter = cstrTable->cfind(compCombModelName);
|
||||
|
||||
@ -88,28 +92,61 @@ Foam::autoPtr<CombustionModel> Foam::combustionModel::New
|
||||
|
||||
if (!compCstrIter.found() && !thermoCstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown " << combustionModel::typeName << " type "
|
||||
<< combModelName << endl << endl;
|
||||
|
||||
const wordList names(cstrTable->toc());
|
||||
|
||||
wordList thisCmpts;
|
||||
thisCmpts.append(word::null);
|
||||
thisCmpts.append(CombustionModel::reactionThermo::typeName);
|
||||
thisCmpts.append(basicThermo::splitThermoName(thermo.thermoName(), 5));
|
||||
|
||||
wordList validNames;
|
||||
forAll(names, i)
|
||||
|
||||
List<wordList> validCmpts2;
|
||||
validCmpts2.append
|
||||
(
|
||||
// Header
|
||||
wordList
|
||||
({
|
||||
word::null,
|
||||
combustionModel::typeName,
|
||||
"reactionThermo"
|
||||
})
|
||||
);
|
||||
|
||||
List<wordList> validCmpts7;
|
||||
validCmpts7.append
|
||||
(
|
||||
// Header
|
||||
wordList
|
||||
({
|
||||
word::null,
|
||||
combustionModel::typeName,
|
||||
"reactionThermo",
|
||||
"transport",
|
||||
"thermo",
|
||||
"equationOfState",
|
||||
"specie",
|
||||
"energy"
|
||||
})
|
||||
);
|
||||
|
||||
for (const word& validName : cstrTable->sortedToc())
|
||||
{
|
||||
wordList cmpts(basicThermo::splitThermoName(names[i], 2));
|
||||
if (cmpts.size() != 2)
|
||||
wordList cmpts(basicThermo::splitThermoName(validName, 2));
|
||||
|
||||
if (cmpts.size() == 2)
|
||||
{
|
||||
cmpts = basicThermo::splitThermoName(names[i], 7);
|
||||
validCmpts2.append(cmpts);
|
||||
}
|
||||
else
|
||||
{
|
||||
cmpts = basicThermo::splitThermoName(validName, 7);
|
||||
if (cmpts.size() == 7)
|
||||
{
|
||||
validCmpts7.append(cmpts);
|
||||
}
|
||||
}
|
||||
|
||||
bool isValid = true;
|
||||
for (label i = 1; i < cmpts.size() && isValid; ++ i)
|
||||
for (label i = 1; i < cmpts.size() && isValid; ++i)
|
||||
{
|
||||
isValid = isValid && cmpts[i] == thisCmpts[i];
|
||||
}
|
||||
@ -120,49 +157,25 @@ Foam::autoPtr<CombustionModel> Foam::combustionModel::New
|
||||
}
|
||||
}
|
||||
|
||||
FatalErrorInFunction
|
||||
<< "Valid " << combustionModel::typeName << " types for this "
|
||||
<< "thermodynamic model are:" << endl << validNames << endl;
|
||||
|
||||
List<wordList> validCmpts2, validCmpts7;
|
||||
validCmpts2.append(wordList(2, word::null));
|
||||
validCmpts2[0][0] = combustionModel::typeName;
|
||||
validCmpts2[0][1] = "reactionThermo";
|
||||
validCmpts7.append(wordList(7, word::null));
|
||||
validCmpts7[0][0] = combustionModel::typeName;
|
||||
validCmpts7[0][1] = "reactionThermo";
|
||||
validCmpts7[0][2] = "transport";
|
||||
validCmpts7[0][3] = "thermo";
|
||||
validCmpts7[0][4] = "equationOfState";
|
||||
validCmpts7[0][5] = "specie";
|
||||
validCmpts7[0][6] = "energy";
|
||||
forAll(names, i)
|
||||
{
|
||||
const wordList cmpts2(basicThermo::splitThermoName(names[i], 2));
|
||||
const wordList cmpts7(basicThermo::splitThermoName(names[i], 7));
|
||||
if (cmpts2.size() == 2)
|
||||
{
|
||||
validCmpts2.append(cmpts2);
|
||||
}
|
||||
if (cmpts7.size() == 7)
|
||||
{
|
||||
validCmpts7.append(cmpts7);
|
||||
}
|
||||
}
|
||||
|
||||
FatalErrorInFunction
|
||||
FatalErrorInLookup
|
||||
(
|
||||
combustionModel::typeName,
|
||||
combModelName,
|
||||
*cstrTable
|
||||
)
|
||||
<< "All " << validCmpts2[0][0] << '/' << validCmpts2[0][1]
|
||||
<< " combinations are:" << endl << endl;
|
||||
printTable(validCmpts2, FatalErrorInFunction);
|
||||
<< " combinations are:" << nl << nl;
|
||||
|
||||
FatalErrorInFunction << endl;
|
||||
printTable(validCmpts2, FatalErrorInFunction)
|
||||
<< nl;
|
||||
|
||||
FatalErrorInFunction
|
||||
<< "All " << validCmpts7[0][0] << '/' << validCmpts7[0][1]
|
||||
<< "/thermoPhysics combinations are:" << endl << endl;
|
||||
printTable(validCmpts7, FatalErrorInFunction);
|
||||
<< "/thermoPhysics combinations are:" << nl << nl;
|
||||
|
||||
FatalErrorInFunction << exit(FatalError);
|
||||
printTable(validCmpts7, FatalErrorInFunction)
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<CombustionModel>
|
||||
|
||||
@ -91,8 +91,6 @@ Foam::displacementMotionSolver::New
|
||||
const pointIOField& points0
|
||||
)
|
||||
{
|
||||
//const word solverTypeName(solverDict.get<word>("solver"));
|
||||
|
||||
Info<< "Selecting motion solver: " << solverTypeName << endl;
|
||||
|
||||
const_cast<Time&>(mesh.time()).libs().open
|
||||
@ -113,12 +111,13 @@ Foam::displacementMotionSolver::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
solverDict,
|
||||
"solver",
|
||||
solverTypeName,
|
||||
*displacementConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<displacementMotionSolver>
|
||||
|
||||
@ -31,11 +31,11 @@ License
|
||||
|
||||
Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New
|
||||
(
|
||||
const dictionary& SBMFCoeffs,
|
||||
const dictionary& dict,
|
||||
const Time& runTime
|
||||
)
|
||||
{
|
||||
const word motionType(SBMFCoeffs.get<word>("solidBodyMotionFunction"));
|
||||
const word motionType(dict.get<word>("solidBodyMotionFunction"));
|
||||
|
||||
Info<< "Selecting solid-body motion function " << motionType << endl;
|
||||
|
||||
@ -43,15 +43,16 @@ Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"solidBodyMotionFunction",
|
||||
motionType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<solidBodyMotionFunction>(cstrIter()(SBMFCoeffs, runTime));
|
||||
return autoPtr<solidBodyMotionFunction>(cstrIter()(dict, runTime));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -134,12 +134,13 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
solverDict,
|
||||
"solver",
|
||||
solverName,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<motionSolver>(cstrIter()(mesh, solverDict));
|
||||
|
||||
@ -30,39 +30,36 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::engineMesh> Foam::engineMesh::New
|
||||
(
|
||||
const Foam::IOobject& io
|
||||
)
|
||||
Foam::autoPtr<Foam::engineMesh> Foam::engineMesh::New(const IOobject& io)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"engineGeometry",
|
||||
io.time().constant(),
|
||||
io.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).get<word>("engineMesh")
|
||||
"engineGeometry",
|
||||
io.time().constant(),
|
||||
io.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
const word modelType(dict.get<word>("engineMesh"));
|
||||
|
||||
Info<< "Selecting engineMesh " << modelType << endl;
|
||||
|
||||
auto cstrIter = IOobjectConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"engineMesh",
|
||||
modelType,
|
||||
*IOobjectConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<engineMesh>(cstrIter()(io));
|
||||
|
||||
@ -42,11 +42,11 @@ Foam::autoPtr<Foam::engineTime> Foam::engineTime::New
|
||||
{
|
||||
IFstream engineDictFile("."/constantName/dictName);
|
||||
|
||||
dictionary engineDict(engineDictFile);
|
||||
dictionary dict(engineDictFile);
|
||||
|
||||
const word engineType
|
||||
(
|
||||
engineDict.lookupOrDefault<word>("engineType", "crankConRod")
|
||||
dict.getOrDefault<word>("engineType", "crankConRod")
|
||||
);
|
||||
|
||||
Info<< "Selecting engine type " << engineType << endl;
|
||||
@ -55,12 +55,13 @@ Foam::autoPtr<Foam::engineTime> Foam::engineTime::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"engine",
|
||||
engineType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<engineTime>
|
||||
|
||||
@ -34,34 +34,34 @@ Foam::autoPtr<Foam::SRF::SRFModel> Foam::SRF::SRFModel::New
|
||||
const volVectorField& Urel
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"SRFProperties",
|
||||
Urel.time().constant(),
|
||||
Urel.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).get<word>("SRFModel")
|
||||
"SRFProperties",
|
||||
Urel.time().constant(),
|
||||
Urel.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
const word modelType(dict.get<word>("SRFModel"));
|
||||
|
||||
Info<< "Selecting SRFModel " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"SRFModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<SRFModel>(cstrIter()(Urel));
|
||||
|
||||
@ -88,22 +88,19 @@ Foam::autoPtr<Foam::fv::option> Foam::fv::option::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
coeffs,
|
||||
"fvOption",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<option>(cstrIter()(name, modelType, coeffs, mesh));
|
||||
}
|
||||
|
||||
|
||||
Foam::fv::option::~option()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::fv::option::isActive()
|
||||
|
||||
@ -184,7 +184,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~option();
|
||||
virtual ~option() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -46,12 +46,13 @@ Foam::autoPtr<Foam::porosityModel> Foam::porosityModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
typeName,
|
||||
modelType,
|
||||
*meshConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<porosityModel>
|
||||
|
||||
@ -62,10 +62,6 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
|
||||
{
|
||||
return patchTypeCstrIter()(p, iF);
|
||||
}
|
||||
else
|
||||
{
|
||||
return cstrIter()(p, iF);
|
||||
}
|
||||
}
|
||||
|
||||
return cstrIter()(p, iF);
|
||||
|
||||
@ -66,12 +66,13 @@ Foam::autoPtr<Foam::patchDistMethod> Foam::patchDistMethod::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"patchDistMethod",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict, mesh, patchIDs);
|
||||
@ -94,12 +95,13 @@ Foam::autoPtr<Foam::patchDistMethod> Foam::patchDistMethod::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"patchDistMethod",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict, mesh, patchIDs);
|
||||
|
||||
@ -49,12 +49,13 @@ Foam::functionObjects::fieldValue::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
typeName,
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<fieldValue>(cstrIter()(name, obr, dict));
|
||||
|
||||
@ -44,12 +44,13 @@ Foam::autoPtr<Foam::heatTransferCoeffModel> Foam::heatTransferCoeffModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"heatTransferCoeffModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<heatTransferCoeffModel>(cstrIter()(dict, mesh, TName));
|
||||
|
||||
@ -180,12 +180,13 @@ Foam::functionObjects::runTimePostPro::pathline::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"pathline",
|
||||
pathlineType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<pathline>(cstrIter()(parent, dict, colours));
|
||||
|
||||
@ -143,12 +143,13 @@ Foam::functionObjects::runTimePostPro::pointData::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"pointData",
|
||||
pointDataType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<pointData>(cstrIter()(parent, dict, colours));
|
||||
|
||||
@ -256,12 +256,13 @@ Foam::functionObjects::runTimePostPro::surface::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"surface",
|
||||
surfaceType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<surface>(cstrIter()(parent, dict, colours));
|
||||
|
||||
@ -44,12 +44,13 @@ Foam::functionObjects::runTimeControls::runTimeCondition::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"runTimeCondition",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
@ -49,10 +49,10 @@ Foam::motionDiffusivity::motionDiffusivity(const fvMesh& mesh)
|
||||
Foam::autoPtr<Foam::motionDiffusivity> Foam::motionDiffusivity::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
Istream& mdData
|
||||
Istream& is
|
||||
)
|
||||
{
|
||||
const word modelType(mdData);
|
||||
const word modelType(is);
|
||||
|
||||
Info<< "Selecting motion diffusion: " << modelType << endl;
|
||||
|
||||
@ -60,15 +60,16 @@ Foam::autoPtr<Foam::motionDiffusivity> Foam::motionDiffusivity::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
is,
|
||||
"diffusion",
|
||||
modelType,
|
||||
*IstreamConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<motionDiffusivity>(cstrIter()(mesh, mdData));
|
||||
return autoPtr<motionDiffusivity>(cstrIter()(mesh, is));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -69,9 +69,9 @@ Foam::motionInterpolation::New(const fvMesh& mesh)
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::motionInterpolation>
|
||||
Foam::motionInterpolation::New(const fvMesh& mesh, Istream& entry)
|
||||
Foam::motionInterpolation::New(const fvMesh& mesh, Istream& is)
|
||||
{
|
||||
const word modelType(entry);
|
||||
const word modelType(is);
|
||||
|
||||
Info<< "Selecting motion interpolation: " << modelType << endl;
|
||||
|
||||
@ -79,15 +79,16 @@ Foam::motionInterpolation::New(const fvMesh& mesh, Istream& entry)
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
is,
|
||||
"interpolation",
|
||||
modelType,
|
||||
*IstreamConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<motionInterpolation>(cstrIter()(mesh, entry));
|
||||
return autoPtr<motionInterpolation>(cstrIter()(mesh, is));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -78,12 +78,13 @@ Foam::autoPtr<Foam::profileModel> Foam::profileModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"profileModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<profileModel>(cstrIter()(dict, modelName));
|
||||
|
||||
@ -43,12 +43,13 @@ Foam::autoPtr<Foam::trimModel> Foam::trimModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
typeName,
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<trimModel>(cstrIter()(rotor, dict));
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::BinaryCollisionModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"BinaryCollisionModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<BinaryCollisionModel<CloudType>>
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::InflowBoundaryModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"InflowBoundaryModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<InflowBoundaryModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::WallInteractionModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"WallInteractionModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<WallInteractionModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -43,12 +43,13 @@ Foam::autoPtr<Foam::distributionModel> Foam::distributionModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"distribution model",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
const dictionary distributionDict =
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::autoPtr<Foam::integrationScheme> Foam::integrationScheme::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"integration scheme",
|
||||
modelType,
|
||||
*wordConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<integrationScheme>(cstrIter()());
|
||||
|
||||
@ -46,12 +46,13 @@ Foam::CloudFunctionObject<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"cloudFunctionObject",
|
||||
objectType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<CloudFunctionObject<CloudType>>
|
||||
|
||||
@ -43,12 +43,13 @@ Foam::HeterogeneousReactingModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"heterogeneousReactingModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<HeterogeneousReactingModel<CloudType>>
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::CollisionModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"collisionModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<CollisionModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::PairModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"pairModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<PairModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::WallModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"wallModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<WallModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::DispersionModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"dispersionModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<DispersionModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::InjectionModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"injectionModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<InjectionModel<CloudType>>(cstrIter()(dict, owner));
|
||||
@ -73,12 +74,13 @@ Foam::InjectionModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"injectionModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::ParticleForce<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"particle force",
|
||||
forceType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<ParticleForce<CloudType>>
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::PatchInteractionModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"patchInteractionModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<PatchInteractionModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -46,12 +46,13 @@ Foam::StochasticCollisionModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"stochasticCollisionModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<StochasticCollisionModel<CloudType>>
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::SurfaceFilmModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"surfaceFilmModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<SurfaceFilmModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -94,12 +94,13 @@ Foam::AveragingMethod<Type>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"averaging limiter",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<AveragingMethod<Type>>(cstrIter()(io, dict, mesh));
|
||||
|
||||
@ -66,12 +66,13 @@ Foam::CorrectionLimitingMethod::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"correction limiter",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<CorrectionLimitingMethod>(cstrIter()(dict));
|
||||
|
||||
@ -90,12 +90,13 @@ Foam::DampingModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"damping model",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<DampingModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -93,12 +93,13 @@ Foam::IsotropyModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"isotropy model",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<IsotropyModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -92,12 +92,13 @@ Foam::PackingModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"packing model",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<PackingModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -71,12 +71,13 @@ Foam::autoPtr<Foam::ParticleStressModel> Foam::ParticleStressModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"particle stress model",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<ParticleStressModel>(cstrIter()(dict));
|
||||
|
||||
@ -75,12 +75,13 @@ Foam::autoPtr<Foam::TimeScaleModel> Foam::TimeScaleModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"time scale model",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<TimeScaleModel>(cstrIter()(dict));
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::CompositionModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"compositionModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<CompositionModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::PhaseChangeModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"phaseChangeModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<PhaseChangeModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::DevolatilisationModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"devolatilisationModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<DevolatilisationModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::SurfaceReactionModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"surfaceReactionModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<SurfaceReactionModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::HeatTransferModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"heatTransferModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<HeatTransferModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -33,11 +33,11 @@ License
|
||||
Foam::autoPtr<Foam::energyScalingFunction> Foam::energyScalingFunction::New
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& propDict,
|
||||
const dictionary& dict,
|
||||
const pairPotential& pairPot
|
||||
)
|
||||
{
|
||||
const word modelType(propDict.get<word>("energyScalingFunction"));
|
||||
const word modelType(dict.get<word>("energyScalingFunction"));
|
||||
|
||||
Info<< "Selecting energy scaling function "
|
||||
<< modelType << " for "
|
||||
@ -47,15 +47,16 @@ Foam::autoPtr<Foam::energyScalingFunction> Foam::energyScalingFunction::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"energyScalingFunction",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<energyScalingFunction>(cstrIter()(name, propDict, pairPot));
|
||||
return autoPtr<energyScalingFunction>(cstrIter()(name, dict, pairPot));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -33,10 +33,10 @@ License
|
||||
Foam::autoPtr<Foam::pairPotential> Foam::pairPotential::New
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& propDict
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
const word modelType(propDict.get<word>("pairPotential"));
|
||||
const word modelType(dict.get<word>("pairPotential"));
|
||||
|
||||
Info<< nl << "Selecting intermolecular pair potential "
|
||||
<< modelType << " for "
|
||||
@ -46,15 +46,16 @@ Foam::autoPtr<Foam::pairPotential> Foam::pairPotential::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"pairPotential",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<pairPotential>(cstrIter()(name, propDict));
|
||||
return autoPtr<pairPotential>(cstrIter()(name, dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -32,10 +32,10 @@ License
|
||||
Foam::autoPtr<Foam::tetherPotential> Foam::tetherPotential::New
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& propDict
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
const word modelType(propDict.get<word>("tetherPotential"));
|
||||
const word modelType(dict.get<word>("tetherPotential"));
|
||||
|
||||
Info<< nl << "Selecting tether potential " << modelType
|
||||
<< " for " << name << endl;
|
||||
@ -44,15 +44,16 @@ Foam::autoPtr<Foam::tetherPotential> Foam::tetherPotential::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"tetherPotential",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<tetherPotential>(cstrIter()(name, propDict));
|
||||
return autoPtr<tetherPotential>(cstrIter()(name, dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::AtomizationModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"atomizationModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<AtomizationModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -45,12 +45,13 @@ Foam::BreakupModel<CloudType>::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"breakupModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<BreakupModel<CloudType>>(cstrIter()(dict, owner));
|
||||
|
||||
@ -90,12 +90,13 @@ Foam::autoPtr<Foam::blockEdge> Foam::blockEdge::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"blockEdge",
|
||||
edgeType,
|
||||
*IstreamConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<blockEdge>(cstrIter()(dict, index, geometry, points, is));
|
||||
|
||||
@ -87,12 +87,13 @@ Foam::autoPtr<Foam::blockFace> Foam::blockFace::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"blockFace",
|
||||
faceType,
|
||||
*IstreamConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<blockFace>(cstrIter()(dict, index, geometry, is));
|
||||
|
||||
@ -81,12 +81,13 @@ Foam::autoPtr<Foam::blockVertex> Foam::blockVertex::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"blockVertex",
|
||||
faceType,
|
||||
*IstreamConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<blockVertex>(cstrIter()(dict, index, geometry, is));
|
||||
|
||||
@ -42,12 +42,13 @@ Foam::autoPtr<Foam::extrudeModel> Foam::extrudeModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"extrudeModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<extrudeModel>(cstrIter()(dict));
|
||||
|
||||
@ -147,12 +147,13 @@ Foam::externalDisplacementMeshMover::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"externalDisplacementMeshMover",
|
||||
type,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<externalDisplacementMeshMover>
|
||||
|
||||
@ -104,10 +104,8 @@ void Foam::edgeMesh::write
|
||||
*writefileExtensionMemberFunctionTablePtr_
|
||||
) << exit(FatalError);
|
||||
}
|
||||
else
|
||||
{
|
||||
mfIter()(name, mesh);
|
||||
}
|
||||
|
||||
mfIter()(name, mesh);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -49,12 +49,13 @@ Foam::autoPtr<Foam::searchableSurface> Foam::searchableSurface::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"searchableSurface",
|
||||
searchableSurfaceType,
|
||||
*dictConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<searchableSurface>(cstrIter()(io, dict));
|
||||
|
||||
@ -57,12 +57,13 @@ Foam::autoPtr<Foam::topoSetCellSource> Foam::topoSetCellSource::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"topoSetCellSource",
|
||||
sourceType,
|
||||
*wordConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<topoSetCellSource>(cstrIter()(mesh, dict));
|
||||
|
||||
@ -57,12 +57,13 @@ Foam::autoPtr<Foam::topoSetFaceSource> Foam::topoSetFaceSource::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"topoSetFaceSource",
|
||||
sourceType,
|
||||
*wordConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<topoSetFaceSource>(cstrIter()(mesh, dict));
|
||||
|
||||
@ -57,12 +57,13 @@ Foam::autoPtr<Foam::topoSetPointSource> Foam::topoSetPointSource::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"topoSetPointSource",
|
||||
sourceType,
|
||||
*wordConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<topoSetPointSource>(cstrIter()(mesh, dict));
|
||||
|
||||
@ -114,12 +114,13 @@ Foam::autoPtr<Foam::topoSetSource> Foam::topoSetSource::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"topoSetSource",
|
||||
topoSetSourceType,
|
||||
*wordConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<topoSetSource>(cstrIter()(mesh, dict));
|
||||
|
||||
@ -72,12 +72,13 @@ Foam::autoPtr<Foam::fv::optionAdjoint> Foam::fv::optionAdjoint::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
coeffs,
|
||||
"model",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<optionAdjoint>(cstrIter()(name, modelType, coeffs, mesh));
|
||||
|
||||
@ -119,12 +119,13 @@ autoPtr<objectiveManager> objectiveManager::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"objectiveManagerType",
|
||||
managerType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<objectiveManager>
|
||||
|
||||
@ -109,12 +109,13 @@ autoPtr<objectiveIncompressible> objectiveIncompressible::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"objectiveIncompressible",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<objectiveIncompressible>
|
||||
|
||||
@ -155,12 +155,13 @@ autoPtr<objective> objective::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"objective",
|
||||
objectiveType,
|
||||
*objectiveConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<objective>
|
||||
|
||||
@ -102,12 +102,13 @@ autoPtr<lineSearch> lineSearch::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"lineSearch",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
lineSrch.reset((cstrIter()(dict, time)).ptr());
|
||||
|
||||
@ -59,12 +59,13 @@ autoPtr<stepUpdate> stepUpdate::New(const dictionary& dict)
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"stepUpdate",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<stepUpdate>(cstrIter()(dict));
|
||||
|
||||
@ -146,22 +146,20 @@ Foam::autoPtr<Foam::optimisationManager> Foam::optimisationManager::New
|
||||
fvMesh& mesh
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"optimisationDict",
|
||||
mesh.time().system(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).get<word>("optimisationManager")
|
||||
"optimisationDict",
|
||||
mesh.time().system(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
const word modelType(dict.get<word>("optimisationManager"));
|
||||
|
||||
Info<< "optimisationManager type : " << modelType << endl;
|
||||
|
||||
@ -169,12 +167,13 @@ Foam::autoPtr<Foam::optimisationManager> Foam::optimisationManager::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"optimisationManager",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<optimisationManager>(cstrIter()(mesh));
|
||||
|
||||
@ -131,12 +131,13 @@ autoPtr<optimisationType> optimisationType::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"optimisationType",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<optimisationType>
|
||||
|
||||
@ -239,12 +239,13 @@ Foam::autoPtr<Foam::updateMethod> Foam::updateMethod::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"updateMethod",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<updateMethod>(cstrIter()(mesh, dict));
|
||||
|
||||
@ -87,12 +87,13 @@ Foam::incompressibleAdjointSolver::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"incompressibleAdjointSolver",
|
||||
solverType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
@ -91,12 +91,13 @@ Foam::incompressiblePrimalSolver::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"incompressiblePrimalSolver",
|
||||
solverType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
@ -166,34 +166,34 @@ autoPtr<adjointRASModel> adjointRASModel::New
|
||||
const word& adjointTurbulenceModelName
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"adjointRASProperties",
|
||||
primalVars.U().time().constant(),
|
||||
primalVars.U().db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).get<word>("adjointRASModel")
|
||||
"adjointRASProperties",
|
||||
primalVars.U().time().constant(),
|
||||
primalVars.U().db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
const word modelType(dict.get<word>("adjointRASModel"));
|
||||
|
||||
Info<< "Selecting adjointRAS turbulence model " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"adjointRASModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<adjointRASModel>
|
||||
|
||||
@ -186,34 +186,36 @@ autoPtr<RASModelVariables> RASModelVariables::New
|
||||
const solverControl& SolverControl
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary modelDict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
turbulenceModel::propertiesName,
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).subOrEmptyDict("RAS").lookupOrDefault<word>("RASModel", "laminar")
|
||||
turbulenceModel::propertiesName,
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
const dictionary dict(modelDict.subOrEmptyDict("RAS"));
|
||||
|
||||
const word modelType(dict.getOrDefault<word>("RASModel", "laminar"));
|
||||
|
||||
Info<< "Creating references for RASModel variables : " << modelType << endl;
|
||||
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"RASModelVariables",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<RASModelVariables>(cstrIter()(mesh, SolverControl));
|
||||
|
||||
@ -73,12 +73,13 @@ Foam::autoPtr<Foam::cellCellStencil> Foam::cellCellStencil::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"cellCellStencil",
|
||||
stencilType,
|
||||
*meshConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<cellCellStencil>(cstrIter()(mesh, dict, update));
|
||||
|
||||
@ -365,12 +365,13 @@ Foam::autoPtr<Foam::decompositionMethod> Foam::decompositionMethod::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
decompDict,
|
||||
"decompositionMethod",
|
||||
methodType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
// verbose
|
||||
|
||||
@ -43,12 +43,13 @@ Foam::wallBoilingModels::CHFModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"CHFModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
|
||||
@ -41,12 +41,13 @@ Foam::wallBoilingModels::CHFSubCoolModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"CHFSubCoolModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
|
||||
@ -41,12 +41,13 @@ Foam::wallBoilingModels::LeidenfrostModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"LeidenfrostModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
|
||||
@ -43,12 +43,13 @@ Foam::wallBoilingModels::MHFModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"MHFModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
|
||||
@ -43,12 +43,13 @@ Foam::wallBoilingModels::TDNBModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"TDNBModelType",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
|
||||
@ -43,12 +43,13 @@ Foam::wallBoilingModels::departureDiameterModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"departureDiameterModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
|
||||
@ -43,12 +43,13 @@ Foam::wallBoilingModels::departureFrequencyModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"departureFrequencyModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
|
||||
@ -42,12 +42,13 @@ Foam::wallBoilingModels::filmBoilingModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"filmBoilingModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
|
||||
@ -43,12 +43,13 @@ Foam::wallBoilingModels::nucleationSiteModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"nucleationSiteModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << abort(FatalError);
|
||||
) << abort(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user