45 const dictionary& initialPointsDict,
46 const searchableSurface& surface,
47 const scalar& defaultCellSize,
48 const labelList regionIndices
61 coeffsDict().
get<scalar>(
"distanceCoeff") * defaultCellSize
63 distanceSqr_(
sqr(distance_))
72 const pointIndexHit& hitPt,
75 scalarField& shapeSizes
80 const scalar distanceCellSize =
88 shapePts[0] = pt -
n*distance_;
89 shapePts[1] = pt +
n*distance_;
91 shapeSizes[0] = distanceCellSize;
92 shapeSizes[1] = distanceCellSize;
99 shapePts[0] = pt -
n*distance_;
100 shapeSizes[0] = distanceCellSize;
105 shapeSizes.resize(1);
107 shapePts[0] = pt -
n*distance_;
108 shapeSizes[0] = distanceCellSize;
123 List<pointIndexHit> hits;
137 const point& hitPt = hitInfo.hitPoint();
138 const label index = hitInfo.index();
140 if (sideMode_ == rmBothsides)
142 size = surfaceCellSizeFunction_().interpolate(hitPt, index);
149 if (
mag(pt - hitInfo.hitPoint()) < snapToSurfaceTol_)
151 size = surfaceCellSizeFunction_().interpolate(hitPt, index);
157 List<volumeType> vTL;
159 surface_.getVolumeType(ptF, vTL);
161 bool functionApplied =
false;
165 sideMode_ == smInside
169 size = surfaceCellSizeFunction_().interpolate(hitPt, index);
171 functionApplied =
true;
175 sideMode_ == smOutside
179 size = surfaceCellSizeFunction_().interpolate(hitPt, index);
181 functionApplied =
true;
184 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.
sideMode sideMode_
Mode of size specification, i.e. inside, outside or bothSides.
autoPtr< surfaceCellSizeFunction > surfaceCellSizeFunction_
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.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)