mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: more consistent New methods, use unregistered IOobject where appropriate
This commit is contained in:
@ -27,25 +27,30 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::extrudeModel> Foam::extrudeModel::New
|
||||
Foam::autoPtr<Foam::extrudeModel>
|
||||
Foam::extrudeModel::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word extrudeModelType(dict.lookup("extrudeModel"));
|
||||
const word modelType
|
||||
(
|
||||
dict.lookup("extrudeModel")
|
||||
);
|
||||
|
||||
Info<< "Selecting extrudeModel " << extrudeModelType << endl;
|
||||
Info<< "Selecting extrudeModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(extrudeModelType);
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn("extrudeModel::New(const dictionary&)")
|
||||
<< "Unknown extrudeModelType type "
|
||||
<< extrudeModelType
|
||||
<< ", constructor not in hash table" << nl << nl
|
||||
<< " Valid extrudeModel types are :" << nl
|
||||
FatalErrorIn
|
||||
(
|
||||
"extrudeModel::New(const dictionary&)"
|
||||
) << "Unknown extrudeModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid extrudeModel types are :" << nl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc() << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -55,4 +60,3 @@ Foam::autoPtr<Foam::extrudeModel> Foam::extrudeModel::New
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
Reference in New Issue
Block a user