Go to the documentation of this file.
95 inline explicit triFace(std::initializer_list<label> lst);
154 inline bool found(
const label pointLabel)
const;
193 const scalar tol = 0.0
203 const scalar tol = 0.0
238 const scalar tol = SMALL
269 inline unsigned hashval(
unsigned seed=0)
const
272 const uLabel t0((*
this)[0]);
273 const uLabel t1((*
this)[1]);
274 const uLabel t2((*
this)[2]);
276 const uLabel val = (t0*t1*t2 + t0+t1+t2);
283 template<
class HashT=Foam::Hash<label>>
286 inline unsigned operator()
292 return obj.hashval(seed);
332 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.
label ListType::const_reference val
triFace reverseFace() const
Return face with reverse direction.
vector FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()") normal(const UList< point > &points) const
Legacy name for areaNormal()
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.
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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< scalar > zero
A face is a list of labels corresponding to mesh vertices.
uintWM_LABEL_SIZE_t uLabel
A uLabel is an uint32_t or uint64_t as specified by the pre-processor macro WM_LABEL_SIZE.
triFace()
Construct null 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.