Go to the documentation of this file.
90 inline explicit triFace(std::initializer_list<label> list);
159 inline bool found(
const label pointLabel)
const;
163 inline label
which(
const label pointLabel)
const;
198 const scalar tol = 0.0
208 const scalar tol = 0.0
243 const scalar tol = SMALL
247 inline label
nEdges()
const;
274 inline unsigned hashval(
unsigned seed=0)
const
277 const uLabel t0((*
this)[0]);
278 const uLabel t1((*
this)[1]);
279 const uLabel t2((*
this)[2]);
281 const uLabel val = (t0*t1*t2 + t0+t1+t2);
288 template<
class HashT=Foam::Hash<label>>
291 inline unsigned operator()
297 return obj.hashval(seed);
337 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.
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
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...
bool found(const label pointLabel) const
Return true if the point label is found in face.
face triFaceFace() const
Return triangle as a face.
unsigned operator()(const T &obj, unsigned seed=0) const
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.
FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()") vector normal(const UList< point > &points) const
Legacy name for areaNormal()
bool operator!=(const eddy &a, const eddy &b)
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.
Hash function class. The default definition is for primitives, non-primitives used to hash entries on...
pointField points(const UList< point > &points) const
Return the points corresponding to this face.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
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)....
unsigned operator()(const triFace &obj, unsigned seed=0) const
edgeList edges() const
Return edges in face point ordering,.
edge faceEdge(const label n) const
Return n-th face edge.
Offset operator for ListListOps::combineOffset()
Hashing function class for triFace (commutative)
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 nearestPoint(const point &p, const UList< point > &points) const
Return nearest point to face.
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.
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.
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.
unsigned hashval(unsigned seed=0) const
The (commutative) hash-value for triFace.
const dimensionedScalar e
Elementary charge.
const dimensionedScalar c
Speed of light in a vacuum.
int edgeDirection(const edge &e) const
Return the edge direction on the face.
static const Vector< Cmpt > zero
A face is a list of labels corresponding to mesh vertices.
triFace()
Default construct, with invalid point labels (-1)
static int compare(const triFace &a, const triFace &b)
Compare triFaces.
label nTriangles() const
Number of triangles after splitting.
label nEdges() const
Return number of edges.
A template class to specify that a data type can be considered as being contiguous in memory.