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
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -55,12 +55,13 @@ Foam::interfaceCompositionModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"interfaceCompositionModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict, pair);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -32,34 +32,34 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
const word systemType
|
||||
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
|
||||
)
|
||||
);
|
||||
|
||||
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));
|
||||
|
||||
@ -35,34 +35,34 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"phaseChangeProperties",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).get<word>("phaseChangeTwoPhaseModel")
|
||||
"phaseChangeProperties",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
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
|
||||
|
||||
@ -37,34 +37,34 @@ Foam::phaseChangeTwoPhaseMixture::New
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).get<word>("phaseChangeTwoPhaseMixture")
|
||||
"transportProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
const word modelType(dict.get<word>("phaseChangeTwoPhaseMixture"));
|
||||
|
||||
Info<< "Selecting phaseChange model " << modelType << endl;
|
||||
|
||||
auto cstrIter = componentsConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"phaseChangeTwoPhaseMixture",
|
||||
modelType,
|
||||
*componentsConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<phaseChangeTwoPhaseMixture>(cstrIter()(U, phi));
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -46,12 +46,13 @@ Foam::aspectRatioModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"aspectRatioModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict, pair);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -46,12 +46,13 @@ Foam::swarmCorrection::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"swarmCorrection",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict, pair);
|
||||
|
||||
@ -46,12 +46,13 @@ Foam::turbulentDispersionModel::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"turbulentDispersionModel",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict, pair);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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