32 template<
class TrackingData>
33 inline bool Foam::patchEdgeFacePoint::update
36 const patchEdgeFacePoint&
w2,
41 scalar dist2 =
magSqr(pt -
w2.origin());
47 origin_ =
w2.origin();
52 scalar
diff = distSqr_ - dist2;
60 if ((
diff < small) || ((distSqr_ > small) && (
diff/distSqr_ < tol)))
69 origin_ =
w2.origin();
77 template<
class TrackingData>
78 inline bool Foam::patchEdgeFacePoint::update
80 const patchEdgeFacePoint&
w2,
88 distSqr_ =
w2.distSqr();
89 origin_ =
w2.origin();
94 scalar
diff = distSqr_ -
w2.distSqr();
102 if ((
diff < small) || ((distSqr_ > small) && (
diff/distSqr_ < tol)))
110 distSqr_ =
w2.distSqr();
111 origin_ =
w2.origin();
152 template<
class TrackingData>
159 template<
class TrackingData>
173 template<
class TrackingData>
192 return update(eMid, faceInfo, tol, td);
196 template<
class TrackingData>
202 const bool sameOrientation,
207 return update(edgeInfo, tol, td);
211 template<
class TrackingData>
223 return update(patch.
faceCentres()[facei], edgeInfo, tol, td);
227 template<
class TrackingData>
240 inline bool Foam::patchEdgeFacePoint::operator==
245 return origin() == rhs.origin();
249 inline bool Foam::patchEdgeFacePoint::operator!=
254 return !(*
this == rhs);
266 return os << wDist.origin() <<
token::SPACE << wDist.distSqr();
276 return is >> wDist.origin_ >> wDist.distSqr_;
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
const Field< PointType > & points() const
Return reference to global points.
const Field< PointType > & faceCentres() const
Return face centres for patch.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Transport of nearest point location for use in PatchEdgeFaceWave.
patchEdgeFacePoint()
Construct null.
bool valid(TrackingData &td) const
Check whether origin has been changed at all or.
bool equal(const patchEdgeFacePoint &, TrackingData &td) const
Same (like operator==)
bool updateFace(const polyMesh &mesh, const primitivePatch &patch, const label facei, const label edgei, const patchEdgeFacePoint &edgeInfo, const scalar tol, TrackingData &td)
Influence of edge on face.
const point & origin() const
bool updateEdge(const polyMesh &mesh, const primitivePatch &patch, const label edgei, const label facei, const patchEdgeFacePoint &faceInfo, const scalar tol, TrackingData &td)
Influence of face on edge.
void transform(const polyMesh &mesh, const primitivePatch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.
Mesh consisting of general polyhedral cells.
bool valid(const PtrList< ModelType > &l)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
vector point
Point is a vector.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
dimensionSet transform(const dimensionSet &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensioned< scalar > magSqr(const dimensioned< Type > &)