ENH: use FatalErrorInLookup macros (#1362)

This commit is contained in:
Mark Olesen
2019-07-12 18:00:00 +02:00
parent 26f981aaf1
commit fef6cc1818
290 changed files with 2634 additions and 2736 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2015 OpenFOAM Foundation
@ -46,12 +46,12 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown PDRDragModel type "
<< modelType << nl << nl
<< "Valid PDRDragModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"PDRDragModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<PDRDragModel>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2015 OpenFOAM Foundation
@ -45,12 +45,12 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown XiEqModel type "
<< modelType << nl << nl
<< "Valid XiEqModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"XiEqModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<XiEqModel>(cstrIter()(propDict, thermo, turbulence, Su));

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2015 OpenFOAM Foundation
@ -45,12 +45,12 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown XiGModel type "
<< modelType << nl << nl
<< "Valid XiGModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"XiGModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<XiGModel>(cstrIter()(propDict, thermo, turbulence, Su));

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2015 OpenFOAM Foundation
@ -48,12 +48,12 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown XiModel type "
<< modelType << nl << nl
<< "Valid XiModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"XiModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<XiModel>

View File

@ -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) 2014-2015 OpenFOAM Foundation
@ -47,12 +47,12 @@ Foam::autoPtr<Foam::mixtureViscosityModel> Foam::mixtureViscosityModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown mixtureViscosityModel type "
<< modelType << nl << nl
<< "Valid mixtureViscosityModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"mixtureViscosityModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<mixtureViscosityModel>

View File

@ -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) 2014-2017 OpenFOAM Foundation
@ -114,12 +114,12 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown time scale model type "
<< modelType << nl << nl
<< "Valid time scale model types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
FatalErrorInLookup
(
"relative velocity",
modelType,
*dictionaryConstructorTablePtr_
) << abort(FatalError);
}
return

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,11 +43,13 @@ Foam::radiation::reflectionModel::New
if (!cstrIter.found())
{
FatalIOErrorInFunction(dict)
<< "Unknown reflectionModel type " << modelType << nl << nl
<< "Valid types :" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
FatalIOErrorInLookup
(
dict,
"reflectionModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<reflectionModel>(cstrIter()(dict, mesh));

View File

@ -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) 2017 OpenFOAM Foundation
@ -38,7 +38,7 @@ Foam::interfaceCompositionModel::New
const phasePair& pair
)
{
word interfaceCompositionModelType
const word modelType
(
dict.get<word>("type")
+ "<"
@ -49,19 +49,18 @@ Foam::interfaceCompositionModel::New
);
Info<< "Selecting interfaceCompositionModel for "
<< pair << ": " << interfaceCompositionModelType << endl;
<< pair << ": " << modelType << endl;
const auto cstrIter =
dictionaryConstructorTablePtr_->cfind(interfaceCompositionModelType);
const auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown interfaceCompositionModelType type "
<< interfaceCompositionModelType << nl << nl
<< "Valid interfaceCompositionModel types are : " << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"interfaceCompositionModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(dict, pair);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,12 +43,12 @@ Foam::autoPtr<Foam::porousModel> Foam::porousModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown modelType type "
<< modelType << endl << endl
<< "Valid porousModel types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"porousModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(dict, mesh);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,12 +43,12 @@ Foam::autoPtr<Foam::surfaceTensionModel> Foam::surfaceTensionModel::New
if (!cstrIter.found())
{
FatalIOErrorInFunction(dict)
<< "Unknown surfaceTensionModel type "
<< surfaceTensionModelType << endl << endl
<< "Valid modelType types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
FatalErrorInLookup
(
"surfaceTensionModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(dict, pair, true);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,12 +43,12 @@ Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown phaseModel type "
<< modelType << endl << endl
<< "Valid phaseModel types are : " << endl
<< phaseSystemConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"phaseModel",
modelType,
*phaseSystemConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(fluid, phaseName);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
const fvMesh& mesh
)
{
const word multiphaseSystemType
const word systemType
(
IOdictionary
(
@ -48,22 +48,21 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
).get<word>("type")
);
Info<< "Selecting multiphaseSystem " << multiphaseSystemType << endl;
Info<< "Selecting multiphaseSystem " << systemType << endl;
const auto cstrIter =
dictionaryConstructorTablePtr_->cfind(multiphaseSystemType);
const auto cstrIter = dictionaryConstructorTablePtr_->cfind(systemType);
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown multiphaseSystemType type "
<< multiphaseSystemType << endl
<< "Valid multiphaseSystem types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"multiphaseSystem",
systemType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<multiphaseSystem> (cstrIter()(mesh));
return autoPtr<multiphaseSystem>(cstrIter()(mesh));
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,22 +35,20 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
const fvMesh& mesh
)
{
IOdictionary phaseChangePropertiesDict
(
IOobject
(
"phaseChangeProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
);
const word modelType
(
phaseChangePropertiesDict.get<word>("phaseChangeTwoPhaseModel")
IOdictionary
(
IOobject
(
"phaseChangeProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false // Do not register
)
).get<word>("phaseChangeTwoPhaseModel")
);
Info<< "Selecting phaseChange model " << modelType << endl;
@ -59,16 +57,19 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown temperaturePhaseChangeTwoPhaseMixture type "
<< modelType << nl << nl
<< "Valid temperaturePhaseChangeTwoPhaseMixture types :" << endl
<< componentsConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"temperaturePhaseChangeTwoPhaseMixture",
modelType,
*componentsConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<temperaturePhaseChangeTwoPhaseMixture>
(cstrIter()(thermo, mesh));
return
autoPtr<temperaturePhaseChangeTwoPhaseMixture>
(
cstrIter()(thermo, mesh)
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2015 OpenFOAM Foundation
@ -37,22 +37,20 @@ Foam::phaseChangeTwoPhaseMixture::New
const surfaceScalarField& phi
)
{
IOdictionary transportPropertiesDict
(
IOobject
(
"transportProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
);
const word modelType
(
transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture")
IOdictionary
(
IOobject
(
"transportProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ,
IOobject::NO_WRITE,
false // Do not register
)
).get<word>("phaseChangeTwoPhaseMixture")
);
Info<< "Selecting phaseChange model " << modelType << endl;
@ -61,12 +59,12 @@ Foam::phaseChangeTwoPhaseMixture::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown phaseChangeTwoPhaseMixture type "
<< modelType << nl << nl
<< "Valid phaseChangeTwoPhaseMixture types :" << endl
<< componentsConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"phaseChangeTwoPhaseMixture",
modelType,
*componentsConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<phaseChangeTwoPhaseMixture>(cstrIter()(U, phi));

View File

@ -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-2015 OpenFOAM Foundation
@ -47,12 +47,12 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown dragModel type "
<< modelType << nl << nl
<< "Valid dragModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"dragModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(interfaceDict, phase1, phase2);

View File

@ -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-2015 OpenFOAM Foundation
@ -39,7 +39,7 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
{
const word modelType
(
interfaceDict.lookup("heatTransferModel" + phase1.name())
interfaceDict.get<word>("heatTransferModel" + phase1.name())
);
Info<< "Selecting heatTransferModel for phase "
@ -51,12 +51,12 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown heatTransferModel type "
<< modelType << nl << nl
<< "Valid heatTransferModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"heatTransferModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(interfaceDict, alpha1, phase1, phase2);

View File

@ -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
@ -46,12 +46,12 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown diameterModel type "
<< modelType << nl << nl
<< "Valid diameterModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"diameterModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()

View File

@ -2,8 +2,10 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2017-2019 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -106,9 +108,13 @@ void Foam::functionObjects::sizeDistribution::initialise
default:
{
FatalIOErrorInFunction(dict)
<< "Unknown functionType. Valid types are:"
<< functionTypeNames_ << nl << exit(FatalIOError);
FatalIOErrorInLookup
(
dict,
"functionType",
word::null,
functionTypeNames_
) << exit(FatalIOError);
}
}
@ -126,9 +132,13 @@ void Foam::functionObjects::sizeDistribution::initialise
default:
{
FatalIOErrorInFunction(dict)
<< "Unknown abszissaType. Valid types are:"
<< abszissaTypeNames_ << nl << exit(FatalIOError);
FatalIOErrorInLookup
(
dict,
"abszissaType",
word::null,
abszissaTypeNames_
) << exit(FatalIOError);
}
}
@ -139,7 +149,7 @@ void Foam::functionObjects::sizeDistribution::initialise
FatalIOErrorInFunction(dict)
<< type() << " " << name() << ": "
<< selectionModeTypeNames_[selectionModeType_]
<< "(" << selectionModeTypeName_ << "):" << nl
<< '(' << selectionModeTypeName_ << "):" << nl
<< " Selection has no cells" << exit(FatalIOError);
}
@ -147,7 +157,7 @@ void Foam::functionObjects::sizeDistribution::initialise
Info<< type() << " " << name() << ":"
<< selectionModeTypeNames_[selectionModeType_]
<< "(" << selectionModeTypeName_ << "):" << nl
<< '(' << selectionModeTypeName_ << "):" << nl
<< " total cells = " << nCells_ << nl
<< " total volume = " << volume_
<< nl << endl;
@ -160,7 +170,7 @@ void Foam::functionObjects::sizeDistribution::setCellZoneCells()
{
case rtCellZone:
{
dict().lookup("cellZone") >> selectionModeTypeName_;
dict().readEntry("cellZone", selectionModeTypeName_);
label zoneId =
mesh().cellZones().findZoneID(selectionModeTypeName_);
@ -188,9 +198,13 @@ void Foam::functionObjects::sizeDistribution::setCellZoneCells()
default:
{
FatalIOErrorInFunction(dict_)
<< "Unknown selectionMode type. Valid selectionMode types are:"
<< selectionModeTypeNames_ << nl << exit(FatalIOError);
FatalIOErrorInLookup
(
dict_,
"selectionMode",
word::null,
selectionModeTypeNames_
) << exit(FatalIOError);
}
}
}

View File

@ -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) 2014-2015 OpenFOAM Foundation
@ -46,12 +46,12 @@ Foam::aspectRatioModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown aspectRatioModel type "
<< modelType << nl << nl
<< "Valid aspectRatioModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"aspectRatioModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(dict, pair);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2015 OpenFOAM Foundation
@ -45,12 +45,12 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown dragModel type "
<< modelType << nl << nl
<< "Valid dragModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"dragModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(dict, pair, true);

View File

@ -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-2015 OpenFOAM Foundation
@ -45,12 +45,12 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown heatTransferModel type "
<< modelType << nl << nl
<< "Valid heatTransferModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"heatTransferModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(dict, pair);

View File

@ -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) 2014-2015 OpenFOAM Foundation
@ -45,12 +45,12 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown liftModel type "
<< modelType << nl << nl
<< "Valid liftModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"liftModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(dict, pair);

View File

@ -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) 2014-2015 OpenFOAM Foundation
@ -46,12 +46,12 @@ Foam::swarmCorrection::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown swarmCorrection type "
<< modelType << nl << nl
<< "Valid swarmCorrection types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"swarmCorrection",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(dict, pair);

View File

@ -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) 2014-2015 OpenFOAM Foundation
@ -46,12 +46,12 @@ Foam::turbulentDispersionModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown turbulentDispersionModel type "
<< modelType << nl << nl
<< "Valid turbulentDispersionModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"turbulentDispersionModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(dict, pair);

View File

@ -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) 2014-2015 OpenFOAM Foundation
@ -45,12 +45,12 @@ Foam::autoPtr<Foam::virtualMassModel> Foam::virtualMassModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown virtualMassModel type "
<< modelType << nl << nl
<< "Valid virtualMassModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"virtualMassModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(dict, pair, true);

View File

@ -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) 2014-2015 OpenFOAM Foundation
@ -45,12 +45,12 @@ Foam::autoPtr<Foam::wallLubricationModel> Foam::wallLubricationModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown wallLubricationModel type "
<< modelType << nl << nl
<< "Valid wallLubricationModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"wallLubricationModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(dict, pair);

View File

@ -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-2015 OpenFOAM Foundation
@ -43,12 +43,12 @@ Foam::kineticTheoryModels::conductivityModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown conductivityModel type "
<< modelType << nl << nl
<< "Valid conductivityModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"conductivityModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<conductivityModel>(cstrIter()(dict));

View File

@ -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-2015 OpenFOAM Foundation
@ -43,12 +43,12 @@ Foam::kineticTheoryModels::frictionalStressModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown frictionalStressModel type "
<< modelType << nl << nl
<< "Valid frictionalStressModelType types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"frictionalStressModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<frictionalStressModel>(cstrIter()(dict));

View File

@ -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-2015 OpenFOAM Foundation
@ -43,12 +43,12 @@ Foam::kineticTheoryModels::granularPressureModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown granularPressureModel type "
<< modelType << nl << nl
<< "Valid granularPressureModel types :" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"granularPressureModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<granularPressureModel>(cstrIter()(dict));

View File

@ -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-2015 OpenFOAM Foundation
@ -43,12 +43,12 @@ Foam::kineticTheoryModels::radialModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown radialModel type "
<< modelType << nl << nl
<< "Valid radialModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"radialModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<radialModel>(cstrIter()(dict));

View File

@ -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-2015 OpenFOAM Foundation
@ -35,20 +35,20 @@ Foam::kineticTheoryModels::viscosityModel::New
const dictionary& dict
)
{
const word modelName(dict.get<word>("viscosityModel"));
const word modelType(dict.get<word>("viscosityModel"));
Info<< "Selecting viscosityModel " << modelName << endl;
Info<< "Selecting viscosityModel " << modelType << endl;
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelName);
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown viscosityModel type "
<< modelName << nl << nl
<< "Valid viscosityModel types :" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"viscosityModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return autoPtr<viscosityModel>(cstrIter()(dict));

View File

@ -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) 2014-2015 OpenFOAM Foundation
@ -35,21 +35,21 @@ Foam::autoPtr<Foam::blendingMethod> Foam::blendingMethod::New
const wordList& phaseNames
)
{
const word methodName(dict.get<word>("type"));
const word modelType(dict.get<word>("type"));
Info<< "Selecting " << dict.dictName() << " blending method: "
<< methodName << endl;
<< modelType << endl;
auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodName);
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown blendingMethod type "
<< methodName << nl << nl
<< "Valid blendingMethod types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"blendingMethod",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()(dict, phaseNames);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2015 OpenFOAM Foundation
@ -57,12 +57,13 @@ Foam::diameterModels::IATEsource::New
if (!cstrIter.found())
{
FatalIOErrorInFunction(dict)
<< "Unknown IATE source type "
<< type << nl << nl
<< "Valid IATE source types :" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
FatalIOErrorInLookup
(
dict,
"IATEsource",
type,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<IATEsource>(cstrIter()(iate, dict));

View File

@ -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
@ -46,12 +46,12 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown diameterModel type "
<< modelType << nl << nl
<< "Valid diameterModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalErrorInLookup
(
"diameterModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
}
return cstrIter()