42 const dictionary& surfaceCellSizeFunctionDict,
43 const searchableSurface& surface,
44 const scalar& defaultCellSize
47 dictionary(surfaceCellSizeFunctionDict),
49 coeffsDict_(optionalSubDict(type +
"Coeffs")),
50 defaultCellSize_(defaultCellSize),
53 lookupOrDefault<scalar>(
"refinementFactor", 1.0)
63 const searchableSurface& surface,
64 const scalar& defaultCellSize
67 word surfaceCellSizeFunctionTypeName
69 surfaceCellSizeFunctionDict.lookup(
"surfaceCellSizeFunction")
72 Info<<
indent <<
"Selecting surfaceCellSizeFunction " 73 << surfaceCellSizeFunctionTypeName <<
endl;
75 dictionaryConstructorTable::iterator cstrIter =
76 dictionaryConstructorTablePtr_->find(surfaceCellSizeFunctionTypeName);
78 if (cstrIter == dictionaryConstructorTablePtr_->end())
81 <<
"Unknown surfaceCellSizeFunction type " 82 << surfaceCellSizeFunctionTypeName
84 <<
"Valid surfaceCellSizeFunction types are :" << endl
85 << dictionaryConstructorTablePtr_->toc()
89 return autoPtr<surfaceCellSizeFunction>
91 cstrIter()(surfaceCellSizeFunctionDict, surface, defaultCellSize)
Ostream & indent(Ostream &os)
Indent stream.
static autoPtr< surfaceCellSizeFunction > New(const dictionary &surfaceCellSizeFunctionDict, const searchableSurface &surface, const scalar &defaultCellSize)
Return a reference to the selected surfaceCellSizeFunction.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual ~surfaceCellSizeFunction()
Destructor.
Macros for easy insertion into run-time selection tables.
dictionary()
Construct top-level dictionary null.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
surfaceCellSizeFunction(const word &type, const dictionary &surfaceCellSizeFunctionDict, const searchableSurface &surface, const scalar &defaultCellSize)
Construct from components.