47 const searchableSurface& surface,
48 const scalar& defaultCellSize,
49 const labelList regionIndices
62 coeffsDict().
get<
point>(
"referencePoint")
66 coeffsDict().
get<scalar>(
"referenceCellSizeCoeff") * defaultCellSize
70 coeffsDict().
get<
vector>(
"direction").normalise()
74 coeffsDict().
get<scalar>(
"cellSizeGradient")
81Foam::scalar Foam::linearSpatial::sizeFunction(
const point& pt)
const
85 + ((pt - referencePoint_) & direction_)*cellSizeGradient_;
100 if (sideMode_ == rmBothsides)
103 else if (sideMode_ == smInside)
106 else if (sideMode_ == smOutside)
120 if (sideMode_ == rmBothsides)
122 size = sizeFunction(pt);
145 size = sizeFunction(pt);
153 surface_.getVolumeType(ptF, vTL);
155 bool functionApplied =
false;
159 sideMode_ == smInside
163 size = sizeFunction(pt);
165 functionApplied =
true;
169 sideMode_ == smOutside
173 size = sizeFunction(pt);
175 functionApplied =
true;
178 return functionApplied;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Abstract base class for specifying target cell sizes.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
linearSpatial(const dictionary &initialPointsDict, const searchableSurface &surface, const scalar &defaultCellSize, const labelList regionIndices)
Construct from components.
virtual bool sizeLocations(const pointIndexHit &hitPt, const vector &n, pointField &shapePts, scalarField &shapeSizes) const
virtual bool cellSize(const point &pt, scalar &size) const
Modify scalar argument to the cell size specified by function.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
@ OUTSIDE
A location outside the volume.
@ INSIDE
A location inside the volume.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
const wordList surface
Standard surface field types (scalar, vector, tensor, etc).
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
vector point
Point is a vector.
vectorField pointField
pointField is a vectorField.
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.