30 template<
class Po
int,
class Po
intRef>
38 template<
class Po
int,
class Po
intRef>
45 a_(points[indices[0]]),
46 b_(points[indices[1]])
50 template<
class Po
int,
class Po
intRef>
59 template<
class Po
int,
class Po
intRef>
65 template<
class Po
int,
class Po
intRef>
72 template<
class Po
int,
class Po
intRef>
79 template<
class Po
int,
class Po
intRef>
86 template<
class Po
int,
class Po
intRef>
93 template<
class Po
int,
class Po
intRef>
125 template<
class Po
int,
class Po
intRef>
138 Point crossab = a ^
b;
139 scalar magCrossSqr =
magSqr(crossab);
141 if (magCrossSqr > vSmall)
143 scalar
s = ((
c ^
b) & crossab)/magCrossSqr;
144 scalar t = ((
c ^ a) & crossab)/magCrossSqr;
147 if (s >= 0 && s <= 1 && t >= 0 && t <= 1)
151 edgePt = edge.
start() + b*t;
166 scalar edgeDist =
min(edge0.distance(), edge1.distance());
168 if (thisDist < edgeDist)
173 edgePt = edge.
start();
183 if (edge0.distance() < edge1.distance())
186 edgePt = edge0.rawPoint();
191 edgePt = edge1.rawPoint();
201 scalar edge0 = edge.
start() & a;
202 scalar edge1 = edge.
end() & a;
203 bool edgeOrder = edge0 < edge1;
205 scalar minEdge = (edgeOrder ? edge0 : edge1);
206 scalar maxEdge = (edgeOrder ? edge1 : edge0);
207 const Point& minEdgePt = (edgeOrder ? edge.
start() : edge.
end());
208 const Point& maxEdgePt = (edgeOrder ? edge.
end() : edge.
start());
210 scalar this0 =
start() & a;
211 scalar this1 =
end() & a;
212 bool thisOrder = this0 < this1;
214 scalar minThis =
min(this0, this1);
215 scalar maxThis =
max(this1, this0);
216 const Point& minThisPt = (thisOrder ?
start() :
end());
217 const Point& maxThisPt = (thisOrder ?
end() :
start());
219 if (maxEdge < minThis)
225 else if (maxEdge < maxThis)
234 if (minEdge < minThis)
241 else if (minEdge < maxThis)
262 template<
class Po
int,
class Po
intRef>
273 is.
check(
"Istream& operator>>(Istream&, line&)");
278 template<
class Po
int,
class Po
intRef>
Istream & readBegin(const char *funcName)
scalar mag() const
Return scalar magnitude.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual bool check(const char *operation) const
Check IOstream status for given operation.
const dimensionedScalar & c1
First radiation constant: default SI units: [W/m^2].
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
const dimensionedScalar & c
Speed of light in a vacuum.
line(const Point &start, const Point &end)
Construct from two points.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
Istream & readEnd(const char *funcName)
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))
const dimensionedScalar & b
Wien displacement law constant: default SI units: [m K].
PointRef start() const
Return first vertex.
This class describes the interaction of a face and a point. It carries the info of a successful hit a...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
dimensioned< scalar > magSqr(const dimensioned< Type > &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const Point & rawPoint() const
Return point with no checking.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Point centre() const
Return centre (centroid)
Point vec() const
Return start-end vector.
PointRef end() const
Return second vertex.
const dimensionedScalar & c2
Second radiation constant: default SI units: [m K].
dimensioned< scalar > mag(const dimensioned< Type > &)
scalar distance() const
Return distance to hit.
PointHit< Point > nearestDist(const Point &p) const
Return nearest distance to line from a given point.