33 template<
class Po
int,
class Po
intRef>
46 const scalar
fac = 1 + tol;
64 scalar radiusSqr =
magSqr(ctr - a_);
68 radiusSqr < minRadiusSqr
74 minRadiusSqr = radiusSqr;
79 scalar radiusSqr =
magSqr(ctr - a_);
83 radiusSqr < minRadiusSqr
89 minRadiusSqr = radiusSqr;
94 scalar radiusSqr =
magSqr(ctr - a_);
98 radiusSqr < minRadiusSqr
104 minRadiusSqr = radiusSqr;
109 scalar radiusSqr =
magSqr(ctr - b_);
113 radiusSqr < minRadiusSqr
119 minRadiusSqr = radiusSqr;
128 point ctr = 0.5*(a_ + b_);
129 scalar radiusSqr =
magSqr(a_ - ctr);
130 scalar testRadSrq = facSqr*radiusSqr;
134 radiusSqr < minRadiusSqr
135 &&
magSqr(c_-ctr) <= testRadSrq
136 &&
magSqr(d_-ctr) <= testRadSrq)
140 minRadiusSqr = radiusSqr;
146 point ctr = 0.5*(a_ + c_);
147 scalar radiusSqr =
magSqr(a_ - ctr);
148 scalar testRadSrq = facSqr*radiusSqr;
152 radiusSqr < minRadiusSqr
153 &&
magSqr(b_-ctr) <= testRadSrq
154 &&
magSqr(d_-ctr) <= testRadSrq
159 minRadiusSqr = radiusSqr;
165 point ctr = 0.5*(a_ + d_);
166 scalar radiusSqr =
magSqr(a_ - ctr);
167 scalar testRadSrq = facSqr*radiusSqr;
171 radiusSqr < minRadiusSqr
172 &&
magSqr(b_-ctr) <= testRadSrq
173 &&
magSqr(c_-ctr) <= testRadSrq
178 minRadiusSqr = radiusSqr;
184 point ctr = 0.5*(b_ + c_);
185 scalar radiusSqr =
magSqr(b_ - ctr);
186 scalar testRadSrq = facSqr*radiusSqr;
190 radiusSqr < minRadiusSqr
191 &&
magSqr(a_-ctr) <= testRadSrq
192 &&
magSqr(d_-ctr) <= testRadSrq
197 minRadiusSqr = radiusSqr;
203 point ctr = 0.5*(b_ + d_);
204 scalar radiusSqr =
magSqr(b_ - ctr);
205 scalar testRadSrq = facSqr*radiusSqr;
209 radiusSqr < minRadiusSqr
210 &&
magSqr(a_-ctr) <= testRadSrq
211 &&
magSqr(c_-ctr) <= testRadSrq)
215 minRadiusSqr = radiusSqr;
221 point ctr = 0.5*(c_ + d_);
222 scalar radiusSqr =
magSqr(c_ - ctr);
223 scalar testRadSrq = facSqr*radiusSqr;
227 radiusSqr < minRadiusSqr
228 &&
magSqr(a_-ctr) <= testRadSrq
229 &&
magSqr(b_-ctr) <= testRadSrq
234 minRadiusSqr = radiusSqr;
245 template<
class Po
int,
class Po
intRef>
259 buffer[0] = (1.0/9.0)*
magSqr(Sa())/magVol;
260 buffer[1] = (1.0/9.0)*
magSqr(Sb())/magVol;
261 buffer[2] = (1.0/9.0)*
magSqr(Sc())/magVol;
262 buffer[3] = (1.0/9.0)*
magSqr(Sd())/magVol;
266 template<
class Po
int,
class Po
intRef>
287 buffer[0] = (1.0/9.0)*(sa & sb)/magVol;
288 buffer[1] = (1.0/9.0)*(sa & sc)/magVol;
289 buffer[2] = (1.0/9.0)*(sa & sd)/magVol;
290 buffer[3] = (1.0/9.0)*(sd & sb)/magVol;
291 buffer[4] = (1.0/9.0)*(sb & sc)/magVol;
292 buffer[5] = (1.0/9.0)*(sd & sc)/magVol;
296 template<
class Po
int,
class Po
intRef>
307 buffer[0] = (1.0/9.0)*
sqr(Sa())/magVol;
308 buffer[1] = (1.0/9.0)*
sqr(Sb())/magVol;
309 buffer[2] = (1.0/9.0)*
sqr(Sc())/magVol;
310 buffer[3] = (1.0/9.0)*
sqr(Sd())/magVol;
314 template<
class Po
int,
class Po
intRef>
331 buffer[0] = (1.0/9.0)*(sa * sb)/magVol;
332 buffer[1] = (1.0/9.0)*(sa * sc)/magVol;
333 buffer[2] = (1.0/9.0)*(sa * sd)/magVol;
334 buffer[3] = (1.0/9.0)*(sd * sb)/magVol;
335 buffer[4] = (1.0/9.0)*(sb * sc)/magVol;
336 buffer[5] = (1.0/9.0)*(sd * sc)/magVol;
Calculate the second temporal derivative.
pointHit containmentSphere(const scalar tol) const
Return (min)containment sphere, i.e. the smallest sphere with.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void setPoint(const point_type &p)
Set the point.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
void gradNiSquared(scalarField &buffer) const
Fill buffer with shape function products.
dimensionedScalar sqrt(const dimensionedScalar &ds)
void setHit() noexcept
Set the hit status on.
void gradNiGradNi(tensorField &buffer) const
void setDistance(const scalar d) noexcept
Set the distance.
Describes the interaction of a object and a (templated) point. It carries the info of a successful hi...
void setMiss(const bool eligible) noexcept
Set the hit status off and set the eligible miss status.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void gradNiGradNj(tensorField &buffer) const
triangle< point, const point & > triPointRef
A triangle using referred points.
const point_type & point() const noexcept
Return the point, no checks.
void gradNiDotGradNj(scalarField &buffer) const
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)