Go to the documentation of this file.
90 inline explicit triFace(std::initializer_list<label> list);
177 inline label
which(const label pointLabel) const;
180 inline label
nextLabel(const label i) const;
183 inline label
prevLabel(const label i) const;
187 inline label
thisLabel(const label i) const;
222 const scalar tol = 0.0
232 const scalar tol = 0.0
267 const scalar tol = SMALL
271 inline label
nEdges() const noexcept;
321 inline
unsigned hash_code(
unsigned seed=0)
const
324 const uLabel t0((*
this)[0]);
325 const uLabel t1((*
this)[1]);
326 const uLabel t2((*
this)[2]);
328 const uLabel val(t0*t1*t2 + t0+t1+t2);
344 template<
class Unused=
bool>
384 result[i] =
x[i] + offset;
tensor inertia(const UList< point > &points, const point &refPt=vector::zero, scalar density=1.0) const
Return the inertia tensor, with optional reference.
triFace reverseFace() const
Return face with reverse direction.
pointField points(const UList< point > &pts) const
Return the points corresponding to this face.
List< edge > edgeList
A List of edges.
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
Foam::edge edge(const label edgei) const
Return i-th face edge (forward walk order).
label thisLabel(const label i) const
vector areaNormal(const UList< point > &points) const
The area normal - with magnitude equal to area of face.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
face triFaceFace() const
Return triangle as a face.
vector unitNormal(const UList< point > &points) const
The unit normal.
triPointRef tri(const UList< point > &points) const
Return the triangle.
Type average(const UList< point > &unused, const Field< Type > &fld) const
Calculate average value at centroid of face.
void flip()
Flip the face in-place.
label collapse()
'Collapse' face by marking duplicate point labels.
A template class to specify if a data type is composed solely of Foam::label elements.
#define forAll(list, i)
Loop across all elements in list.
edgeList rcEdges() const
Return list of edges in reverse walk order.
FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()") vector normal(const UList< point > &points) const
Legacy name for areaNormal()
Foam::edge faceEdge(label edgei) const
Identical to edge()
bool operator!=(const eddy &a, const eddy &b)
label second() const
Return second vertex label.
A triangle primitive used to calculate face normals and swept volumes.
label which(const label pointLabel) const
Find local index on face for the point label, same as find()
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
label nTriangles() const noexcept
Number of triangles after splitting == 1.
int sign(const point &p, const UList< point > &points, const scalar tol=SMALL) const
The sign for which side of the face plane the point is on.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
edgeList edges() const
Return list of edges in forward walk order.
unsigned hash_code(unsigned seed=0) const
The (commutative) hash value for triFace.
Offset operator for ListListOps::combineOffset()
Deprecated(2021-04) hashing functor. Use hasher()
scalar sweptVol(const UList< point > &opts, const UList< point > &npts) const
Return swept-volume from old-points to new-points.
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;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
point centre(const UList< point > &points) const
Return centre (centroid)
PointHit< point > pointHit
A PointIndexHit for 3D points.
label & operator[](const label i)
Return element of FixedList.
int edgeDirection(const Foam::edge &e) const
Test the edge direction on the face.
Vector< scalar > vector
A scalar version of the templated Vector.
pointHit nearestPoint(const point &p, const UList< point > &points) const
Return nearest point to face.
label nEdges() const noexcept
Return number of edges == 3.
Hashing functor for triFace (commutative)
pointHit nearestPointClassify(const point &p, const UList< point > &points, label &nearType, label &nearLabel) const
Return nearest point to face and classify it:
A triangular face using a FixedList of labels corresponding to mesh vertices.
FOAM_DEPRECATED_FOR(2021-04, "hasher()") Hash()
Foam::edge rcEdge(const label edgei) const
Return i-th face edge in reverse walk order.
pointHit ray(const point &p, const vector &q, const UList< point > &points, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
Return point intersection with a ray starting at p, in direction q.
scalar mag(const UList< point > &points) const
Magnitude of face area.
label & second()
Return second vertex label.
A 1D vector of objects of type <T> with a fixed length <N>.
pointHit intersection(const point &p, const vector &q, const UList< point > &points, const intersection::algorithm alg, const scalar tol=0.0) const
Fast intersection with a ray.
const dimensionedScalar e
Elementary charge.
label prevLabel(const label i) const
Previous vertex on face.
const dimensionedScalar c
Speed of light in a vacuum.
label nextLabel(const label i) const
Next vertex on face.
A face is a list of labels corresponding to mesh vertices.
unsigned operator()(const triFace &obj, unsigned seed=0) const
vector point
Point is a vector.
triFace()
Default construct, with invalid point labels (-1)
static int compare(const triFace &a, const triFace &b)
Compare triFaces.
Tensor< scalar > tensor
Tensor of scalars, i.e. Tensor<scalar>.
A template class to specify that a data type can be considered as being contiguous in memory.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...