48 const dictionary& cellSizeFunctionDict,
49 const searchableSurface&
surface,
50 const scalar& defaultCellSize,
56 surfaceCellSizeFunction_
58 surfaceCellSizeFunction::
New 65 coeffsDict_(optionalSubDict(
type +
"Coeffs")),
66 defaultCellSize_(defaultCellSize),
67 regionIndices_(regionIndices),
71 cellSizeFunctionDict.
get<label>(
"priority", keyType::REGEX_RECURSIVE)
77 if (surface_.hasVolumeType())
83 else if (
mode ==
"outside")
85 sideMode_ = smOutside;
87 else if (
mode ==
"bothSides")
89 sideMode_ = rmBothsides;
94 <<
"Unknown mode, expected: inside, outside or bothSides" <<
nl 100 if (
mode !=
"bothSides")
103 <<
"surface does not support volumeType, defaulting mode to " 108 sideMode_ = rmBothsides;
114 <<
"Cell size function for surface " <<
surface.name()
116 <<
", priority = " << priority_
117 <<
", regions = " << regionIndices_
127 const dictionary&
dict,
128 const searchableSurface&
surface,
129 const scalar& defaultCellSize,
133 const word modelType(
dict.
get<word>(
"cellSizeFunction"));
135 Info<<
indent <<
"Selecting cellSizeFunction " << modelType <<
endl;
137 auto* ctorPtr = dictionaryConstructorTable(modelType);
146 *dictionaryConstructorTablePtr_
150 return autoPtr<cellSizeFunction>
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
Ostream & indent(Ostream &os)
Indent stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
Macros for easy insertion into run-time selection tables.
const dimensionedScalar e
Elementary charge.
const wordList surface
Standard surface field types (scalar, vector, tensor, etc)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
int debug
Static debugging option.
cellSizeFunction(const cellSizeFunction &)=delete
No copy construct.
defineTypeNameAndDebug(combustionModel, 0)
virtual ~cellSizeFunction()
Destructor.
#define WarningInFunction
Report a warning using Foam::Warning.
messageStream Info
Information stream (stdout output on master, null elsewhere)
static scalar snapToSurfaceTol_
Point closeness tolerance to a surface where the function "snaps" to.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
static autoPtr< cellSizeFunction > New(const dictionary &cellSizeFunctionDict, const searchableSurface &surface, const scalar &defaultCellSize, const labelList regionIndices)
Return a reference to the selected cellSizeFunction.
List< label > labelList
A List of labels.
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...