40 (a[0] ==
b[0] && a[1] ==
b[1] && a[2] ==
b[2])
41 || (a[0] ==
b[1] && a[1] ==
b[2] && a[2] ==
b[0])
42 || (a[0] ==
b[2] && a[1] ==
b[0] && a[2] ==
b[1])
50 (a[0] ==
b[2] && a[1] ==
b[1] && a[2] ==
b[0])
51 || (a[0] ==
b[1] && a[1] ==
b[0] && a[2] ==
b[2])
52 || (a[0] ==
b[0] && a[1] ==
b[2] && a[2] ==
b[1])
118 operator[](0) >= 0 &&
operator[](0) !=
operator[](1)
119 &&
operator[](1) >= 0 &&
operator[](1) !=
operator[](2)
120 &&
operator[](2) >= 0 &&
operator[](0) !=
operator[](2)
132 if (
operator[](0) ==
operator[](1) ||
operator[](1) == -1)
137 else if (
operator[](1) ==
operator[](2) ||
operator[](2) == -1)
142 if (
operator[](0) ==
operator[](2))
154 std::swap(
operator[](1),
operator[](2));
162 p[0] = pts[operator[](0)];
163 p[1] = pts[operator[](1)];
164 p[2] = pts[operator[](2)];
213 return s < ROOTVSMALL ?
Zero :
n/
s;
219 return ::Foam::mag(areaNormal(
points));
232 return triFace(
operator[](0),
operator[](2),
operator[](1));
244 return operator[](i);
250 return operator[]((i == 2 ? 0 : i+1));
256 return operator[]((i ? i-1 : 2));
269 (npts[operator[](0)] - opts[operator[](0)])
271 (opts[
operator[](1)] - opts[
operator[](0)])
272 ^ (opts[operator[](2)] - opts[operator[](0)])
276 (npts[
operator[](1)] - opts[operator[](1)])
278 (opts[
operator[](2)] - opts[
operator[](1)])
279 ^ (npts[operator[](0)] - opts[operator[](1)])
283 (opts[
operator[](2)] - npts[operator[](2)])
285 (npts[
operator[](1)] - npts[
operator[](2)])
286 ^ (npts[operator[](0)] - npts[operator[](2)])
301 return this->tri(
points).inertia(refPt, density);
328 return this->tri(
points).intersection(
p, q, alg, tol);
352 return this->tri(
points).nearestPoint(
p);
364 return this->tri(
points).nearestPointClassify(
p, nearType, nearLabel);
387 return Foam::edge(thisLabel(edgei), nextLabel(edgei));
397 return vector(pts[nextLabel(edgei)] - pts[thisLabel(edgei)]);
405 const label pointi = edgei ? (3 - edgei) : 0;
406 return Foam::edge(thisLabel(pointi), prevLabel(pointi));
418 const label pointi = edgei ? (3 - edgei) : 0;
419 return vector(pts[prevLabel(pointi)] - pts[thisLabel(pointi)]);
427 theEdges[0].
first() = operator[](0);
428 theEdges[0].second() = operator[](1);
430 theEdges[1].
first() = operator[](1);
431 theEdges[1].second() = operator[](2);
433 theEdges[2].
first() = operator[](2);
434 theEdges[2].second() = operator[](0);
444 theEdges[0].
first() = operator[](0);
445 theEdges[0].second() = operator[](2);
447 theEdges[1].
first() = operator[](2);
448 theEdges[1].second() = operator[](1);
450 theEdges[2].
first() = operator[](1);
451 theEdges[2].second() = operator[](0);
459 if (
e.
first() ==
operator[](0))
461 if (
e.second() ==
operator[](1))
return 1;
462 if (
e.second() ==
operator[](2))
return -1;
464 if (
e.
first() ==
operator[](1))
466 if (
e.second() ==
operator[](2))
return 1;
467 if (
e.second() ==
operator[](0))
return -1;
469 if (
e.
first() ==
operator[](2))
471 if (
e.second() ==
operator[](0))
return 1;
472 if (
e.second() ==
operator[](1))
return -1;
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A 1D vector of objects of type <T> with a fixed length <N>.
label find(const T &val, label pos=0) const
Find index of the first occurrence of the value.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
scalar centre() const
Mid-point location, zero for an empty list.
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
T & first()
Return the first element of the list.
friend complex sign(const complex &c)
sgn() https://en.wikipedia.org/wiki/Sign_function#Complex_signum
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A face is a list of labels corresponding to mesh vertices.
Computes the magnitude of an input field.
A reference point and direction.
ray(const point &pt, const vector &dir)
A triangular face using a FixedList of labels corresponding to mesh vertices.
scalar sweptVol(const UList< point > &opts, const UList< point > &npts) const
Return swept-volume from old-points to new-points.
void flip()
Flip the face in-place.
pointHit nearestPointClassify(const point &p, const UList< point > &points, label &nearType, label &nearLabel) const
Return nearest point to face and classify it:
pointHit nearestPoint(const point &p, const UList< point > &points) const
Return nearest point to face.
bool valid() const
Return true if the vertices are unique and non-negative.
label nEdges() const noexcept
Return number of edges == 3.
triFace reverseFace() const
Return face with reverse direction.
int edgeDirection(const Foam::edge &e) const
Test the edge direction on the face.
Foam::edge rcEdge(const label edgei) const
Return i-th face edge in reverse walk order.
triFace()
Default construct, with invalid point labels (-1)
tensor inertia(const UList< point > &points, const point &refPt=vector::zero, scalar density=1.0) const
Return the inertia tensor, with optional reference.
label which(const label pointLabel) const
Find local index on face for the point label, same as find()
static int compare(const triFace &a, const triFace &b)
Compare triFaces.
label nextLabel(const label i) const
Next vertex on face.
label thisLabel(const label i) const
edgeList rcEdges() const
Return list of edges in reverse walk order.
label collapse()
'Collapse' face by marking duplicate point labels.
face triFaceFace() const
Return triangle as a face.
edgeList edges() const
Return list of edges in forward walk order.
label nTriangles() const noexcept
Number of triangles after splitting == 1.
label prevLabel(const label i) const
Previous vertex on face.
triPointRef tri(const UList< point > &points) const
Return the triangle.
A triangle primitive used to calculate face normals and swept volumes.
vector areaNormal() const
The area normal - with magnitude equal to area of triangle.
vector unitNormal() const
Return unit normal.
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))
bool operator!=(const eddy &a, const eddy &b)
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
triangle< point, const point & > triPointRef
A triangle using referred points.
static constexpr const zero Zero
Global zero (0)