67 template<
class T,
int SizeMin>
class DynamicList;
86 label mostConcaveAngle
107 const splitMode
mode,
140 inline explicit
face(const label sz);
149 inline explicit
face(
std::initializer_list<label> list);
222 inline label
which(
const label pointLabel)
const;
226 inline label
thisLabel(
const label i)
const;
229 inline label
nextLabel(
const label i)
const;
232 inline label
prevLabel(
const label i)
const;
247 const point& refPt = vector::zero,
282 const scalar tol = 0.0
317 const scalar tol = SMALL
401 template<
int SizeMin>
452 inline
void operator+=(const label vertexOffset);
465 inline
unsigned hash_code(
unsigned seed=0)
const 483 return obj.hash_code(seed);
507 template<>
struct Hash<face> : face::hasher {};
512 struct offsetOp<face>
514 face
operator()(
const face&
x,
const label offset)
const 525 inline bool operator==(
const face& a,
const face&
b);
526 inline bool operator!=(
const face& a,
const face&
b);
scalar areaInContact(const UList< point > &meshPoints, const scalarField &v) const
Return area in contact, given the displacement in vertices.
scalar mag(const UList< point > &p) const
Magnitude of face area.
A face is a list of labels corresponding to mesh vertices.
proxType
The proximity classifications.
edgeList edges() const
Return list of edges in forward walk order.
A 1D vector of objects of type <T> with a fixed length <N>.
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.
label triangles(const UList< point > &points, label &triI, faceList &triFaces) const
Split into triangles using existing points.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr face() noexcept=default
Default construct.
label nextLabel(const label i) const
Next vertex on face.
Foam::edge rcEdge(const label edgei) const
Return i-th face edge in reverse walk order.
vector areaNormal(const UList< point > &p) const
The area normal - with magnitude equal to area of face.
vector unitNormal(const UList< point > &p) const
The unit normal.
Pair< point > box(const UList< point > &pts) const
The enclosing (bounding) box for the face.
static unsigned symmhash_code(const UList< label > &f, unsigned seed=0)
The symmetric hash value for face.
unsigned operator()(const face &obj, unsigned seed=0) const
unsigned operator()(const face &obj, unsigned seed=0) const
label prevLabel(const label i) const
Previous vertex on face.
T operator()(const T &x, const label offset) const
FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()") vector normal(const UList< point > &p) const
Legacy name for areaNormal()
label collapse()
Collapse face by removing duplicate point labels.
pointField points(const UList< point > &pts) const
Return the points corresponding to this face.
face reverseFace() const
Return face with reverse direction.
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
Return potential intersection with face with a ray starting at p, direction n (does not need to be no...
int sign(const point &p, const UList< point > &points, const scalar tol=SMALL) const
The sign for the side of the face plane the point is on, using three evenly distributed face points f...
const dimensionedScalar e
Elementary charge.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
int edgeDirection(const Foam::edge &e) const
Test the edge direction on the face.
A triangular face using a FixedList of labels corresponding to mesh vertices.
label longestEdge(const UList< point > &pts) const
Find the longest edge on a face.
scalar sweptVol(const UList< point > &oldPoints, const UList< point > &newPoints) const
Return the volume swept out by the face when its points move.
tensor inertia(const UList< point > &p, const point &refPt=vector::zero, scalar density=1.0) const
Return the inertia tensor, with optional reference point and density specification.
Describes the interaction of a object and a (templated) point. It carries the info of a successful hi...
label trianglesQuads(const UList< point > &points, label &triI, label &quadI, faceList &triFaces, faceList &quadFaces) const
Split into triangles and quads.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label nEdges() const noexcept
Return number of edges.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Foam::edge edge(const label edgei) const
Return i-th face edge (forward walk order).
static const char *const typeName
pointHit nearestPointClassify(const point &p, const UList< point > &meshPoints, label &nearType, label &nearLabel) const
Return nearest point to face and classify it:
pointHit nearestPoint(const point &p, const UList< point > &meshPoints) const
Return nearest point to face.
const Vector< label > N(dict.get< Vector< label >>("N"))
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))
Forwards for various types of face lists.
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3)
Type average(const UList< point > &meshPoints, const Field< Type > &fld) const
Calculate average value at centroid of face.
scalar contactSphereDiameter(const point &p, const vector &n, const UList< point > &meshPoints) const
Return contact sphere diameter.
Foam::edge faceEdge(label edgei) const
Identical to edge()
bool connected(const labelUList &other) const
True if the face has at least one vertex in common with other.
label nTrianglesQuads(const UList< point > &points, label &nTris, label &nQuads) const
Number of triangles and quads after splitting.
void flip()
Flip the face in-place.
edgeList rcEdges() const
Return list of edges in reverse walk order.
label thisLabel(const label i) const
The vertex on face - identical to operator[], but with naming similar to nextLabel(), prevLabel()
point centre(const UList< point > &points) const
Centre point of face.
bool operator!=(const eddy &a, const eddy &b)
const label * cdata() const noexcept
Return pointer to the underlying array serving as data storage.
label nTriangles() const
Number of triangles after splitting.
static int compare(const face &a, const face &b)
Compare faces.
A class for managing temporary objects.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
static bool sameVertices(const face &a, const face &b)
True if the faces have all the same vertices.
label which(const label pointLabel) const
Find local index on face for the point label, same as find()
Tensor of scalars, i.e. Tensor<scalar>.
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
unsigned hash_code(unsigned seed=0) const
The hash value for face.
std::streamsize size_bytes() const noexcept
Number of contiguous bytes for the List data.