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,28 +27,33 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::frictionalStressModel> Foam::frictionalStressModel::New
|
||||
Foam::autoPtr<Foam::frictionalStressModel>
|
||||
Foam::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);
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
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);
|
||||
FatalErrorIn
|
||||
(
|
||||
"frictionalStressModel::New(const dictionary&)"
|
||||
)
|
||||
<< "Unknown frictionalStressModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid frictionalStressModel types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<frictionalStressModel>(cstrIter()(dict));
|
||||
|
||||
Reference in New Issue
Block a user