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));
|
||||
|
||||
@ -42,8 +42,9 @@ Foam::autoPtr<Foam::ODESolver> Foam::ODESolver::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"ODESolver",
|
||||
solverType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -135,34 +135,36 @@ Foam::LESModel<BasicTurbulenceModel>::New
|
||||
const word& propertiesName
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary modelDict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).subDict("LES").get<word>("LESModel")
|
||||
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
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>
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -125,34 +125,36 @@ Foam::RASModel<BasicTurbulenceModel>::New
|
||||
const word& propertiesName
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary modelDict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).subDict("RAS").get<word>("RASModel")
|
||||
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
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>
|
||||
|
||||
@ -87,34 +87,34 @@ Foam::TurbulenceModel<Alpha, Rho, BasicTurbulenceModel, TransportModel>::New
|
||||
const word& propertiesName
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).get<word>("simulationType")
|
||||
IOobject::groupName(propertiesName, alphaRhoPhi.group()),
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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,28 +92,61 @@ 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;
|
||||
for (label i = 1; i < cmpts.size() && isValid; ++ i)
|
||||
for (label i = 1; i < cmpts.size() && isValid; ++i)
|
||||
{
|
||||
isValid = isValid && cmpts[i] == thisCmpts[i];
|
||||
}
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -30,39 +30,36 @@ 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
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"engineGeometry",
|
||||
io.time().constant(),
|
||||
io.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).get<word>("engineMesh")
|
||||
"engineGeometry",
|
||||
io.time().constant(),
|
||||
io.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
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));
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -34,34 +34,34 @@ Foam::autoPtr<Foam::SRF::SRFModel> Foam::SRF::SRFModel::New
|
||||
const volVectorField& Urel
|
||||
)
|
||||
{
|
||||
const word modelType
|
||||
const IOdictionary dict
|
||||
(
|
||||
IOdictionary
|
||||
IOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"SRFProperties",
|
||||
Urel.time().constant(),
|
||||
Urel.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
).get<word>("SRFModel")
|
||||
"SRFProperties",
|
||||
Urel.time().constant(),
|
||||
Urel.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false // Do not register
|
||||
)
|
||||
);
|
||||
|
||||
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));
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -184,7 +184,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~option();
|
||||
virtual ~option() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -44,12 +44,13 @@ Foam::functionObjects::runTimeControls::runTimeCondition::New
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInLookup
|
||||
FatalIOErrorInLookup
|
||||
(
|
||||
dict,
|
||||
"runTimeCondition",
|
||||
modelType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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>>
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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 =
|
||||
|
||||
@ -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()());
|
||||
|
||||
@ -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>>
|
||||
|
||||
@ -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>>
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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>>
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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>>
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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
Reference in New Issue
Block a user