46 const dictionary& initialPointsDict,
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);
129 List<pointIndexHit> hits;
145 size = sizeFunction(pt);
151 List<volumeType> vTL;
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.
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)
const wordList surface
Standard surface field types (scalar, vector, tensor, etc)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
PointIndexHit< point > pointIndexHit
A PointIndexHit for 3D points.
vectorField pointField
pointField is a vectorField.
vector point
Point is a vector.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.