Loading...
Searching...
No Matches
treeDataFace Class Reference

Encapsulation of data for searching on faces. More...

#include <treeDataFace.H>

Classes

class  findNearestOp
class  findIntersectOp

Public Member Functions

 ClassName ("treeDataFace")
 treeDataFace (const bool cacheBb, const primitiveMesh &mesh)
 Construct from mesh, using all faces.
 treeDataFace (const bool cacheBb, const polyPatch &patch)
 Construct from mesh, using polyPatch faces.
 treeDataFace (const bool cacheBb, const primitiveMesh &mesh, const labelRange &range)
 Construct from mesh, using specified range of faces.
 treeDataFace (const bool cacheBb, const primitiveMesh &mesh, const labelUList &faceLabels)
 Construct from mesh, copying subset of faces.
 treeDataFace (const bool cacheBb, const primitiveMesh &mesh, labelList &&faceLabels)
 Construct from mesh, moving subset of faces.
 treeDataFace (const primitiveMesh &mesh)
 Construct from mesh, using all faces.
 treeDataFace (const polyPatch &patch)
 Construct from mesh, using polyPatch faces.
 treeDataFace (const primitiveMesh &mesh, const labelRange &range)
 Construct from mesh, using specified range of faces.
 treeDataFace (const primitiveMesh &mesh, const labelUList &faceLabels)
 Construct from mesh, copying subset of faces.
 treeDataFace (const primitiveMesh &mesh, labelList &&faceLabels)
 Construct from mesh, moving subset of faces.
int nDim () const noexcept
 Object dimension == 2 (face element).
treeBoundBox bounds (const labelUList &indices) const
 Return bounding box for the specified face indices.
const primitiveMeshmesh () const noexcept
 Reference to the supporting mesh.
const labelListfaceLabels () const noexcept
 The subset of face ids to use.
bool useSubset () const noexcept
 Use a subset of faces.
bool empty () const noexcept
 Is the effective face selection empty?
label size () const noexcept
 The size of the face selection.
label objectIndex (const label index) const
 Map from shape index to original (non-subset) face label.
const faceoperator[] (const label index) const
 Face at specified shape index.
const pointcentre (const label index) const
 Representative point (face centre) at shape index.
tmp< pointFieldcentres () const
 Representative point cloud for contained shapes. One point per shape, corresponding to the face centres.
volumeType getVolumeType (const indexedOctree< treeDataFace > &, const point &) const
 Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
bool overlaps (const label index, const treeBoundBox &searchBox) const
 Does (bb of) shape at index overlap searchBox.
bool overlaps (const label index, const point &centre, const scalar radiusSqr) const
 Does shape at index overlap sphere.
void findNearest (const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const
 Calculates nearest (to sample) point in shape.

Static Public Member Functions

static treeBoundBoxList boxes (const primitiveMesh &mesh)
 Calculate and return bounding boxes for all mesh faces.
static treeBoundBoxList boxes (const primitiveMesh &mesh, const labelRange &range)
 Calculate and return bounding boxes for specified range of faces.
static treeBoundBoxList boxes (const primitiveMesh &mesh, const labelUList &faceIds)
 Calculate and return bounding boxes for specified mesh faces.
static treeBoundBox bounds (const primitiveMesh &mesh, const labelRange &range)
 Return bounding box of specified range of faces.
static treeBoundBox bounds (const primitiveMesh &mesh, const labelUList &faceIds)
 Return bounding box of specified mesh faces.

Detailed Description

Encapsulation of data for searching on faces.

Source files

Definition at line 55 of file treeDataFace.H.

Constructor & Destructor Documentation

◆ treeDataFace() [1/10]

treeDataFace ( const bool cacheBb,
const primitiveMesh & mesh )

Construct from mesh, using all faces.

Definition at line 176 of file treeDataFace.C.

References mesh(), and update().

Referenced by treeDataFace::findIntersectOp::operator()(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), and treeDataFace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ treeDataFace() [2/10]

treeDataFace ( const bool cacheBb,
const polyPatch & patch )

Construct from mesh, using polyPatch faces.

Definition at line 209 of file treeDataFace.C.

References mesh(), range, and treeDataFace().

Here is the call graph for this function:

◆ treeDataFace() [3/10]

treeDataFace ( const bool cacheBb,
const primitiveMesh & mesh,
const labelRange & range )

Construct from mesh, using specified range of faces.

Definition at line 192 of file treeDataFace.C.

References Foam::identity(), mesh(), range, and update().

Here is the call graph for this function:

◆ treeDataFace() [4/10]

treeDataFace ( const bool cacheBb,
const primitiveMesh & mesh,
const labelUList & faceLabels )

Construct from mesh, copying subset of faces.

Definition at line 219 of file treeDataFace.C.

References faceLabels(), mesh(), and update().

Here is the call graph for this function:

◆ treeDataFace() [5/10]

treeDataFace ( const bool cacheBb,
const primitiveMesh & mesh,
labelList && faceLabels )

Construct from mesh, moving subset of faces.

Definition at line 236 of file treeDataFace.C.

References faceLabels(), mesh(), and update().

Here is the call graph for this function:

◆ treeDataFace() [6/10]

treeDataFace ( const primitiveMesh & mesh)
inlineexplicit

Construct from mesh, using all faces.

Definition at line 228 of file treeDataFace.H.

References mesh(), and treeDataFace().

Here is the call graph for this function:

◆ treeDataFace() [7/10]

treeDataFace ( const polyPatch & patch)
inlineexplicit

Construct from mesh, using polyPatch faces.

Definition at line 236 of file treeDataFace.H.

References treeDataFace().

Here is the call graph for this function:

◆ treeDataFace() [8/10]

treeDataFace ( const primitiveMesh & mesh,
const labelRange & range )
inline

Construct from mesh, using specified range of faces.

Definition at line 244 of file treeDataFace.H.

References mesh(), range, and treeDataFace().

Here is the call graph for this function:

◆ treeDataFace() [9/10]

treeDataFace ( const primitiveMesh & mesh,
const labelUList & faceLabels )
inline

Construct from mesh, copying subset of faces.

Definition at line 252 of file treeDataFace.H.

References faceLabels(), mesh(), and treeDataFace().

Here is the call graph for this function:

◆ treeDataFace() [10/10]

treeDataFace ( const primitiveMesh & mesh,
labelList && faceLabels )
inline

Construct from mesh, moving subset of faces.

Definition at line 260 of file treeDataFace.H.

References faceLabels(), mesh(), and treeDataFace().

Here is the call graph for this function:

Member Function Documentation

◆ ClassName()

ClassName ( "treeDataFace" )

References faceLabels(), mesh(), and range.

Here is the call graph for this function:

◆ boxes() [1/3]

Foam::treeBoundBoxList boxes ( const primitiveMesh & mesh)
static

Calculate and return bounding boxes for all mesh faces.

Definition at line 90 of file treeDataFace.C.

References Foam::boxesImpl(), and mesh().

Here is the call graph for this function:

◆ boxes() [2/3]

Foam::treeBoundBoxList boxes ( const primitiveMesh & mesh,
const labelRange & range )
static

Calculate and return bounding boxes for specified range of faces.

Definition at line 98 of file treeDataFace.C.

References Foam::boxesImpl(), mesh(), and range.

Here is the call graph for this function:

◆ boxes() [3/3]

Foam::treeBoundBoxList boxes ( const primitiveMesh & mesh,
const labelUList & faceIds )
static

Calculate and return bounding boxes for specified mesh faces.

Definition at line 109 of file treeDataFace.C.

References Foam::boxesImpl(), and mesh().

Here is the call graph for this function:

◆ bounds() [1/3]

Foam::treeBoundBox bounds ( const primitiveMesh & mesh,
const labelRange & range )
static

Return bounding box of specified range of faces.

Definition at line 120 of file treeDataFace.C.

References Foam::boundsImpl(), mesh(), and range.

Referenced by bounds().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bounds() [2/3]

Foam::treeBoundBox bounds ( const primitiveMesh & mesh,
const labelUList & faceIds )
static

Return bounding box of specified mesh faces.

Definition at line 131 of file treeDataFace.C.

References Foam::boundsImpl(), and mesh().

Here is the call graph for this function:

◆ nDim()

int nDim ( ) const
inlinenoexcept

Object dimension == 2 (face element).

Definition at line 318 of file treeDataFace.H.

References Foam::noexcept.

◆ bounds() [3/3]

Foam::treeBoundBox bounds ( const labelUList & indices) const

Return bounding box for the specified face indices.

Definition at line 256 of file treeDataFace.C.

References boundBox::add(), and bounds().

Here is the call graph for this function:

◆ mesh()

const primitiveMesh & mesh ( ) const
inlinenoexcept

Reference to the supporting mesh.

Definition at line 331 of file treeDataFace.H.

References Foam::noexcept.

Referenced by bounds(), bounds(), boxes(), boxes(), boxes(), ClassName(), findNearest(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), and treeDataFace().

Here is the caller graph for this function:

◆ faceLabels()

const labelList & faceLabels ( ) const
inlinenoexcept

The subset of face ids to use.

Definition at line 336 of file treeDataFace.H.

References Foam::noexcept.

Referenced by ClassName(), treeDataFace(), treeDataFace(), treeDataFace(), and treeDataFace().

Here is the caller graph for this function:

◆ useSubset()

bool useSubset ( ) const
inlinenoexcept

Use a subset of faces.

Definition at line 341 of file treeDataFace.H.

References Foam::noexcept.

◆ empty()

bool empty ( ) const
inlinenoexcept

Is the effective face selection empty?

Definition at line 346 of file treeDataFace.H.

References Foam::noexcept.

◆ size()

label size ( ) const
inlinenoexcept

The size of the face selection.

Definition at line 354 of file treeDataFace.H.

References Foam::noexcept.

◆ objectIndex()

label objectIndex ( const label index) const
inline

Map from shape index to original (non-subset) face label.

Definition at line 362 of file treeDataFace.H.

Referenced by centre(), findNearest(), getVolumeType(), treeDataFace::findIntersectOp::operator()(), operator[](), overlaps(), and overlaps().

Here is the caller graph for this function:

◆ operator[]()

const face & operator[] ( const label index) const
inline

Face at specified shape index.

Definition at line 370 of file treeDataFace.H.

References objectIndex().

Here is the call graph for this function:

◆ centre()

const point & centre ( const label index) const
inline

Representative point (face centre) at shape index.

Definition at line 378 of file treeDataFace.H.

References objectIndex().

Referenced by overlaps().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ centres()

Foam::tmp< Foam::pointField > centres ( ) const

Representative point cloud for contained shapes. One point per shape, corresponding to the face centres.

Definition at line 276 of file treeDataFace.C.

References tmp< T >::New().

Here is the call graph for this function:

◆ getVolumeType()

Foam::volumeType getVolumeType ( const indexedOctree< treeDataFace > & oc,
const point & sample ) const

◆ overlaps() [1/2]

bool overlaps ( const label index,
const treeBoundBox & searchBox ) const

Does (bb of) shape at index overlap searchBox.

Definition at line 527 of file treeDataFace.C.

References boundBox::containsAny(), f(), forAll, treeBoundBox::intersects(), objectIndex(), treeBoundBox::overlaps(), and points.

Referenced by overlaps().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ overlaps() [2/2]

bool overlaps ( const label index,
const point & centre,
const scalar radiusSqr ) const

Does shape at index overlap sphere.

Definition at line 586 of file treeDataFace.C.

References centre(), PointHit< PointType >::distance(), f(), polyMesh::faces(), mesh, objectIndex(), overlaps(), points, and Foam::sqr().

Here is the call graph for this function:

◆ findNearest()

void findNearest ( const labelUList & indices,
const point & sample,
scalar & nearestDistSqr,
label & nearestIndex,
point & nearestPoint ) const

Calculates nearest (to sample) point in shape.

Returns actual point and distance (squared)

Definition at line 639 of file treeDataFace.C.

References PointHit< PointType >::distance(), f(), primitiveMesh::faces(), mesh(), objectIndex(), PointHit< PointType >::point(), points, and Foam::sqr().

Here is the call graph for this function:

The documentation for this class was generated from the following files: