48 const dictionary& cellSizeFunctionDict,
49 const searchableSurface& surface,
50 const scalar& defaultCellSize,
51 const labelList regionIndices
54 dictionary(cellSizeFunctionDict),
56 surfaceCellSizeFunction_
58 surfaceCellSizeFunction::
New
65 coeffsDict_(optionalSubDict(
type +
"Coeffs")),
66 defaultCellSize_(defaultCellSize),
67 regionIndices_(regionIndices),
71 cellSizeFunctionDict.
get<label>(
"priority", keyType::REGEX_RECURSIVE)
75 cellSizeFunctionDict.get<word>(
"mode", 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,
130 const labelList regionIndices
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>
Macros for easy insertion into run-time selection tables.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Abstract base class for specifying target cell sizes.
static scalar snapToSurfaceTol_
Point closeness tolerance to a surface where the function "snaps" to.
virtual ~cellSizeFunction()
Destructor.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
const wordList surface
Standard surface field types (scalar, vector, tensor, etc)
messageStream Info
Information stream (stdout output on master, null elsewhere)
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & indent(Ostream &os)
Indent stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.