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
@ -83,12 +83,13 @@ Foam::cellSizeAndAlignmentControl::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"cellSizeAndAlignmentControl",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<cellSizeAndAlignmentControl>
|
||||
|
||||
@ -137,12 +137,13 @@ Foam::autoPtr<Foam::cellSizeFunction> Foam::cellSizeFunction::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"cellSizeFunction",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<cellSizeFunction>
|
||||
|
||||
@ -70,12 +70,13 @@ Foam::autoPtr<Foam::cellSizeCalculationType> Foam::cellSizeCalculationType::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"cellSizeCalculationType",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<cellSizeCalculationType>
|
||||
|
||||
@ -67,10 +67,7 @@ Foam::autoPtr<Foam::surfaceCellSizeFunction> Foam::surfaceCellSizeFunction::New
|
||||
const scalar& defaultCellSize
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
(
|
||||
dict.get<word>("surfaceCellSizeFunction")
|
||||
);
|
||||
const word modelType(dict.get<word>("surfaceCellSizeFunction"));
|
||||
|
||||
Info<< indent << "Selecting surfaceCellSizeFunction " << modelType << endl;
|
||||
|
||||
@ -78,12 +75,13 @@ Foam::autoPtr<Foam::surfaceCellSizeFunction> Foam::surfaceCellSizeFunction::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"surfaceCellSizeFunction",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<surfaceCellSizeFunction>
|
||||
|
||||
@ -41,10 +41,10 @@ defineRunTimeSelectionTable(faceAreaWeightModel, dictionary);
|
||||
Foam::faceAreaWeightModel::faceAreaWeightModel
|
||||
(
|
||||
const word& type,
|
||||
const dictionary& relaxationDict
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
dictionary(relaxationDict),
|
||||
dictionary(dict),
|
||||
coeffDict_(optionalSubDict(type + "Coeffs"))
|
||||
{}
|
||||
|
||||
@ -53,10 +53,10 @@ Foam::faceAreaWeightModel::faceAreaWeightModel
|
||||
|
||||
Foam::autoPtr<Foam::faceAreaWeightModel> Foam::faceAreaWeightModel::New
|
||||
(
|
||||
const dictionary& relaxationDict
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
const word modelType(relaxationDict.get<word>("faceAreaWeightModel"));
|
||||
const word modelType(dict.get<word>("faceAreaWeightModel"));
|
||||
|
||||
Info<< nl << "Selecting faceAreaWeightModel " << modelType << endl;
|
||||
|
||||
@ -64,15 +64,16 @@ Foam::autoPtr<Foam::faceAreaWeightModel> Foam::faceAreaWeightModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"faceAreaWeightModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<faceAreaWeightModel>(cstrIter()(relaxationDict));
|
||||
return autoPtr<faceAreaWeightModel>(cstrIter()(dict));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ Foam::initialPointsMethod::initialPointsMethod
|
||||
|
||||
Foam::autoPtr<Foam::initialPointsMethod> Foam::initialPointsMethod::New
|
||||
(
|
||||
const dictionary& initialPointsDict,
|
||||
const dictionary& dict,
|
||||
const Time& runTime,
|
||||
Random& rndGen,
|
||||
const conformationSurfaces& geometryToConformTo,
|
||||
@ -79,7 +79,7 @@ Foam::autoPtr<Foam::initialPointsMethod> Foam::initialPointsMethod::New
|
||||
const autoPtr<backgroundMeshDecomposition>& decomposition
|
||||
)
|
||||
{
|
||||
const word modelType(initialPointsDict.get<word>("initialPointsMethod"));
|
||||
const word modelType(dict.get<word>("initialPointsMethod"));
|
||||
|
||||
Info<< nl << "Selecting initialPointsMethod " << modelType << endl;
|
||||
|
||||
@ -87,12 +87,13 @@ Foam::autoPtr<Foam::initialPointsMethod> Foam::initialPointsMethod::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"initialPointsMethod",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return
|
||||
@ -100,7 +101,7 @@ Foam::autoPtr<Foam::initialPointsMethod> Foam::initialPointsMethod::New
|
||||
(
|
||||
cstrIter()
|
||||
(
|
||||
initialPointsDict,
|
||||
dict,
|
||||
runTime,
|
||||
rndGen,
|
||||
geometryToConformTo,
|
||||
|
||||
@ -42,11 +42,11 @@ defineRunTimeSelectionTable(relaxationModel, dictionary);
|
||||
Foam::relaxationModel::relaxationModel
|
||||
(
|
||||
const word& type,
|
||||
const dictionary& relaxationDict,
|
||||
const dictionary& dict,
|
||||
const Time& runTime
|
||||
)
|
||||
:
|
||||
dictionary(relaxationDict),
|
||||
dictionary(dict),
|
||||
runTime_(runTime),
|
||||
coeffDict_(optionalSubDict(type + "Coeffs"))
|
||||
{}
|
||||
@ -56,11 +56,11 @@ Foam::relaxationModel::relaxationModel
|
||||
|
||||
Foam::autoPtr<Foam::relaxationModel> Foam::relaxationModel::New
|
||||
(
|
||||
const dictionary& relaxationDict,
|
||||
const dictionary& dict,
|
||||
const Time& runTime
|
||||
)
|
||||
{
|
||||
const word modelType(relaxationDict.get<word>("relaxationModel"));
|
||||
const word modelType(dict.get<word>("relaxationModel"));
|
||||
|
||||
Info<< nl << "Selecting relaxationModel " << modelType << endl;
|
||||
|
||||
@ -68,15 +68,16 @@ Foam::autoPtr<Foam::relaxationModel> Foam::relaxationModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"relaxationModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<relaxationModel>(cstrIter()(relaxationDict, runTime));
|
||||
return autoPtr<relaxationModel>(cstrIter()(dict, runTime));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -51,12 +51,13 @@ Foam::searchableSurfaceFeatures::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"searchableSurfaceFeatures",
|
||||
modelType,
|
||||
*dictConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<searchableSurfaceFeatures>(cstrIter()(surface, dict));
|
||||
@ -82,7 +83,4 @@ Foam::searchableSurfaceFeatures::~searchableSurfaceFeatures()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -74,12 +74,13 @@ Foam::autoPtr<Foam::faceSelection> Foam::faceSelection::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"faceSelection",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<faceSelection>(cstrIter()(name, mesh, dict));
|
||||
|
||||
@ -45,8 +45,7 @@ Foam::autoPtr<Foam::helpType> Foam::helpType::New
|
||||
FatalErrorInFunction
|
||||
<< "Valid helpType selections:" << nl
|
||||
<< " "
|
||||
<< flatOutput(dictionaryConstructorTablePtr_->sortedToc())
|
||||
<< endl
|
||||
<< flatOutput(dictionaryConstructorTablePtr_->sortedToc()) << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
else
|
||||
@ -55,8 +54,7 @@ Foam::autoPtr<Foam::helpType> Foam::helpType::New
|
||||
<< "Unknown helpType type '" << helpTypeName << "'" << nl << nl
|
||||
<< "Valid helpType selections:" << nl
|
||||
<< " "
|
||||
<< flatOutput(dictionaryConstructorTablePtr_->sortedToc())
|
||||
<< endl
|
||||
<< flatOutput(dictionaryConstructorTablePtr_->sortedToc()) << nl
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,12 +44,13 @@ Foam::tabulatedWallFunctions::tabulatedWallFunction::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"tabulatedWallFunction",
|
||||
functionName,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<tabulatedWallFunction>(cstrIter()(dict, mesh));
|
||||
|
||||
@ -70,12 +70,13 @@ Foam::searchableSurfaceModifier::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"searchableSurfaceModifier",
|
||||
type,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<searchableSurfaceModifier>(cstrIter()(geometry, dict));
|
||||
|
||||
Reference in New Issue
Block a user