STYLE: more consistent New methods, use unregistered IOobject where appropriate

This commit is contained in:
Mark Olesen
2010-04-20 17:13:35 +02:00
parent 9707e5c100
commit 5cfa97624e
166 changed files with 1498 additions and 1540 deletions

View File

@ -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));