35 template<
class TrackingData>
36 inline bool Foam::patchEdgeFaceInfo::update
39 const patchEdgeFaceInfo&
w2,
44 const scalar dist2 =
magSqr(pt -
w2.origin());
50 origin_ =
w2.origin();
55 const scalar
diff = distSqr_ - dist2;
63 if ((
diff < SMALL) || ((distSqr_ > SMALL) && (
diff/distSqr_ < tol)))
72 origin_ =
w2.origin();
80 template<
class TrackingData>
81 inline bool Foam::patchEdgeFaceInfo::update
83 const patchEdgeFaceInfo&
w2,
91 distSqr_ =
w2.distSqr();
92 origin_ =
w2.origin();
97 const scalar
diff = distSqr_ -
w2.distSqr();
105 if ((
diff < SMALL) || ((distSqr_ > SMALL) && (
diff/distSqr_ < tol)))
113 distSqr_ =
w2.distSqr();
114 origin_ =
w2.origin();
142 template<
class TrackingData>
149 template<
class TrackingData>
163 template<
class TrackingData>
184 return update(eMid, faceInfo, tol, td);
188 template<
class TrackingData>
194 const bool sameOrientation,
199 return update(edgeInfo, tol, td);
203 template<
class TrackingData>
215 return update(
patch.faceCentres()[facei], edgeInfo, tol, td);
219 template<
class TrackingData>
232 inline bool Foam::patchEdgeFaceInfo::operator==
237 return origin_ == rhs.origin_;
241 inline bool Foam::patchEdgeFaceInfo::operator!=
246 return !(*
this == rhs);
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
bool valid(TrackingData &td) const
Changed or contains original (invalid) value.
patchEdgeFaceInfo()
Default construct.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
bool equal(const patchEdgeFaceInfo &, TrackingData &td) const
Test for equality, with TrackingData.
bool updateFace(const polyMesh &mesh, const primitivePatch &patch, const label facei, const label edgeI, const patchEdgeFaceInfo &edgeInfo, const scalar tol, TrackingData &td)
Influence of edge on face.
A list of faces which address into the list of points.
const dimensionedScalar e
Elementary charge.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
bool updateEdge(const polyMesh &mesh, const primitivePatch &patch, const label edgeI, const label facei, const patchEdgeFaceInfo &faceInfo, const scalar tol, TrackingData &td)
Influence of face on edge.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
vector point
Point is a vector.
const std::string patch
OpenFOAM patch number as a std::string.
Mesh consisting of general polyhedral cells.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
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)
void transform(const polyMesh &mesh, const primitivePatch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.