51 scalar
s = v.
perp(w) / d;
57 else if (
s >= (1-small))
67 scalar t = u.
perp(w) / d;
73 else if (t >= (1-small))
79 edgePt =
e.start()+t*v;
87 scalar edge0 =
e.start() & u;
88 scalar edge1 =
e.end() & u;
89 bool edgeOrder = edge0 < edge1;
91 scalar minEdge = (edgeOrder ? edge0 : edge1);
92 scalar maxEdge = (edgeOrder ? edge1 : edge0);
93 const point2D& minEdgePt = (edgeOrder ?
e.start() :
e.end());
94 const point2D& maxEdgePt = (edgeOrder ?
e.end() :
e.start());
96 scalar this0 = start() & u;
97 scalar this1 = end() & u;
98 bool thisOrder = this0 < this1;
100 scalar minThis =
min(this0, this1);
101 scalar maxThis =
max(this1, this0);
102 const point2D& minThisPt = (thisOrder ? start() : end());
103 const point2D& maxThisPt = (thisOrder ? end() : start());
105 if (maxEdge < minThis)
111 else if (maxEdge < maxThis)
115 thisPt = nearestDist(edgePt).rawPoint();
120 if (minEdge < minThis)
125 edgePt =
e.nearestDist(thisPt).rawPoint();
127 else if (minEdge < maxThis)
131 thisPt = nearestDist(edgePt).rawPoint();
scalar perp(const Vector2D< Cmpt > &b) const
Perp dot product (dot product with perpendicular vector)
PointHit< Point > nearestDist(const Point &p) const
Return nearest distance to line from a given point.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)