...
 
Commits (44)
api=1906
api=1907
patch=190708
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011, 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2017 OpenFOAM Foundation
......@@ -66,6 +66,8 @@ int main(int argc, char *argv[])
"Laplace equation solver for a scalar quantity."
);
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
......
......@@ -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
......@@ -31,14 +31,14 @@ License
Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
(
const dictionary& PDRProperties,
const dictionary& dict,
const compressible::RASModel& turbulence,
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& phi
)
{
const word modelType(PDRProperties.get<word>("PDRDragModel"));
const word modelType(dict.get<word>("PDRDragModel"));
Info<< "Selecting drag model " << modelType << endl;
......@@ -46,16 +46,17 @@ 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);
FatalIOErrorInLookup
(
dict,
"PDRDragModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<PDRDragModel>
(cstrIter()(PDRProperties, turbulence, rho, U, phi));
(cstrIter()(dict, turbulence, rho, U, phi));
}
......
......@@ -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
......@@ -31,13 +31,13 @@ License
Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
(
const dictionary& propDict,
const dictionary& dict,
const psiuReactionThermo& thermo,
const compressible::RASModel& turbulence,
const volScalarField& Su
)
{
const word modelType(propDict.get<word>("XiEqModel"));
const word modelType(dict.get<word>("XiEqModel"));
Info<< "Selecting flame-wrinkling model " << modelType << endl;
......@@ -45,15 +45,16 @@ 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);
FatalIOErrorInLookup
(
dict,
"XiEqModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<XiEqModel>(cstrIter()(propDict, thermo, turbulence, Su));
return autoPtr<XiEqModel>(cstrIter()(dict, thermo, turbulence, Su));
}
......
......@@ -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
......@@ -31,13 +31,13 @@ License
Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
(
const dictionary& propDict,
const dictionary& dict,
const psiuReactionThermo& thermo,
const compressible::RASModel& turbulence,
const volScalarField& Su
)
{
const word modelType(propDict.get<word>("XiGModel"));
const word modelType(dict.get<word>("XiGModel"));
Info<< "Selecting flame-wrinkling model " << modelType << endl;
......@@ -45,15 +45,16 @@ 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);
FatalIOErrorInLookup
(
dict,
"XiGModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<XiGModel>(cstrIter()(propDict, thermo, turbulence, Su));
return autoPtr<XiGModel>(cstrIter()(dict, thermo, turbulence, Su));
}
......
......@@ -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
......@@ -31,7 +31,7 @@ License
Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
(
const dictionary& propDict,
const dictionary& dict,
const psiuReactionThermo& thermo,
const compressible::RASModel& turbulence,
const volScalarField& Su,
......@@ -40,7 +40,7 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
const surfaceScalarField& phi
)
{
const word modelType(propDict.get<word>("XiModel"));
const word modelType(dict.get<word>("XiModel"));
Info<< "Selecting flame-wrinkling model " << modelType << endl;
......@@ -48,16 +48,17 @@ 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);
FatalIOErrorInLookup
(
dict,
"XiModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<XiModel>
(cstrIter()(propDict, thermo, turbulence, Su, rho, b, phi));
(cstrIter()(dict, thermo, turbulence, Su, rho, b, phi));
}
......
......@@ -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-2016 OpenFOAM Foundation
......@@ -75,6 +75,8 @@ int main(int argc, char *argv[])
" of Newtonian fluids."
);
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
......
......@@ -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
......@@ -34,12 +34,12 @@ License
Foam::autoPtr<Foam::mixtureViscosityModel> Foam::mixtureViscosityModel::New
(
const word& name,
const dictionary& viscosityProperties,
const dictionary& dict,
const volVectorField& U,
const surfaceScalarField& phi
)
{
const word modelType(viscosityProperties.get<word>("transportModel"));
const word modelType(dict.get<word>("transportModel"));
Info<< "Selecting incompressible transport model " << modelType << endl;
......@@ -47,16 +47,17 @@ 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);
FatalIOErrorInLookup
(
dict,
"mixtureViscosityModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<mixtureViscosityModel>
(cstrIter()(name, viscosityProperties, U, phi));
(cstrIter()(name, dict, U, phi));
}
......
......@@ -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,13 @@ 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);
FatalIOErrorInLookup
(
dict,
"relative velocity",
modelType,
*dictionaryConstructorTablePtr_
) << abort(FatalIOError);
}
return
......
......@@ -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));
......
......@@ -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,19 @@ 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);
FatalIOErrorInLookup
(
dict,
"interfaceCompositionModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return cstrIter()(dict, pair);
......
......@@ -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,13 @@ 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);
FatalIOErrorInLookup
(
dict,
"porousModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return cstrIter()(dict, mesh);
......
......@@ -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,13 @@ 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);
FatalIOErrorInLookup
(
dict,
"surfaceTensionModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return cstrIter()(dict, pair, true);
......
......@@ -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
......@@ -34,7 +34,9 @@ Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New
const word& phaseName
)
{
const word modelType(fluid.subDict(phaseName).get<word>("type"));
const dictionary& dict = fluid.subDict(phaseName);
const word modelType(dict.get<word>("type"));
Info<< "Selecting phaseModel for "
<< phaseName << ": " << modelType << endl;
......@@ -43,12 +45,13 @@ 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);
FatalIOErrorInLookup
(
dict,
"phaseModel",
modelType,
*phaseSystemConstructorTablePtr_
) << exit(FatalIOError);
}
return cstrIter()(fluid, phaseName);
......
......@@ -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,38 +32,37 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
const fvMesh& mesh
)
{
const word multiphaseSystemType
const IOdictionary dict
(
IOdictionary
IOobject
(
IOobject
(
phasePropertiesName,
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).get<word>("type")
phasePropertiesName,
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false // Do not register
)
);
Info<< "Selecting multiphaseSystem " << multiphaseSystemType << endl;
const word systemType(dict.get<word>("type"));
const auto cstrIter =
dictionaryConstructorTablePtr_->cfind(multiphaseSystemType);
Info<< "Selecting multiphaseSystem " << systemType << endl;
const auto cstrIter = dictionaryConstructorTablePtr_->cfind(systemType);
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown multiphaseSystemType type "
<< multiphaseSystemType << endl
<< "Valid multiphaseSystem types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalIOErrorInLookup
(
dict,
"multiphaseSystem",
systemType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<multiphaseSystem> (cstrIter()(mesh));
return autoPtr<multiphaseSystem>(cstrIter()(mesh));
}
......
......@@ -524,7 +524,7 @@ public:
//- Return the name of the thermo physics
virtual word thermoName() const
{
NotImplemented
NotImplemented;
return word();
}
......
......@@ -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,7 +35,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
const fvMesh& mesh
)
{
IOdictionary phaseChangePropertiesDict
const IOdictionary dict
(
IOobject
(
......@@ -44,14 +44,11 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
false // Do not register
)
);
const word modelType
(
phaseChangePropertiesDict.get<word>("phaseChangeTwoPhaseModel")
);
const word modelType(dict.get<word>("phaseChangeTwoPhaseModel"));
Info<< "Selecting phaseChange model " << modelType << endl;
......@@ -59,16 +56,20 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown temperaturePhaseChangeTwoPhaseMixture type "
<< modelType << nl << nl
<< "Valid temperaturePhaseChangeTwoPhaseMixture types :" << endl
<< componentsConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalIOErrorInLookup
(
dict,
"temperaturePhaseChangeTwoPhaseMixture",
modelType,
*componentsConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<temperaturePhaseChangeTwoPhaseMixture>
(cstrIter()(thermo, mesh));
return
autoPtr<temperaturePhaseChangeTwoPhaseMixture>
(
cstrIter()(thermo, mesh)
);
}
......
......@@ -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,7 +37,7 @@ Foam::phaseChangeTwoPhaseMixture::New
const surfaceScalarField& phi
)
{
IOdictionary transportPropertiesDict
const IOdictionary dict
(
IOobject
(
......@@ -46,14 +46,11 @@ Foam::phaseChangeTwoPhaseMixture::New
U.db(),
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
false // Do not register
)
);
const word modelType
(
transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture")
);
const word modelType(dict.get<word>("phaseChangeTwoPhaseMixture"));
Info<< "Selecting phaseChange model " << modelType << endl;
......@@ -61,12 +58,13 @@ Foam::phaseChangeTwoPhaseMixture::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown phaseChangeTwoPhaseMixture type "
<< modelType << nl << nl
<< "Valid phaseChangeTwoPhaseMixture types :" << endl
<< componentsConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalIOErrorInLookup
(
dict,
"phaseChangeTwoPhaseMixture",
modelType,
*componentsConstructorTablePtr_
) << exit(FatalIOError);
}
return autoPtr<phaseChangeTwoPhaseMixture>(cstrIter()(U, phi));
......
......@@ -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,13 @@ 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);
FatalIOErrorInLookup
(
interfaceDict,
"dragModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return cstrIter()(interfaceDict, phase1, phase2);
......
......@@ -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,13 @@ 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);
FatalIOErrorInLookup
(
interfaceDict,
"heatTransferModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return cstrIter()(interfaceDict, alpha1, phase1, phase2);
......
......@@ -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,13 @@ 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);
FatalIOErrorInLookup
(
dict,
"diameterModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return cstrIter()
......
......@@ -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);
}
}
}
......
......@@ -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,13 @@ Foam::aspectRatioModel::New
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown aspectRatioModel type "
<< modelType << nl << nl
<< "Valid aspectRatioModel types :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
FatalIOErrorInLookup
(
dict,
"aspectRatioModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalIOError);
}
return cstrIter()(dict, pair);
......
......@@ -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,13 @@ 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);
FatalIOErrorInLookup
(