86 label mostConcaveAngle
107 const splitMode
mode,
140 inline explicit
face(const label sz);
149 inline explicit
face(std::initializer_list<label> list);
228 inline label
which(
const label vertex)
const;
232 inline label
thisLabel(
const label i)
const;
235 inline label
nextLabel(
const label i)
const;
238 inline label
prevLabel(
const label i)
const;
288 const scalar tol = 0.0
323 const scalar tol = SMALL
423 template<
int SizeMin>
474 inline
void operator+=(const label vertexOffset);
487 inline
unsigned hash_code(
unsigned seed=0)
const
505 return obj.hash_code(seed);
522 Foam::edge
faceEdge(label edgei)
const {
return this->
edge(edgei); }
536 face
operator()(
const face&
x,
const label offset)
const
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
A 1D vector of objects of type <T> with a fixed length <N>.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An ordered pair of two objects of type <T> with first() and second() elements.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const label * cdata() const noexcept
std::streamsize size_bytes() const noexcept
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
A face is a list of labels corresponding to mesh vertices.
label trianglesQuads(const UList< point > &points, label &triI, label &quadI, faceList &triFaces, faceList &quadFaces) const
Split into triangles and quads.
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...
pointHit nearestPointClassify(const point &p, const UList< point > &meshPoints, label &nearType, label &nearLabel) const
Return nearest point to face and classify it:
Foam::edge edge(const label edgei) const
Return i-th face edge (forward walk order).
void flip()
Flip the face in-place.
static unsigned symmhash_code(const UList< label > &f, unsigned seed=0)
The symmetric hash value for face.
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.
Pair< point > box(const UList< point > &pts) const
The enclosing (bounding) box for the face.
bool contains(const Foam::edge &e) const
True if face contains(edge).
scalar sweptVol(const UList< point > &oldPoints, const UList< point > &newPoints) const
Return the volume swept out by the face when its points move.
label nEdges() const noexcept
Return number of edges.
label triangles(const UList< point > &points, label &triI, faceList &triFaces) const
Split into triangles using existing points.
scalar mag(const UList< point > &p) const
Magnitude of face area.
unsigned hash_code(unsigned seed=0) const
The hash value for face.
label nTrianglesQuads(const UList< point > &points, label &nTris, label &nQuads) const
Number of triangles and quads after splitting.
static int compare(const face &a, const face &b)
Compare faces.
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.
scalar areaInContact(const UList< point > &meshPoints, const scalarField &v) const
Return area in contact, given the displacement in vertices.
label find(const Foam::edge &e) const
Find the edge within the face.
bool connected(const labelUList &other) const
True if the face has at least one vertex in common with other.
int edgeDirection(const Foam::edge &e) const
Test the edge direction on the face.
FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()") vector normal(const UList< point > &p) const
Legacy name for areaNormal().
Foam::edge rcEdge(const label edgei) const
Return i-th face edge in reverse walk order.
label longestEdge(const UList< point > &pts) const
Find the longest edge on a face.
proxType
The proximity classifications.
pointHit nearestPoint(const point &p, const UList< point > &meshPoints) const
Return nearest point to face.
point average(const UList< point > &points) const
Average of face points: a quick estimate of the face centre.
point centre(const UList< point > &points) const
Centre point of face.
pointField points(const UList< point > &pts) const
Return the points corresponding to this face.
scalar contactSphereDiameter(const point &p, const vector &n, const UList< point > &meshPoints) const
Return contact sphere diameter.
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...
label which(const label vertex) const
Find local vertex on face for the vertex label, same as find().
scalar magSqr(const UList< point > &p) const
Magnitude squared of face area.
label nextLabel(const label i) const
Next vertex on face.
vector unitNormal(const UList< point > &p) const
The unit normal.
label thisLabel(const label i) const
The vertex on face - identical to operator[], but with naming similar to nextLabel(),...
edgeList rcEdges() const
Return list of edges in reverse walk order.
label collapse()
Collapse face by removing duplicate vertex labels.
face reverseFace() const
Return face with reverse direction.
Foam::edge faceEdge(label edgei) const
Identical to edge().
static bool sameVertices(const face &a, const face &b)
True if the faces have all the same vertices.
edgeList edges() const
Return list of edges in forward walk order.
vector areaNormal(const UList< point > &p) const
The area normal - with magnitude equal to area of face.
label nTriangles() const noexcept
Number of triangles after splitting.
unsigned symmhash_code(unsigned seed=0) const
The symmetric hash value for face.
constexpr face() noexcept=default
Default construct.
label prevLabel(const label i) const
Previous vertex on face.
static const char *const typeName
A class for managing temporary objects.
A triangular face using a FixedList of labels corresponding to mesh vertices.
Forwards for various types of face lists.
List< edge > edgeList
List of edge.
bool operator!=(const eddy &a, const eddy &b)
PointHit< point > pointHit
A PointHit with a 3D point.
List< label > labelList
A List of labels.
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3).
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
List< face > faceList
List of faces.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
vector point
Point is a vector.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
std::vector< Triangle > triangles
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
Hashing functor for face.
unsigned operator()(const face &obj, unsigned seed=0) const
Symmetric hashing functor for face.
unsigned operator()(const face &obj, unsigned seed=0) const
face operator()(const face &x, const label offset) const
Offset operator for ListListOps::combineOffset().
T operator()(const T &x, const label offset) const
const Vector< label > N(dict.get< Vector< label > >("N"))