Go to the documentation of this file.
34 template<
class Po
int,
class Po
intRef>
42 template<
class Po
int,
class Po
intRef>
54 template<
class Po
int,
class Po
intRef>
63 template<
class Po
int,
class Po
intRef>
70 template<
class Po
int,
class Po
intRef>
77 template<
class Po
int,
class Po
intRef>
84 template<
class Po
int,
class Po
intRef>
90 template<
class Po
int,
class Po
intRef>
97 template<
class Po
int,
class Po
intRef>
100 return 0.5*(a_ + b_);
104 template<
class Po
int,
class Po
intRef>
111 template<
class Po
int,
class Po
intRef>
118 template<
class Po
int,
class Po
intRef>
121 const Point v = (b_ - a_);
124 return s < ROOTVSMALL ?
Zero : v/
s;
128 template<
class Po
int,
class Po
intRef>
138 const scalar
c1 = v & w;
145 const scalar
c2 = v & v;
152 const scalar
b =
c1/
c2;
160 template<
class Po
int,
class Po
intRef>
174 scalar magCrossSqr =
magSqr(crossab);
176 if (magCrossSqr > VSMALL)
178 scalar
s = ((
c ^
b) & crossab)/magCrossSqr;
179 scalar t = ((
c ^ a) & crossab)/magCrossSqr;
182 if (
s >= 0 && s <= 1 && t >= 0 && t <= 1)
185 thisPt = start() + a*
s;
201 scalar edgeDist =
min(edge0.distance(), edge1.distance());
203 if (thisDist < edgeDist)
218 if (edge0.distance() < edge1.distance())
221 edgePt = edge0.rawPoint();
226 edgePt = edge1.rawPoint();
238 bool edgeOrder = edge0 < edge1;
240 scalar minEdge = (edgeOrder ? edge0 : edge1);
241 scalar maxEdge = (edgeOrder ? edge1 : edge0);
245 scalar this0 = start() & a;
246 scalar this1 =
end() & a;
247 bool thisOrder = this0 < this1;
249 scalar minThis =
min(this0, this1);
250 scalar maxThis =
max(this1, this0);
251 const Point& minThisPt = (thisOrder ? start() :
end());
252 const Point& maxThisPt = (thisOrder ?
end() : start());
254 if (maxEdge < minThis)
260 else if (maxEdge < maxThis)
264 thisPt = nearestDist(edgePt).rawPoint();
269 if (minEdge < minThis)
274 edgePt =
edge.nearestDist(thisPt).rawPoint();
276 else if (minEdge < maxThis)
280 thisPt = nearestDist(edgePt).rawPoint();
297 template<
class Po
int,
class Po
intRef>
313 template<
class Po
int,
class Po
intRef>
317 const line<Point, PointRef>& l
Point centre() const
Return centre (centroid)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.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))
This class describes the interaction of a face and a point. It carries the info of a successful hit a...
static constexpr const zero Zero
Global zero (0)
const Point & rawPoint() const
Return point with no checking.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
PointRef last() const
Return last (second) point.
PointRef start() const
Return first point.
PointRef end() const
Return second (last) point.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
PointRef second() const
Return second (last) point.
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
label start() const
Return start (first) vertex label.
line(const Point &start, const Point &end)
Construct from two points.
scalar distance() const
Return distance to hit.
const dimensionedScalar c1
First radiation constant: default SI units: [W/m2].
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
label end() const
Return end (last/second) vertex label.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
scalar mag() const
Return scalar magnitude.
Point unitVec() const
Return the unit vector (start-to-end)
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
const dimensionedScalar c2
Second radiation constant: default SI units: [m.K].
PointRef first() const
Return first point.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A 1D vector of objects of type <T> with a fixed length <N>.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const dimensionedScalar c
Speed of light in a vacuum.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Begin list [isseparator].
PointHit< Point > nearestDist(const Point &p) const
Return nearest distance to line from a given point.
Point vec() const
Return start-to-end vector.