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:
@ -25,34 +25,27 @@ License
|
||||
|
||||
#include "tabulatedWallFunction.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace tabulatedWallFunctions
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<tabulatedWallFunction> tabulatedWallFunction::New
|
||||
Foam::autoPtr<Foam::tabulatedWallFunctions::tabulatedWallFunction>
|
||||
Foam::tabulatedWallFunctions::tabulatedWallFunction::New
|
||||
(
|
||||
const dictionary& dict,
|
||||
const polyMesh& mesh
|
||||
)
|
||||
{
|
||||
word twfTypeName = dict.lookup("tabulatedWallFunction");
|
||||
const word functionName = dict.lookup("tabulatedWallFunction");
|
||||
|
||||
Info<< "Selecting tabulatedWallFunction " << twfTypeName << endl;
|
||||
Info<< "Selecting tabulatedWallFunction " << functionName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(twfTypeName);
|
||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(functionName);
|
||||
|
||||
if (!cstrIter.found())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown tabulatedWallFunction type " << twfTypeName
|
||||
<< "Unknown tabulatedWallFunction type " << functionName
|
||||
<< nl << nl << "Valid tabulatedWallFunction types are:" << nl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
@ -60,9 +53,4 @@ autoPtr<tabulatedWallFunction> tabulatedWallFunction::New
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace tabulatedWallFunctions
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user