90 inline explicit triFace(std::initializer_list<label> list);
126 inline bool valid()
const;
183 inline label
which(const label pointLabel) const;
186 inline label
nextLabel(const label i) const;
189 inline label
prevLabel(const label i) const;
193 inline label
thisLabel(const label i) const;
228 const scalar tol = 0.0
238 const scalar tol = 0.0
273 const scalar tol = SMALL
327 inline
unsigned hash_code(
unsigned seed=0)
const
330 const uLabel t0((*
this)[0]);
331 const uLabel t1((*
this)[1]);
332 const uLabel t2((*
this)[2]);
334 const uLabel val(t0*t1*t2 + t0+t1+t2);
350 template<
class Unused=
bool>
390 result[i] =
x[i] + offset;
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A 1D vector of objects of type <T> with a fixed length <N>.
label & first() noexcept
The first element of the list, position [0].
label & last() noexcept
The last element of the list, position [N-1].
label & operator[](const label i)
Return element of FixedList.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
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.
Tensor of scalars, i.e. Tensor<scalar>.
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.
vector unitNormal(const UList< point > &points) const
The unit normal.
void flip()
Flip the face in-place.
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.
pointHit nearestPointClassify(const point &p, const UList< point > &points, label &nearType, label &nearLabel) const
Return nearest point to face and classify it:
label second() const
Return second vertex label.
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.
unsigned hash_code(unsigned seed=0) const
The (commutative) hash value for triFace.
triFace reverseFace() const
Return face with reverse direction.
scalar mag(const UList< point > &points) const
Magnitude of face area.
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.
point centre(const UList< point > &points) const
Return centre (centroid)
label which(const label pointLabel) const
Find local index on face for the point label, same as find()
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.
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.
Foam::edge faceEdge(label edgei) const
Identical to edge()
label & second()
Return second vertex label.
edgeList edges() const
Return list of edges in forward walk order.
vector areaNormal(const UList< point > &points) const
The area normal - with magnitude equal to area of face.
label nTriangles() const noexcept
Number of triangles after splitting == 1.
Type average(const UList< point > &unused, const Field< Type > &fld) const
Calculate average value at centroid of face.
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.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
bool operator!=(const eddy &a, const eddy &b)
vector point
Point is a vector.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
PointHit< point > pointHit
A PointIndexHit for 3D points.
List< edge > edgeList
A List of edges.
#define forAll(list, i)
Loop across all elements in list.
#define FOAM_DEPRECATED_FOR(since, replacement)
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
A template class to specify if a data type is composed solely of Foam::label elements.
A template class to specify that a data type can be considered as being contiguous in memory.
Offset operator for ListListOps::combineOffset()
Deprecated(2021-04) hashing functor. Use hasher()
FOAM_DEPRECATED_FOR(2021-04, "hasher()") Hash()
Hashing functor for triFace (commutative)
unsigned operator()(const triFace &obj, unsigned seed=0) const