35 template<
class TrackingData>
36 inline bool Foam::wallPoint::update
51 const scalar dist2 =
magSqr(pt -
w2.origin());
57 origin_ =
w2.origin();
62 const scalar
diff = distSqr_ - dist2;
70 if ((
diff < SMALL) || ((distSqr_ > SMALL) && (
diff/distSqr_ < tol)))
79 origin_ =
w2.origin();
104 template<
class TrackingData>
107 return distSqr_ > -SMALL;
112 template<
class TrackingData>
121 const scalar
diff =
mag(distSqr() -
w2.distSqr());
129 if ((distSqr() > SMALL) && ((
diff/distSqr()) < tol))
141 template<
class TrackingData>
147 const point& faceCentre,
151 origin_ -= faceCentre;
155 template<
class TrackingData>
169 template<
class TrackingData>
175 const point& faceCentre,
180 origin_ += faceCentre;
185 template<
class TrackingData>
189 const label thisCelli,
190 const label neighbourFacei,
208 template<
class TrackingData>
212 const label thisFacei,
213 const label neighbourCelli,
231 template<
class TrackingData>
235 const label thisFacei,
252 template<
class TrackingData>
265 inline bool Foam::wallPoint::operator==
270 return origin_ == rhs.origin_;
274 inline bool Foam::wallPoint::operator!=
279 return !(*
this == rhs);
void transform(const polyMesh &, const tensor &, TrackingData &td)
Apply rotation matrix to any coordinates.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
void enterDomain(const polyMesh &, const polyPatch &, const label patchFacei, const point &faceCentre, TrackingData &td)
Reverse of leaveDomain.
bool sameGeometry(const polyMesh &, const wallPoint &, const scalar, TrackingData &td) const
Check for identical geometrical data (eg, cyclics checking)
void leaveDomain(const polyMesh &, const polyPatch &, const label patchFacei, const point &faceCentre, TrackingData &td)
Convert any absolute coordinates into relative to (patch)face centre.
bool valid(TrackingData &td) const
Changed or contains original (invalid) value.
bool updateCell(const polyMesh &, const label thisCelli, const label neighbourFacei, const wallPoint &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring face.
const vectorField & cellCentres() const
wallPoint()
Default construct.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Holds information regarding nearest wall point. Used in wall distance calculation.
const vectorField & faceCentres() const
bool equal(const wallPoint &, TrackingData &td) const
Test for equality, with TrackingData.
vector point
Point is a vector.
Mesh consisting of general polyhedral cells.
bool updateFace(const polyMesh &, const label thisFacei, const label neighbourCelli, const wallPoint &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring cell.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
A patch is a list of labels that address the faces in the global face list.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
Tensor of scalars, i.e. Tensor<scalar>.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)