ENH: documentation and input simplification for surfaceFeatureExtract

This commit is contained in:
Mark Olesen
2017-06-01 15:46:42 +02:00
parent a335ba6b6b
commit b312f0ba40
8 changed files with 294 additions and 209 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -70,22 +70,20 @@ Foam::surfaceFeaturesExtraction::method::New
{
const word methodName = dict.lookup("extractionMethod");
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(methodName);
auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodName);
if (!cstrIter.found())
{
FatalIOErrorInFunction
(
dict
) << "Unknown extractionMethod "
<< methodName << nl << nl
<< "Valid extraction methods: :" << nl
) << "Unknown extractionMethod " << methodName << nl << nl
<< "Valid extraction methods:" << nl
<< flatOutput(dictionaryConstructorTablePtr_->sortedToc())
<< exit(FatalIOError);
}
return autoPtr<method>(cstrIter()(dict));
return autoPtr<method>(cstrIter.object()(dict));
}