mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use auto and cfind to simplify selector usage (issue #512)
This commit is contained in:
@ -40,15 +40,14 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
|
||||
|
||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown PDRDragModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid PDRDragModels are : " << endl
|
||||
<< "Valid PDRDragModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -39,15 +39,14 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
|
||||
|
||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown XiEqModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid XiEqModels are : " << endl
|
||||
<< "Valid XiEqModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -39,15 +39,14 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
|
||||
|
||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown XiGModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid XiGModels are : " << endl
|
||||
<< "Valid XiGModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -42,15 +42,14 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
|
||||
|
||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown XiModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid XiModels are : " << endl
|
||||
<< "Valid XiModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -41,15 +41,14 @@ Foam::autoPtr<Foam::mixtureViscosityModel> Foam::mixtureViscosityModel::New
|
||||
|
||||
Info<< "Selecting incompressible transport model " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown mixtureViscosityModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid mixtureViscosityModels are : " << endl
|
||||
<< "Valid mixtureViscosityModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -104,19 +104,18 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New
|
||||
const incompressibleTwoPhaseInteractingMixture& mixture
|
||||
)
|
||||
{
|
||||
word modelType(dict.lookup(typeName));
|
||||
const word modelType(dict.lookup(typeName));
|
||||
|
||||
Info<< "Selecting relative velocity model " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown time scale model type " << modelType
|
||||
<< ", constructor not in hash table" << nl << nl
|
||||
<< " Valid time scale model types are:" << nl
|
||||
<< "Unknown time scale model type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid time scale model types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -141,13 +140,13 @@ Foam::relativeVelocityModel::~relativeVelocityModel()
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
tmp<volScalarField> Foam::relativeVelocityModel::rho() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::relativeVelocityModel::rho() const
|
||||
{
|
||||
return alphac_*rhoc_ + alphad_*rhod_;
|
||||
}
|
||||
|
||||
|
||||
tmp<volSymmTensorField> Foam::relativeVelocityModel::tauDm() const
|
||||
Foam::tmp<Foam::volSymmTensorField> Foam::relativeVelocityModel::tauDm() const
|
||||
{
|
||||
volScalarField betac(alphac_*rhoc_);
|
||||
volScalarField betad(alphad_*rhod_);
|
||||
|
||||
@ -48,7 +48,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
|
||||
)
|
||||
);
|
||||
|
||||
word temperaturePhaseChangeTwoPhaseMixtureTypeName
|
||||
const word modelType
|
||||
(
|
||||
phaseChangePropertiesDict.lookup
|
||||
(
|
||||
@ -56,19 +56,16 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Selecting phaseChange model "
|
||||
<< temperaturePhaseChangeTwoPhaseMixtureTypeName << endl;
|
||||
Info<< "Selecting phaseChange model " << modelType << endl;
|
||||
|
||||
componentsConstructorTable::iterator cstrIter =
|
||||
componentsConstructorTablePtr_
|
||||
->find(temperaturePhaseChangeTwoPhaseMixtureTypeName);
|
||||
auto cstrIter = componentsConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown temperaturePhaseChangeTwoPhaseMixture type "
|
||||
<< temperaturePhaseChangeTwoPhaseMixtureTypeName << endl << endl
|
||||
<< "Valid temperaturePhaseChangeTwoPhaseMixtures are : " << endl
|
||||
<< modelType << nl << nl
|
||||
<< "Valid temperaturePhaseChangeTwoPhaseMixture types :" << endl
|
||||
<< componentsConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -48,24 +48,21 @@ Foam::phaseChangeTwoPhaseMixture::New
|
||||
)
|
||||
);
|
||||
|
||||
word phaseChangeTwoPhaseMixtureTypeName
|
||||
const word modelType
|
||||
(
|
||||
transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture")
|
||||
);
|
||||
|
||||
Info<< "Selecting phaseChange model "
|
||||
<< phaseChangeTwoPhaseMixtureTypeName << endl;
|
||||
Info<< "Selecting phaseChange model " << modelType << endl;
|
||||
|
||||
componentsConstructorTable::iterator cstrIter =
|
||||
componentsConstructorTablePtr_
|
||||
->find(phaseChangeTwoPhaseMixtureTypeName);
|
||||
auto cstrIter = componentsConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown phaseChangeTwoPhaseMixture type "
|
||||
<< phaseChangeTwoPhaseMixtureTypeName << endl << endl
|
||||
<< "Valid phaseChangeTwoPhaseMixtures are : " << endl
|
||||
<< modelType << nl << nl
|
||||
<< "Valid phaseChangeTwoPhaseMixture types :" << endl
|
||||
<< componentsConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,22 +34,21 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
||||
const phaseModel& phase2
|
||||
)
|
||||
{
|
||||
word dragModelType(interfaceDict.lookup("type"));
|
||||
const word modelType(interfaceDict.lookup("type"));
|
||||
|
||||
Info << "Selecting dragModel for phase "
|
||||
<< phase1.name()
|
||||
<< ": "
|
||||
<< dragModelType << endl;
|
||||
<< modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(dragModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown dragModelType type "
|
||||
<< dragModelType << endl << endl
|
||||
<< "Valid dragModel types are : " << endl
|
||||
<< "Unknown dragModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid dragModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
|
||||
const phaseModel& phase2
|
||||
)
|
||||
{
|
||||
word heatTransferModelType
|
||||
const word modelType
|
||||
(
|
||||
interfaceDict.lookup("heatTransferModel" + phase1.name())
|
||||
);
|
||||
@ -43,17 +43,16 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
|
||||
Info<< "Selecting heatTransferModel for phase "
|
||||
<< phase1.name()
|
||||
<< ": "
|
||||
<< heatTransferModelType << endl;
|
||||
<< modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(heatTransferModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown heatTransferModelType type "
|
||||
<< heatTransferModelType << endl << endl
|
||||
<< "Valid heatTransferModel types are : " << endl
|
||||
<< "Unknown heatTransferModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid heatTransferModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -33,32 +33,28 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
|
||||
const phaseModel& phase
|
||||
)
|
||||
{
|
||||
word diameterModelType
|
||||
(
|
||||
dict.lookup("diameterModel")
|
||||
);
|
||||
const word modelType(dict.lookup("diameterModel"));
|
||||
|
||||
Info << "Selecting diameterModel for phase "
|
||||
<< phase.name()
|
||||
<< ": "
|
||||
<< diameterModelType << endl;
|
||||
<< modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(diameterModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown diameterModelType type "
|
||||
<< diameterModelType << endl << endl
|
||||
<< "Valid diameterModel types are : " << endl
|
||||
<< "Unknown diameterModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid diameterModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()
|
||||
(
|
||||
dict.optionalSubDict(diameterModelType + "Coeffs"),
|
||||
dict.optionalSubDict(modelType + "Coeffs"),
|
||||
phase
|
||||
);
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ Foam::interfaceCompositionModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word interfaceCompositionModelType
|
||||
const word modelType
|
||||
(
|
||||
word(dict.lookup("type"))
|
||||
+ "<"
|
||||
@ -47,17 +47,16 @@ Foam::interfaceCompositionModel::New
|
||||
);
|
||||
|
||||
Info<< "Selecting interfaceCompositionModel for "
|
||||
<< pair << ": " << interfaceCompositionModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(interfaceCompositionModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown interfaceCompositionModelType type "
|
||||
<< interfaceCompositionModelType << endl << endl
|
||||
<< "Valid interfaceCompositionModel types are : " << endl
|
||||
<< "Unknown interfaceCompositionModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid interfaceCompositionModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::massTransferModel> Foam::massTransferModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word massTransferModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting massTransferModel for "
|
||||
<< pair << ": " << massTransferModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(massTransferModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown massTransferModelType type "
|
||||
<< massTransferModelType << endl << endl
|
||||
<< "Valid massTransferModel types are : " << endl
|
||||
<< "Unknown massTransferModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid massTransferModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -32,20 +32,18 @@ Foam::autoPtr<Foam::saturationModel> Foam::saturationModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word saturationModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting saturationModel: "
|
||||
<< saturationModelType << endl;
|
||||
Info<< "Selecting saturationModel: " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(saturationModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown saturationModelType type "
|
||||
<< saturationModelType << endl << endl
|
||||
<< "Valid saturationModel types are : " << endl
|
||||
<< "Unknown saturationModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid saturationModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -35,20 +35,19 @@ Foam::surfaceTensionModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word surfaceTensionModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting surfaceTensionModel for "
|
||||
<< pair << ": " << surfaceTensionModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
multiphaseConstructorTable::iterator cstrIter =
|
||||
multiphaseConstructorTablePtr_->find(surfaceTensionModelType);
|
||||
auto cstrIter = multiphaseConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown surfaceTensionModelType type "
|
||||
<< surfaceTensionModelType << endl << endl
|
||||
<< "Valid surfaceTensionModel types are : " << endl
|
||||
<< "Unknown surfaceTensionModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid surfaceTensionModel types :" << endl
|
||||
<< multiphaseConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -35,20 +35,19 @@ Foam::aspectRatioModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word aspectRatioModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting aspectRatioModel for "
|
||||
<< pair << ": " << aspectRatioModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(aspectRatioModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown aspectRatioModelType type "
|
||||
<< aspectRatioModelType << endl << endl
|
||||
<< "Valid aspectRatioModel types are : " << endl
|
||||
<< "Unknown aspectRatioModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid aspectRatioModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word dragModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting dragModel for "
|
||||
<< pair << ": " << dragModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(dragModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown dragModelType type "
|
||||
<< dragModelType << endl << endl
|
||||
<< "Valid dragModel types are : " << endl
|
||||
<< "Unknown dragModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid dragModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word heatTransferModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting heatTransferModel for "
|
||||
<< pair << ": " << heatTransferModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(heatTransferModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown heatTransferModelType type "
|
||||
<< heatTransferModelType << endl << endl
|
||||
<< "Valid heatTransferModel types are : " << endl
|
||||
<< "Unknown heatTransferModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid heatTransferModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word liftModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting liftModel for "
|
||||
<< pair << ": " << liftModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(liftModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown liftModelType type "
|
||||
<< liftModelType << endl << endl
|
||||
<< "Valid liftModel types are : " << endl
|
||||
<< "Unknown liftModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid liftModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -35,20 +35,19 @@ Foam::swarmCorrection::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word swarmCorrectionType(dict.lookup("type"));
|
||||
const word correctionType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting swarmCorrection for "
|
||||
<< pair << ": " << swarmCorrectionType << endl;
|
||||
<< pair << ": " << correctionType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(swarmCorrectionType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(correctionType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown swarmCorrectionType type "
|
||||
<< swarmCorrectionType << endl << endl
|
||||
<< "Valid swarmCorrection types are : " << endl
|
||||
<< "Unknown swarmCorrection type "
|
||||
<< correctionType << nl << nl
|
||||
<< "Valid swarmCorrection types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -35,20 +35,19 @@ Foam::turbulentDispersionModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word turbulentDispersionModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting turbulentDispersionModel for "
|
||||
<< pair << ": " << turbulentDispersionModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(turbulentDispersionModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown turbulentDispersionModelType type "
|
||||
<< turbulentDispersionModelType << endl << endl
|
||||
<< "Valid turbulentDispersionModel types are : " << endl
|
||||
<< "Unknown turbulentDispersionModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid turbulentDispersionModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::virtualMassModel> Foam::virtualMassModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word virtualMassModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting virtualMassModel for "
|
||||
<< pair << ": " << virtualMassModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(virtualMassModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown virtualMassModelType type "
|
||||
<< virtualMassModelType << endl << endl
|
||||
<< "Valid virtualMassModel types are : " << endl
|
||||
<< "Unknown virtualMassModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid virtualMassModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::wallDampingModel> Foam::wallDampingModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word wallDampingModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting wallDampingModel for "
|
||||
<< pair << ": " << wallDampingModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(wallDampingModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown wallDampingModelType type "
|
||||
<< wallDampingModelType << endl << endl
|
||||
<< "Valid wallDampingModel types are : " << endl
|
||||
<< "Unknown wallDampingModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid wallDampingModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::wallLubricationModel> Foam::wallLubricationModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word wallLubricationModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting wallLubricationModel for "
|
||||
<< pair << ": " << wallLubricationModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(wallLubricationModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown wallLubricationModelType type "
|
||||
<< wallLubricationModelType << endl << endl
|
||||
<< "Valid wallLubricationModel types are : " << endl
|
||||
<< "Unknown wallLubricationModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid wallLubricationModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -33,20 +33,19 @@ Foam::autoPtr<Foam::blendingMethod> Foam::blendingMethod::New
|
||||
const wordList& phaseNames
|
||||
)
|
||||
{
|
||||
word blendingMethodType(dict.lookup("type"));
|
||||
const word methodType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting " << dict.dictName() << " blending method: "
|
||||
<< blendingMethodType << endl;
|
||||
<< methodType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(blendingMethodType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown blendingMethodType type "
|
||||
<< blendingMethodType << endl << endl
|
||||
<< "Valid blendingMethod types are : " << endl
|
||||
<< "Unknown blendingMethod type "
|
||||
<< methodType << nl << nl
|
||||
<< "Valid blendingMethod types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -33,32 +33,28 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
|
||||
const phaseModel& phase
|
||||
)
|
||||
{
|
||||
word diameterModelType
|
||||
(
|
||||
dict.lookup("diameterModel")
|
||||
);
|
||||
const word modelType(dict.lookup("diameterModel"));
|
||||
|
||||
Info << "Selecting diameterModel for phase "
|
||||
<< phase.name()
|
||||
<< ": "
|
||||
<< diameterModelType << endl;
|
||||
<< modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(diameterModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown diameterModelType type "
|
||||
<< diameterModelType << endl << endl
|
||||
<< "Valid diameterModel types are : " << endl
|
||||
<< "Unknown diameterModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid diameterModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()
|
||||
(
|
||||
dict.optionalSubDict(diameterModelType + "Coeffs"),
|
||||
dict.optionalSubDict(modelType + "Coeffs"),
|
||||
phase
|
||||
);
|
||||
}
|
||||
|
||||
@ -35,20 +35,19 @@ Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New
|
||||
const label index
|
||||
)
|
||||
{
|
||||
word phaseModelType(fluid.subDict(phaseName).lookup("type"));
|
||||
const word modelType(fluid.subDict(phaseName).lookup("type"));
|
||||
|
||||
Info<< "Selecting phaseModel for "
|
||||
<< phaseName << ": " << phaseModelType << endl;
|
||||
<< phaseName << ": " << modelType << endl;
|
||||
|
||||
phaseSystemConstructorTable::iterator cstrIter =
|
||||
phaseSystemConstructorTablePtr_->find(phaseModelType);
|
||||
auto cstrIter = phaseSystemConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown phaseModelType type "
|
||||
<< phaseModelType << endl << endl
|
||||
<< "Valid phaseModel types are : " << endl
|
||||
<< "Unknown phaseModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid phaseModel types :" << endl
|
||||
<< phaseSystemConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
const word multiphaseSystemType
|
||||
const word systemType
|
||||
(
|
||||
IOdictionary
|
||||
(
|
||||
@ -48,18 +48,16 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
|
||||
).lookup("type")
|
||||
);
|
||||
|
||||
Info<< "Selecting multiphaseSystem "
|
||||
<< multiphaseSystemType << endl;
|
||||
Info<< "Selecting multiphaseSystem " << systemType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(multiphaseSystemType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(systemType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown multiphaseSystemType type "
|
||||
<< multiphaseSystemType << endl << endl
|
||||
<< "Valid multiphaseSystem types are : " << endl
|
||||
<< "Unknown multiphaseSystem type "
|
||||
<< systemType << nl << nl
|
||||
<< "Valid multiphaseSystem types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -33,20 +33,18 @@ Foam::wallBoilingModels::departureDiameterModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word departureDiameterModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting departureDiameterModel: "
|
||||
<< departureDiameterModelType << endl;
|
||||
Info<< "Selecting departureDiameterModel: " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(departureDiameterModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown departureDiameterModelType type "
|
||||
<< departureDiameterModelType << endl << endl
|
||||
<< "Valid departureDiameterModel types are : " << endl
|
||||
<< "Unknown departureDiameterModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid departureDiameterModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -33,20 +33,18 @@ Foam::wallBoilingModels::departureFrequencyModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word departureFrequencyModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting departureFrequencyModel: "
|
||||
<< departureFrequencyModelType << endl;
|
||||
Info<< "Selecting departureFrequencyModel: " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(departureFrequencyModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown departureFrequencyModelType type "
|
||||
<< departureFrequencyModelType << endl << endl
|
||||
<< "Valid departureFrequencyModel types are : " << endl
|
||||
<< "Unknown departureFrequencyModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid departureFrequencyModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -33,20 +33,18 @@ Foam::wallBoilingModels::nucleationSiteModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word nucleationSiteModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting nucleationSiteModel: "
|
||||
<< nucleationSiteModelType << endl;
|
||||
Info<< "Selecting nucleationSiteModel: " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(nucleationSiteModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown nucleationSiteModelType type "
|
||||
<< nucleationSiteModelType << endl << endl
|
||||
<< "Valid nucleationSiteModel types are : " << endl
|
||||
<< "Unknown nucleationSiteModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid nucleationSiteModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -33,20 +33,18 @@ Foam::wallBoilingModels::partitioningModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word partitioningModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting partitioningModel: "
|
||||
<< partitioningModelType << endl;
|
||||
Info<< "Selecting partitioningModel: " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(partitioningModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown partitioningModelType type "
|
||||
<< partitioningModelType << endl << endl
|
||||
<< "Valid partitioningModel types are : " << endl
|
||||
<< "Unknown partitioningModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid partitioningModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -33,23 +33,20 @@ Foam::kineticTheoryModels::conductivityModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word conductivityModelType(dict.lookup("conductivityModel"));
|
||||
const word modelType(dict.lookup("conductivityModel"));
|
||||
|
||||
Info<< "Selecting conductivityModel "
|
||||
<< conductivityModelType << endl;
|
||||
Info<< "Selecting conductivityModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(conductivityModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalError
|
||||
<< "conductivityModel::New(const dictionary&) : " << endl
|
||||
<< " unknown conductivityModelType type "
|
||||
<< conductivityModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid conductivityModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown conductivityModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid conductivityModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<conductivityModel>(cstrIter()(dict));
|
||||
|
||||
@ -33,24 +33,20 @@ Foam::kineticTheoryModels::frictionalStressModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word frictionalStressModelType(dict.lookup("frictionalStressModel"));
|
||||
const word modelType(dict.lookup("frictionalStressModel"));
|
||||
|
||||
Info<< "Selecting frictionalStressModel "
|
||||
<< frictionalStressModelType << endl;
|
||||
Info<< "Selecting frictionalStressModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(frictionalStressModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalError
|
||||
<< "frictionalStressModel::New(const dictionary&) : " << endl
|
||||
<< " unknown frictionalStressModelType type "
|
||||
<< frictionalStressModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid frictionalStressModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown frictionalStressModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid frictionalStressModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<frictionalStressModel>(cstrIter()(dict));
|
||||
|
||||
@ -33,24 +33,20 @@ Foam::kineticTheoryModels::granularPressureModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word granularPressureModelType(dict.lookup("granularPressureModel"));
|
||||
const word modelType(dict.lookup("granularPressureModel"));
|
||||
|
||||
Info<< "Selecting granularPressureModel "
|
||||
<< granularPressureModelType << endl;
|
||||
Info<< "Selecting granularPressureModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(granularPressureModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalError
|
||||
<< "granularPressureModel::New(const dictionary&) : " << endl
|
||||
<< " unknown granularPressureModelType type "
|
||||
<< granularPressureModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid granularPressureModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown granularPressureModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid granularPressureModel types : " << nl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<granularPressureModel>(cstrIter()(dict));
|
||||
|
||||
@ -33,24 +33,20 @@ Foam::kineticTheoryModels::radialModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word radialModelType(dict.lookup("radialModel"));
|
||||
const word modelType(dict.lookup("radialModel"));
|
||||
|
||||
Info<< "Selecting radialModel "
|
||||
<< radialModelType << endl;
|
||||
Info<< "Selecting radialModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(radialModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalError
|
||||
<< "radialModel::New(const dictionary&) : " << endl
|
||||
<< " unknown radialModelType type "
|
||||
<< radialModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid radialModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown radialModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid radialModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<radialModel>(cstrIter()(dict));
|
||||
|
||||
@ -33,23 +33,20 @@ Foam::kineticTheoryModels::viscosityModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word viscosityModelType(dict.lookup("viscosityModel"));
|
||||
const word modelType(dict.lookup("viscosityModel"));
|
||||
|
||||
Info<< "Selecting viscosityModel "
|
||||
<< viscosityModelType << endl;
|
||||
Info<< "Selecting viscosityModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(viscosityModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalError
|
||||
<< "viscosityModel::New(const dictionary&) : " << endl
|
||||
<< " unknown viscosityModelType type "
|
||||
<< viscosityModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid viscosityModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown viscosityModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid viscosityModel types :" << nl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<viscosityModel>(cstrIter()(dict));
|
||||
|
||||
@ -50,15 +50,14 @@ Foam::diameterModels::IATEsource::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(type);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(type);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown IATE source type "
|
||||
<< type << nl << nl
|
||||
<< "Valid IATE source types : " << endl
|
||||
<< "Valid IATE source types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ Foam::autoPtr<Foam::twoPhaseSystem> Foam::twoPhaseSystem::New
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
const word twoPhaseSystemType
|
||||
const word systemType
|
||||
(
|
||||
IOdictionary
|
||||
(
|
||||
@ -48,18 +48,16 @@ Foam::autoPtr<Foam::twoPhaseSystem> Foam::twoPhaseSystem::New
|
||||
).lookup("type")
|
||||
);
|
||||
|
||||
Info<< "Selecting twoPhaseSystem "
|
||||
<< twoPhaseSystemType << endl;
|
||||
Info<< "Selecting twoPhaseSystem " << systemType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(twoPhaseSystemType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(systemType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown twoPhaseSystemType type "
|
||||
<< twoPhaseSystemType << endl << endl
|
||||
<< "Valid twoPhaseSystem types are : " << endl
|
||||
<< "Unknown twoPhaseSystem type "
|
||||
<< systemType << nl << nl
|
||||
<< "Valid twoPhaseSystem types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -35,20 +35,19 @@ Foam::aspectRatioModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word aspectRatioModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting aspectRatioModel for "
|
||||
<< pair << ": " << aspectRatioModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(aspectRatioModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown aspectRatioModelType type "
|
||||
<< aspectRatioModelType << endl << endl
|
||||
<< "Valid aspectRatioModel types are : " << endl
|
||||
<< "Unknown aspectRatioModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid aspectRatioModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word dragModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting dragModel for "
|
||||
<< pair << ": " << dragModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(dragModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown dragModelType type "
|
||||
<< dragModelType << endl << endl
|
||||
<< "Valid dragModel types are : " << endl
|
||||
<< "Unknown dragModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid dragModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word heatTransferModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting heatTransferModel for "
|
||||
<< pair << ": " << heatTransferModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(heatTransferModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown heatTransferModelType type "
|
||||
<< heatTransferModelType << endl << endl
|
||||
<< "Valid heatTransferModel types are : " << endl
|
||||
<< "Unknown heatTransferModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid heatTransferModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word liftModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting liftModel for "
|
||||
<< pair << ": " << liftModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(liftModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown liftModelType type "
|
||||
<< liftModelType << endl << endl
|
||||
<< "Valid liftModel types are : " << endl
|
||||
<< "Unknown liftModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid liftModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -35,20 +35,19 @@ Foam::swarmCorrection::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word swarmCorrectionType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting swarmCorrection for "
|
||||
<< pair << ": " << swarmCorrectionType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(swarmCorrectionType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown swarmCorrectionType type "
|
||||
<< swarmCorrectionType << endl << endl
|
||||
<< "Valid swarmCorrection types are : " << endl
|
||||
<< "Unknown swarmCorrection type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid swarmCorrection types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -35,20 +35,19 @@ Foam::turbulentDispersionModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word turbulentDispersionModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting turbulentDispersionModel for "
|
||||
<< pair << ": " << turbulentDispersionModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(turbulentDispersionModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown turbulentDispersionModelType type "
|
||||
<< turbulentDispersionModelType << endl << endl
|
||||
<< "Valid turbulentDispersionModel types are : " << endl
|
||||
<< "Unknown turbulentDispersionModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid turbulentDispersionModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::virtualMassModel> Foam::virtualMassModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word virtualMassModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting virtualMassModel for "
|
||||
<< pair << ": " << virtualMassModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(virtualMassModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown virtualMassModelType type "
|
||||
<< virtualMassModelType << endl << endl
|
||||
<< "Valid virtualMassModel types are : " << endl
|
||||
<< "Unknown virtualMassModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid virtualMassModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::wallLubricationModel> Foam::wallLubricationModel::New
|
||||
const phasePair& pair
|
||||
)
|
||||
{
|
||||
word wallLubricationModelType(dict.lookup("type"));
|
||||
const word modelType(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting wallLubricationModel for "
|
||||
<< pair << ": " << wallLubricationModelType << endl;
|
||||
<< pair << ": " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(wallLubricationModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown wallLubricationModelType type "
|
||||
<< wallLubricationModelType << endl << endl
|
||||
<< "Valid wallLubricationModel types are : " << endl
|
||||
<< "Unknown wallLubricationModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid wallLubricationModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -33,23 +33,20 @@ Foam::kineticTheoryModels::conductivityModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word conductivityModelType(dict.lookup("conductivityModel"));
|
||||
const word modelType(dict.lookup("conductivityModel"));
|
||||
|
||||
Info<< "Selecting conductivityModel "
|
||||
<< conductivityModelType << endl;
|
||||
Info<< "Selecting conductivityModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(conductivityModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalError
|
||||
<< "conductivityModel::New(const dictionary&) : " << endl
|
||||
<< " unknown conductivityModelType type "
|
||||
<< conductivityModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid conductivityModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown conductivityModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid conductivityModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<conductivityModel>(cstrIter()(dict));
|
||||
|
||||
@ -33,24 +33,20 @@ Foam::kineticTheoryModels::frictionalStressModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word frictionalStressModelType(dict.lookup("frictionalStressModel"));
|
||||
const word modelType(dict.lookup("frictionalStressModel"));
|
||||
|
||||
Info<< "Selecting frictionalStressModel "
|
||||
<< frictionalStressModelType << endl;
|
||||
Info<< "Selecting frictionalStressModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(frictionalStressModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalError
|
||||
<< "frictionalStressModel::New(const dictionary&) : " << endl
|
||||
<< " unknown frictionalStressModelType type "
|
||||
<< frictionalStressModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid frictionalStressModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown frictionalStressModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid frictionalStressModelType types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<frictionalStressModel>(cstrIter()(dict));
|
||||
|
||||
@ -33,24 +33,20 @@ Foam::kineticTheoryModels::granularPressureModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word granularPressureModelType(dict.lookup("granularPressureModel"));
|
||||
const word modelType(dict.lookup("granularPressureModel"));
|
||||
|
||||
Info<< "Selecting granularPressureModel "
|
||||
<< granularPressureModelType << endl;
|
||||
Info<< "Selecting granularPressureModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(granularPressureModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalError
|
||||
<< "granularPressureModel::New(const dictionary&) : " << endl
|
||||
<< " unknown granularPressureModelType type "
|
||||
<< granularPressureModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid granularPressureModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown granularPressureModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid granularPressureModel types :" << nl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<granularPressureModel>(cstrIter()(dict));
|
||||
|
||||
@ -33,24 +33,20 @@ Foam::kineticTheoryModels::radialModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word radialModelType(dict.lookup("radialModel"));
|
||||
const word modelType(dict.lookup("radialModel"));
|
||||
|
||||
Info<< "Selecting radialModel "
|
||||
<< radialModelType << endl;
|
||||
Info<< "Selecting radialModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(radialModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalError
|
||||
<< "radialModel::New(const dictionary&) : " << endl
|
||||
<< " unknown radialModelType type "
|
||||
<< radialModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid radialModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown radialModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid radialModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<radialModel>(cstrIter()(dict));
|
||||
|
||||
@ -33,23 +33,20 @@ Foam::kineticTheoryModels::viscosityModel::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word viscosityModelType(dict.lookup("viscosityModel"));
|
||||
const word modelName(dict.lookup("viscosityModel"));
|
||||
|
||||
Info<< "Selecting viscosityModel "
|
||||
<< viscosityModelType << endl;
|
||||
Info<< "Selecting viscosityModel " << modelName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(viscosityModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalError
|
||||
<< "viscosityModel::New(const dictionary&) : " << endl
|
||||
<< " unknown viscosityModelType type "
|
||||
<< viscosityModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid viscosityModelType types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
||||
FatalErrorInFunction
|
||||
<< "Unknown viscosityModel type "
|
||||
<< modelName << nl << nl
|
||||
<< "Valid viscosityModel types :" << nl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<viscosityModel>(cstrIter()(dict));
|
||||
|
||||
@ -33,20 +33,19 @@ Foam::autoPtr<Foam::blendingMethod> Foam::blendingMethod::New
|
||||
const wordList& phaseNames
|
||||
)
|
||||
{
|
||||
word blendingMethodType(dict.lookup("type"));
|
||||
const word methodName(dict.lookup("type"));
|
||||
|
||||
Info<< "Selecting " << dict.dictName() << " blending method: "
|
||||
<< blendingMethodType << endl;
|
||||
<< methodName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(blendingMethodType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown blendingMethodType type "
|
||||
<< blendingMethodType << endl << endl
|
||||
<< "Valid blendingMethod types are : " << endl
|
||||
<< "Unknown blendingMethod type "
|
||||
<< methodName << nl << nl
|
||||
<< "Valid blendingMethod types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -51,15 +51,14 @@ Foam::diameterModels::IATEsource::New
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(type);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(type);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown IATE source type "
|
||||
<< type << nl << nl
|
||||
<< "Valid IATE source types : " << endl
|
||||
<< "Valid IATE source types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -33,32 +33,28 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
|
||||
const phaseModel& phase
|
||||
)
|
||||
{
|
||||
word diameterModelType
|
||||
(
|
||||
dict.lookup("diameterModel")
|
||||
);
|
||||
const word modelType(dict.lookup("diameterModel"));
|
||||
|
||||
Info << "Selecting diameterModel for phase "
|
||||
<< phase.name()
|
||||
<< ": "
|
||||
<< diameterModelType << endl;
|
||||
<< modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(diameterModelType);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown diameterModelType type "
|
||||
<< diameterModelType << endl << endl
|
||||
<< "Valid diameterModel types are : " << endl
|
||||
<< "Unknown diameterModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid diameterModel types :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()
|
||||
(
|
||||
dict.optionalSubDict(diameterModelType + "Coeffs"),
|
||||
dict.optionalSubDict(modelType + "Coeffs"),
|
||||
phase
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user