Go to the documentation of this file.
67 template<
class T,
int SizeMin>
class DynamicList;
80 inline label right(
const label i)
const;
83 inline label left(
const label i)
const;
99 label mostConcaveAngle
120 const splitMode
mode,
150 constexpr
face() noexcept = default;
153 inline explicit
face(const label sz);
162 inline explicit
face(std::initializer_list<label> list);
231 inline bool found(
const label pointLabel)
const;
235 inline label
which(
const label pointLabel)
const;
238 inline label
nextLabel(
const label i)
const;
241 inline label
prevLabel(
const label i)
const;
291 const scalar tol = 0.0
326 const scalar tol = SMALL
345 inline label
nEdges()
const;
386 template<
int SizeMin>
433 inline unsigned operator()(
const face& obj,
unsigned seed=0)
const
435 return Hasher(obj.cdata(), obj.size()*
sizeof(label), seed);
450 face result(
x.size());
454 result[i] =
x[i] + offset;
470 inline
bool operator==(const face& a, const face&
b);
471 inline
bool operator!=(const face& a, const face&
b);
static const char *const typeName
face reverseFace() const
Return face with reverse direction.
pointField points(const UList< point > &points) const
Return the points corresponding to this face.
pointHit nearestPoint(const point &p, const UList< point > &meshPoints) const
Return nearest point to face.
A class for managing temporary objects.
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3)
scalar mag(const UList< point > &p) const
Magnitude of face area.
label nEdges() const
Return number of edges.
int edgeDirection(const edge &e) const
The edge direction on the face.
edge faceEdge(const label n) const
Return n-th face edge.
tensor inertia(const UList< point > &p, const point &refPt=vector::zero, scalar density=1.0) const
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
static bool sameVertices(const face &a, const face &b)
Return true if the faces have the same vertices.
label longestEdge(const UList< point > &pts) const
Find the longest edge on a face.
label nTriangles() const
Number of triangles after splitting.
unsigned operator()(const T &obj, unsigned seed=0) const
#define forAll(list, i)
Loop across all elements in list.
static int compare(const face &a, const face &b)
Compare faces.
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
vector unitNormal(const UList< point > &p) const
The unit normal.
label trianglesQuads(const UList< point > &points, label &triI, label &quadI, faceList &triFaces, faceList &quadFaces) const
Split into triangles and quads.
Hash function class. The default definition is for primitives, non-primitives used to hash entries on...
point centre(const UList< point > &points) const
Centre point of face.
label which(const label pointLabel) const
Find local index on face for the point label,.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
unsigned operator()(const face &obj, unsigned seed=0) const
pointHit ray(const point &p, const vector &n, const UList< point > &meshPoints, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
Type average(const UList< point > &meshPoints, const Field< Type > &fld) const
Calculate average value at centroid of face.
Offset operator for ListListOps::combineOffset()
proxType
The proximity classifications.
vector areaNormal(const UList< point > &p) const
The area normal - with magnitude equal to area of face.
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))
pointHit intersection(const point &p, const vector &q, const point &ctr, const UList< point > &meshPoints, const intersection::algorithm alg, const scalar tol=0.0) const
Fast intersection with a ray.
void flip()
Flip the face in-place.
edgeList edges() const
Return edges in face point ordering,.
scalar areaInContact(const UList< point > &meshPoints, const scalarField &v) const
Return area in contact, given the displacement in vertices.
label triangles(const UList< point > &points, label &triI, faceList &triFaces) const
Split into triangles using existing points.
label prevLabel(const label i) const
Previous vertex on face.
label nextLabel(const label i) const
Next vertex on face.
label nTrianglesQuads(const UList< point > &points, label &nTris, label &nQuads) const
Number of triangles and quads after splitting.
A triangular face using a FixedList of labels corresponding to mesh vertices.
A 1D vector of objects of type <T> with a fixed length <N>.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const dimensionedScalar e
Elementary charge.
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()") vector normal(const UList< point > &p) const
Legacy name for areaNormal()
scalar contactSphereDiameter(const point &p, const vector &n, const UList< point > &meshPoints) const
Return contact sphere diameter.
label collapse()
Collapse face by removing duplicate point labels.
static const Vector< Cmpt > zero
int sign(const point &p, const UList< point > &points, const scalar tol=SMALL) const
label longestEdge(const face &f, const UList< point > &pts)
A face is a list of labels corresponding to mesh vertices.
Forwards for various types of face lists.
constexpr face() noexcept=default
Default construct.
const Vector< label > N(dict.get< Vector< label >>("N"))
vector point
Point is a vector.
pointHit nearestPointClassify(const point &p, const UList< point > &meshPoints, label &nearType, label &nearLabel) const
Return nearest point to face and classify it:
bool found(const label pointLabel) const
Return true if the point label is found in face.
scalar sweptVol(const UList< point > &oldPoints, const UList< point > &newPoints) const
Return the volume swept out by the face when its points move.