34template<
class Po
int,
class Po
intRef>
47 const scalar
fac = 1 + tol;
65 scalar radiusSqr =
magSqr(ctr - a_);
69 radiusSqr < minRadiusSqr
75 minRadiusSqr = radiusSqr;
80 scalar radiusSqr =
magSqr(ctr - a_);
84 radiusSqr < minRadiusSqr
90 minRadiusSqr = radiusSqr;
95 scalar radiusSqr =
magSqr(ctr - a_);
99 radiusSqr < minRadiusSqr
105 minRadiusSqr = radiusSqr;
110 scalar radiusSqr =
magSqr(ctr - b_);
114 radiusSqr < minRadiusSqr
120 minRadiusSqr = radiusSqr;
129 point ctr = 0.5*(a_ + b_);
130 scalar radiusSqr =
magSqr(a_ - ctr);
131 scalar testRadSrq = facSqr*radiusSqr;
135 radiusSqr < minRadiusSqr
136 &&
magSqr(c_-ctr) <= testRadSrq
137 &&
magSqr(d_-ctr) <= testRadSrq)
141 minRadiusSqr = radiusSqr;
147 point ctr = 0.5*(a_ + c_);
148 scalar radiusSqr =
magSqr(a_ - ctr);
149 scalar testRadSrq = facSqr*radiusSqr;
153 radiusSqr < minRadiusSqr
154 &&
magSqr(b_-ctr) <= testRadSrq
155 &&
magSqr(d_-ctr) <= testRadSrq
160 minRadiusSqr = radiusSqr;
166 point ctr = 0.5*(a_ + d_);
167 scalar radiusSqr =
magSqr(a_ - ctr);
168 scalar testRadSrq = facSqr*radiusSqr;
172 radiusSqr < minRadiusSqr
173 &&
magSqr(b_-ctr) <= testRadSrq
174 &&
magSqr(c_-ctr) <= testRadSrq
179 minRadiusSqr = radiusSqr;
185 point ctr = 0.5*(b_ + c_);
186 scalar radiusSqr =
magSqr(b_ - ctr);
187 scalar testRadSrq = facSqr*radiusSqr;
191 radiusSqr < minRadiusSqr
192 &&
magSqr(a_-ctr) <= testRadSrq
193 &&
magSqr(d_-ctr) <= testRadSrq
198 minRadiusSqr = radiusSqr;
204 point ctr = 0.5*(b_ + d_);
205 scalar radiusSqr =
magSqr(b_ - ctr);
206 scalar testRadSrq = facSqr*radiusSqr;
210 radiusSqr < minRadiusSqr
211 &&
magSqr(a_-ctr) <= testRadSrq
212 &&
magSqr(c_-ctr) <= testRadSrq)
216 minRadiusSqr = radiusSqr;
222 point ctr = 0.5*(c_ + d_);
223 scalar radiusSqr =
magSqr(c_ - ctr);
224 scalar testRadSrq = facSqr*radiusSqr;
228 radiusSqr < minRadiusSqr
229 &&
magSqr(a_-ctr) <= testRadSrq
230 &&
magSqr(b_-ctr) <= testRadSrq
235 minRadiusSqr = radiusSqr;
246template<
class Po
int,
class Po
intRef>
260 buffer[0] = (1.0/9.0)*
magSqr(Sa())/magVol;
261 buffer[1] = (1.0/9.0)*
magSqr(Sb())/magVol;
262 buffer[2] = (1.0/9.0)*
magSqr(Sc())/magVol;
263 buffer[3] = (1.0/9.0)*
magSqr(Sd())/magVol;
267template<
class Po
int,
class Po
intRef>
288 buffer[0] = (1.0/9.0)*(sa & sb)/magVol;
289 buffer[1] = (1.0/9.0)*(sa & sc)/magVol;
290 buffer[2] = (1.0/9.0)*(sa & sd)/magVol;
291 buffer[3] = (1.0/9.0)*(sd & sb)/magVol;
292 buffer[4] = (1.0/9.0)*(sb & sc)/magVol;
293 buffer[5] = (1.0/9.0)*(sd & sc)/magVol;
297template<
class Po
int,
class Po
intRef>
308 buffer[0] = (1.0/9.0)*
sqr(Sa())/magVol;
309 buffer[1] = (1.0/9.0)*
sqr(Sb())/magVol;
310 buffer[2] = (1.0/9.0)*
sqr(Sc())/magVol;
311 buffer[3] = (1.0/9.0)*
sqr(Sd())/magVol;
315template<
class Po
int,
class Po
intRef>
332 buffer[0] = (1.0/9.0)*(sa * sb)/magVol;
333 buffer[1] = (1.0/9.0)*(sa * sc)/magVol;
334 buffer[2] = (1.0/9.0)*(sa * sd)/magVol;
335 buffer[3] = (1.0/9.0)*(sd * sb)/magVol;
336 buffer[4] = (1.0/9.0)*(sb * sc)/magVol;
337 buffer[5] = (1.0/9.0)*(sd * sc)/magVol;
341template<
class Po
int,
class Po
intRef>
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
void setHit() noexcept
Set the hit status on.
const point_type & rawPoint() const noexcept
The point, no checks.
void setPoint(const point_type &p)
Set the point.
void setDistance(const scalar d) noexcept
Set the distance.
void setMiss(const bool eligible) noexcept
Set the hit status off and set the eligible miss status.
A bounding box defined in terms of min/max extrema points.
pointHit containmentSphere(const scalar tol) const
Return (min)containment sphere, i.e. the smallest sphere with.
void gradNiDotGradNj(scalarField &buffer) const
void gradNiGradNi(tensorField &buffer) const
boundBox bounds() const
Calculate the bounding box.
void gradNiGradNj(tensorField &buffer) const
void gradNiSquared(scalarField &buffer) const
Fill buffer with shape function products.
A triangle primitive used to calculate face normals and swept volumes.
Point circumCentre() const
Return circum-centre.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Calculate the second temporal derivative.