45 const dictionary& initialPointsDict,
46 const searchableSurface& surface,
47 const scalar& defaultCellSize,
59 referencePoint_(coeffsDict().
lookup(
"referencePoint")),
62 coeffsDict().
lookup<scalar>(
"referenceCellSizeCoeff")
65 direction_(coeffsDict().
lookup(
"direction")),
66 cellSizeGradient_(coeffsDict().
lookup<scalar>(
"cellSizeGradient"))
68 direction_ /=
mag(direction_);
74 scalar linearSpatial::sizeFunction(
const point& pt)
const 78 + ((pt - referencePoint_) & direction_)*cellSizeGradient_;
115 size = sizeFunction(pt);
122 List<pointIndexHit> hits;
138 size = sizeFunction(pt);
144 List<volumeType> vTL;
148 bool functionApplied =
false;
156 size = sizeFunction(pt);
158 functionApplied =
true;
166 size = sizeFunction(pt);
168 functionApplied =
true;
171 return functionApplied;
dimensionedSymmTensor sqr(const dimensionedVector &dv)
linearSpatial(const dictionary &initialPointsDict, const searchableSurface &surface, const scalar &defaultCellSize, const labelList regionIndices)
Construct from components.
PointIndexHit< point > pointIndexHit
Vector< scalar > vector
A scalar version of the templated Vector.
virtual bool cellSize(const point &pt, scalar &size) const
Modify scalar argument to the cell size specified by function.
Macros for easy insertion into run-time selection tables.
const labelList regionIndices_
Index of the region of the surface that this cell size function.
vectorField pointField
pointField is a vectorField.
stressControl lookup("compactNormalStress") >> compactNormalStress
virtual void findNearest(const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const =0
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
List< label > labelList
A List of labels.
virtual bool sizeLocations(const pointIndexHit &hitPt, const vector &n, pointField &shapePts, scalarField &shapeSizes) const
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
vector point
Point is a vector.
virtual void getVolumeType(const pointField &, List< volumeType > &) const =0
Determine type (inside/outside) for point. unknown if.
static scalar snapToSurfaceTol_
Point closeness tolerance to a surface where the function "snaps" to.
dimensioned< scalar > mag(const dimensioned< Type > &)
const searchableSurface & surface_
Reference to the searchableSurface that cellSizeFunction.
sideMode sideMode_
Mode of size specification, i.e. inside, outside or bothSides.