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);
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)
127 else if (minEdge < maxThis)
131 thisPt = nearestDist(edgePt).rawPoint();
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
scalar perp(const Vector2D< Cmpt > &b) const
Perp dot product (dot product with perpendicular vector)
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.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
PointRef start() const
Return first vertex.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
PointRef end() const
Return second vertex.
dimensioned< scalar > mag(const dimensioned< Type > &)
const doubleScalar e
Elementary charge.
PointHit< Point > nearestDist(const Point &p) const
Return nearest distance to line from a given point.