44 const dictionary& cellSizeFunctionDict,
45 const searchableSurface& surface,
46 const scalar& defaultCellSize,
50 dictionary(cellSizeFunctionDict),
52 surfaceCellSizeFunction_
54 surfaceCellSizeFunction::
New 61 coeffsDict_(optionalSubDict(type +
"Coeffs")),
62 defaultCellSize_(defaultCellSize),
63 regionIndices_(regionIndices),
65 priority_(cellSizeFunctionDict.
lookup<
label>(
"priority", true))
67 word mode = cellSizeFunctionDict.lookup(
"mode",
true);
69 if (surface_.hasVolumeType())
75 else if (mode ==
"outside")
77 sideMode_ = smOutside;
79 else if (mode ==
"bothSides")
81 sideMode_ = rmBothsides;
86 <<
"Unknown mode, expected: inside, outside or bothSides" <<
nl 92 if (mode !=
"bothSides")
95 <<
"surface does not support volumeType, defaulting mode to " 100 sideMode_ = rmBothsides;
106 <<
"Cell size function for surface " << surface.name()
108 <<
", priority = " << priority_
109 <<
", regions = " << regionIndices_
119 const dictionary& cellSizeFunctionDict,
120 const searchableSurface& surface,
121 const scalar& defaultCellSize,
125 word cellSizeFunctionTypeName
127 cellSizeFunctionDict.lookup(
"cellSizeFunction")
130 Info<<
indent <<
"Selecting cellSizeFunction " << cellSizeFunctionTypeName
133 dictionaryConstructorTable::iterator cstrIter =
134 dictionaryConstructorTablePtr_->find(cellSizeFunctionTypeName);
136 if (cstrIter == dictionaryConstructorTablePtr_->end())
139 <<
"Unknown cellSizeFunction type " 140 << cellSizeFunctionTypeName
142 <<
"Valid cellSizeFunction types are :" << endl
143 << dictionaryConstructorTablePtr_->toc()
147 return autoPtr<cellSizeFunction>
151 cellSizeFunctionDict,
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & indent(Ostream &os)
Indent stream.
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.
Macros for easy insertion into run-time selection tables.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
stressControl lookup("compactNormalStress") >> compactNormalStress
cellSizeFunction(const word &type, const dictionary &cellSizeFunctionDict, const searchableSurface &surface, const scalar &defaultCellSize, const labelList regionIndices)
Construct from components.
List< label > labelList
A List of labels.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
virtual ~cellSizeFunction()
Destructor.
#define WarningInFunction
Report a warning using Foam::Warning.
static scalar snapToSurfaceTol_
Point closeness tolerance to a surface where the function "snaps" to.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const doubleScalar e
Elementary charge.
static autoPtr< cellSizeFunction > New(const dictionary &cellSizeFunctionDict, const searchableSurface &surface, const scalar &defaultCellSize, const labelList regionIndices)
Return a reference to the selected cellSizeFunction.