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
@ -37,34 +37,34 @@ Foam::phaseChangeTwoPhaseMixture::New
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).get<word>("phaseChangeTwoPhaseMixture")
|
||||
"transportProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
const word modelType(dict.get<word>("phaseChangeTwoPhaseMixture"));
|
||||
|
||||
Info<< "Selecting phaseChange model " << modelType << endl;
|
||||
|
||||
auto cstrIter = componentsConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"phaseChangeTwoPhaseMixture",
|
||||
modelType,
|
||||
*componentsConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<phaseChangeTwoPhaseMixture>(cstrIter()(U, phi));
|
||||
|
||||
Reference in New Issue
Block a user