Go to the documentation of this file.
30 template<
class Po
int,
class Po
intRef>
38 template<
class Po
int,
class Po
intRef>
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>
134 Point a(end() - start());
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)
150 thisPt = start() + a*
s;
159 PointHit<Point> this0(nearestDist(edge.
start()));
160 PointHit<Point> this1(nearestDist(edge.
end()));
161 scalar thisDist =
min(this0.distance(), this1.distance());
166 scalar edgeDist =
min(edge0.distance(), edge1.distance());
168 if (thisDist < edgeDist)
170 if (this0.distance() < this1.distance())
172 thisPt = this0.rawPoint();
173 edgePt = edge.
start();
177 thisPt = this1.rawPoint();
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)
229 thisPt = nearestDist(edgePt).rawPoint();
234 if (minEdge < minThis)
241 else if (minEdge < maxThis)
245 thisPt = nearestDist(edgePt).rawPoint();
262 template<
class Po
int,
class Po
intRef>
266 line<Point, PointRef>& l
273 is.
check(
"Istream& operator>>(Istream&, line&)");
278 template<
class Po
int,
class Po
intRef>
282 const line<Point, PointRef>& l
Point centre() const
Return centre (centroid)
Istream & readEnd(const char *funcName)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
volScalarField w(IOobject("w", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("w", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
This class describes the interaction of a face and a point. It carries the info of a successful hit a...
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
PointRef start() const
Return first vertex.
PointRef end() const
Return second vertex.
dimensioned< scalar > mag(const dimensioned< Type > &)
label end() const
Return end vertex label.
line(const Point &start, const Point &end)
Construct from two points.
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)....
scalar mag() const
Return scalar magnitude.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
const dimensionedScalar c2
Second radiation constant: default SI units: [m.K].
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))
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
label start() const
Return start vertex label.
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,...
Istream & readBegin(const char *funcName)
PointHit< Point > nearestDist(const Point &p) const
Return nearest distance to line from a given point.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Point vec() const
Return start-end vector.
dimensioned< scalar > magSqr(const dimensioned< Type > &)