38 #ifndef Foam_treeDataFace_H 39 #define Foam_treeDataFace_H 80 const bool useSubset_;
92 inline bool usesFace(
const label facei)
const;
116 scalar& nearestDistSqr,
288 return useSubset_ ? faceLabels_.
empty() : !mesh_.
nFaces();
294 return useSubset_ ? faceLabels_.
size() : mesh_.
nFaces();
300 return useSubset_ && index >= 0 ? faceLabels_[index] : index;
304 const face&
operator[](
const label index)
const 317 tmp<pointField>
centres()
const;
342 const scalar radiusSqr
352 scalar& nearestDistSqr,
void size(const label n)
Older name for setAddressableSize.
ClassName("treeDataFace")
static treeBoundBox bounds(const primitiveMesh &mesh, const labelRange &range)
Return bounding box of specified range of faces.
Encapsulation of data for searching on faces.
Cell-face mesh analysis engine.
A range or interval of labels defined by a start and a size.
bool empty() const noexcept
True if List is empty (ie, size() is zero)
const point & centre(const label index) const
Representative point (face centre) at shape index.
const face & operator[](const label index) const
Face at specified shape index.
label size() const noexcept
The size of the face selection.
An enumeration wrapper for classification of a location as being inside/outside of a volume...
label nFaces() const noexcept
Number of mesh faces.
tmp< pointField > centres() const
Representative point cloud for contained shapes. One point per shape, corresponding to the face centr...
bool overlaps(const label index, const treeBoundBox &searchBox) const
Does (bb of) shape at index overlap searchBox.
UList< label > labelUList
A UList of labels.
Tree tree(triangles.begin(), triangles.end())
bool useSubset() const noexcept
Use a subset of faces.
label objectIndex(const label index) const
Map from shape index to original (non-subset) face label.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
const primitiveMesh & mesh() const noexcept
Reference to the supporting mesh.
int nDim() const noexcept
Object dimension == 2 (face element)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
const vectorField & faceCentres() const
static treeBoundBoxList boxes(const primitiveMesh &mesh)
Calculate and return bounding boxes for all mesh faces.
vector point
Point is a vector.
Non-pointer based hierarchical recursive searching.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
findNearestOp(const indexedOctree< treeDataFace > &tree)
virtual const faceList & faces() const =0
Return faces.
const std::string patch
OpenFOAM patch number as a std::string.
Standard boundBox with extra functionality for use in octree.
List< label > labelList
A List of labels.
const labelList & faceLabels() const noexcept
The subset of face ids to use.
A patch is a list of labels that address the faces in the global face list.
volumeType getVolumeType(const indexedOctree< treeDataFace > &, const point &) const
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
bool empty() const noexcept
Is the effective face selection empty?
findIntersectOp(const indexedOctree< treeDataFace > &tree)
void findNearest(const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const
Calculates nearest (to sample) point in shape.
treeDataFace(const bool cacheBb, const primitiveMesh &mesh)
Construct from mesh, using all faces.