ENH: use FatalIOErrorInLookup instead of FatalErrorInLookup

This commit is contained in:
Mark Olesen
2019-07-16 10:26:51 +02:00
committed by Andrew Heather
parent 5d0f1788e1
commit f94be1bebb
221 changed files with 1214 additions and 988 deletions

View File

@ -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())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"PDRDragModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<PDRDragModel>
(cstrIter()(PDRProperties, turbulence, rho, U, phi));
(cstrIter()(dict, turbulence, rho, U, phi));
}

View File

@ -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())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"XiEqModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<XiEqModel>(cstrIter()(propDict, thermo, turbulence, Su));
return autoPtr<XiEqModel>(cstrIter()(dict, thermo, turbulence, Su));
}

View File

@ -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())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"XiGModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<XiGModel>(cstrIter()(propDict, thermo, turbulence, Su));
return autoPtr<XiGModel>(cstrIter()(dict, thermo, turbulence, Su));
}

View File

@ -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())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"XiModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<XiModel>
(cstrIter()(propDict, thermo, turbulence, Su, rho, b, phi));
(cstrIter()(dict, thermo, turbulence, Su, rho, b, phi));
}

View File

@ -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())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"mixtureViscosityModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<mixtureViscosityModel>
(cstrIter()(name, viscosityProperties, U, phi));
(cstrIter()(name, dict, U, phi));
}

View File

@ -114,12 +114,13 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"relative velocity",
modelType,
*dictionaryConstructorTablePtr_
) << abort(FatalError);
) << abort(FatalIOError);
}
return

View File

@ -55,12 +55,13 @@ Foam::interfaceCompositionModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"interfaceCompositionModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(dict, pair);

View File

@ -43,12 +43,13 @@ Foam::autoPtr<Foam::porousModel> Foam::porousModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"porousModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(dict, mesh);

View File

@ -43,12 +43,13 @@ Foam::autoPtr<Foam::surfaceTensionModel> Foam::surfaceTensionModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"surfaceTensionModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(dict, pair, true);

View File

@ -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())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"phaseModel",
modelType,
*phaseSystemConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(fluid, phaseName);

View File

@ -32,9 +32,7 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
const fvMesh& mesh
)
{
const word systemType
(
IOdictionary
const IOdictionary dict
(
IOobject
(
@ -43,23 +41,25 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
false // Do not register
)
).get<word>("type")
);
const word systemType(dict.get<word>("type"));
Info<< "Selecting multiphaseSystem " << systemType << endl;
const auto cstrIter = dictionaryConstructorTablePtr_->cfind(systemType);
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"multiphaseSystem",
systemType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<multiphaseSystem>(cstrIter()(mesh));

View File

@ -35,9 +35,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
const fvMesh& mesh
)
{
const word modelType
(
IOdictionary
const IOdictionary dict
(
IOobject
(
@ -48,21 +46,23 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
IOobject::NO_WRITE,
false // Do not register
)
).get<word>("phaseChangeTwoPhaseModel")
);
const word modelType(dict.get<word>("phaseChangeTwoPhaseModel"));
Info<< "Selecting phaseChange model " << modelType << endl;
auto cstrIter = componentsConstructorTablePtr_->cfind(modelType);
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"temperaturePhaseChangeTwoPhaseMixture",
modelType,
*componentsConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return

View File

@ -37,9 +37,7 @@ Foam::phaseChangeTwoPhaseMixture::New
const surfaceScalarField& phi
)
{
const word modelType
(
IOdictionary
const IOdictionary dict
(
IOobject
(
@ -50,21 +48,23 @@ Foam::phaseChangeTwoPhaseMixture::New
IOobject::NO_WRITE,
false // Do not register
)
).get<word>("phaseChangeTwoPhaseMixture")
);
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));

View File

@ -47,12 +47,13 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
interfaceDict,
"dragModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(interfaceDict, phase1, phase2);

View File

@ -51,12 +51,13 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
interfaceDict,
"heatTransferModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(interfaceDict, alpha1, phase1, phase2);

View File

@ -46,12 +46,13 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"diameterModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()

View File

@ -46,12 +46,13 @@ Foam::aspectRatioModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"aspectRatioModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(dict, pair);

View File

@ -45,12 +45,13 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"dragModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(dict, pair, true);

View File

@ -45,12 +45,13 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"heatTransferModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(dict, pair);

View File

@ -45,12 +45,13 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"liftModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(dict, pair);

View File

@ -46,12 +46,13 @@ Foam::swarmCorrection::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"swarmCorrection",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(dict, pair);

View File

@ -46,12 +46,13 @@ Foam::turbulentDispersionModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"turbulentDispersionModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(dict, pair);

View File

@ -45,12 +45,13 @@ Foam::autoPtr<Foam::virtualMassModel> Foam::virtualMassModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"virtualMassModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(dict, pair, true);

View File

@ -45,12 +45,13 @@ Foam::autoPtr<Foam::wallLubricationModel> Foam::wallLubricationModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"wallLubricationModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(dict, pair);

View File

@ -43,12 +43,13 @@ Foam::kineticTheoryModels::conductivityModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"conductivityModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<conductivityModel>(cstrIter()(dict));

View File

@ -43,12 +43,13 @@ Foam::kineticTheoryModels::frictionalStressModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"frictionalStressModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<frictionalStressModel>(cstrIter()(dict));

View File

@ -43,12 +43,13 @@ Foam::kineticTheoryModels::granularPressureModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"granularPressureModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<granularPressureModel>(cstrIter()(dict));

View File

@ -43,12 +43,13 @@ Foam::kineticTheoryModels::radialModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"radialModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<radialModel>(cstrIter()(dict));

View File

@ -43,12 +43,13 @@ Foam::kineticTheoryModels::viscosityModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"viscosityModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<viscosityModel>(cstrIter()(dict));

View File

@ -44,12 +44,13 @@ Foam::autoPtr<Foam::blendingMethod> Foam::blendingMethod::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"blendingMethod",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()(dict, phaseNames);

View File

@ -46,12 +46,13 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"diameterModel",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return cstrIter()

View File

@ -83,12 +83,13 @@ Foam::cellSizeAndAlignmentControl::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"cellSizeAndAlignmentControl",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return autoPtr<cellSizeAndAlignmentControl>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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));
}

View File

@ -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,

View File

@ -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));
}

View File

@ -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 * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -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));

View File

@ -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);
}
}

View File

@ -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));

View File

@ -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));

View File

@ -42,8 +42,9 @@ Foam::autoPtr<Foam::ODESolver> Foam::ODESolver::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"ODESolver",
solverType,
*dictionaryConstructorTablePtr_

View File

@ -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",

View File

@ -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);

View File

@ -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));

View File

@ -135,9 +135,7 @@ Foam::LESModel<BasicTurbulenceModel>::New
const word& propertiesName
)
{
const word modelType
(
IOdictionary
const IOdictionary modelDict
(
IOobject
(
@ -148,21 +146,25 @@ Foam::LESModel<BasicTurbulenceModel>::New
IOobject::NO_WRITE,
false // Do not register
)
).subDict("LES").get<word>("LESModel")
);
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>

View File

@ -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));

View File

@ -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));

View File

@ -125,9 +125,7 @@ Foam::RASModel<BasicTurbulenceModel>::New
const word& propertiesName
)
{
const word modelType
(
IOdictionary
const IOdictionary modelDict
(
IOobject
(
@ -138,21 +136,25 @@ Foam::RASModel<BasicTurbulenceModel>::New
IOobject::NO_WRITE,
false // Do not register
)
).subDict("RAS").get<word>("RASModel")
);
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>

View File

@ -87,9 +87,7 @@ Foam::TurbulenceModel<Alpha, Rho, BasicTurbulenceModel, TransportModel>::New
const word& propertiesName
)
{
const word modelType
(
IOdictionary
const IOdictionary dict
(
IOobject
(
@ -100,21 +98,23 @@ Foam::TurbulenceModel<Alpha, Rho, BasicTurbulenceModel, TransportModel>::New
IOobject::NO_WRITE,
false // Do not register
)
).get<word>("simulationType")
);
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>

View File

@ -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>

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
@ -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,24 +92,57 @@ 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;
@ -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>

View File

@ -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>

View File

@ -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));
}

View File

@ -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));

View File

@ -30,14 +30,9 @@ 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
(
IOdictionary
const IOdictionary dict
(
IOobject
(
@ -48,21 +43,23 @@ Foam::autoPtr<Foam::engineMesh> Foam::engineMesh::New
IOobject::NO_WRITE,
false // Do not register
)
).get<word>("engineMesh")
);
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));

View File

@ -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>

View File

@ -34,9 +34,7 @@ Foam::autoPtr<Foam::SRF::SRFModel> Foam::SRF::SRFModel::New
const volVectorField& Urel
)
{
const word modelType
(
IOdictionary
const IOdictionary dict
(
IOobject
(
@ -47,21 +45,23 @@ Foam::autoPtr<Foam::SRF::SRFModel> Foam::SRF::SRFModel::New
IOobject::NO_WRITE,
false // Do not register
)
).get<word>("SRFModel")
);
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));

View File

@ -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()

View File

@ -184,7 +184,7 @@ public:
//- Destructor
virtual ~option();
virtual ~option() = default;
// Member Functions

View File

@ -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>

View File

@ -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);

View File

@ -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);

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -44,12 +44,13 @@ Foam::functionObjects::runTimeControls::runTimeCondition::New
if (!cstrIter.found())
{
FatalErrorInLookup
FatalIOErrorInLookup
(
dict,
"runTimeCondition",
modelType,
*dictionaryConstructorTablePtr_
) << exit(FatalError);
) << exit(FatalIOError);
}
return

View File

@ -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));
}

View File

@ -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));
}

View File

@ -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));

View File

@ -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));

View File

@ -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>>

View File

@ -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));

View File

@ -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));

View File

@ -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 =

View File

@ -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()());

View File

@ -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>>

View File

@ -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>>

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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

View File

@ -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>>

View File

@ -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));

View File

@ -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>>

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

Some files were not shown because too many files have changed in this diff Show More