treeDataCell Class Reference

Encapsulation of data needed to search in/for cells. Used to find the cell containing a point (e.g. cell-cell mapping). More...

Classes

class  findIntersectOp
 
class  findNearestOp
 

Public Member Functions

 ClassName ("treeDataCell")
 
 treeDataCell (const bool cacheBb, const polyMesh &, const labelUList &)
 Construct from mesh and subset of cells. More...
 
 treeDataCell (const bool cacheBb, const polyMesh &, labelList &&)
 Move construct from mesh and subset of cells, transferring contents. More...
 
 treeDataCell (const bool cacheBb, const polyMesh &)
 Construct from mesh. Uses all cells in mesh. More...
 
const labelListcellLabels () const
 
const polyMeshmesh () const
 
label size () const
 
pointField shapePoints () const
 Get representative point cloud for all shapes inside. More...
 
volumeType getVolumeType (const indexedOctree< treeDataCell > &, const point &) const
 Get type (inside,outside,mixed,unknown) of point w.r.t. surface. More...
 
bool overlaps (const label index, const treeBoundBox &sampleBb) const
 Does (bb of) shape at index overlap bb. More...
 
bool contains (const label index, const point &sample, const pointInCellShapes) const
 Does shape at index contain sample? More...
 

Detailed Description

Encapsulation of data needed to search in/for cells. Used to find the cell containing a point (e.g. cell-cell mapping).

Source files

Definition at line 55 of file treeDataCell.H.

Constructor & Destructor Documentation

◆ treeDataCell() [1/3]

treeDataCell ( const bool  cacheBb,
const polyMesh mesh,
const labelUList cellLabels 
)

Construct from mesh and subset of cells.

Definition at line 64 of file treeDataCell.C.

◆ treeDataCell() [2/3]

treeDataCell ( const bool  cacheBb,
const polyMesh mesh,
labelList &&  cellLabels 
)

Move construct from mesh and subset of cells, transferring contents.

Definition at line 79 of file treeDataCell.C.

◆ treeDataCell() [3/3]

treeDataCell ( const bool  cacheBb,
const polyMesh mesh 
)

Construct from mesh. Uses all cells in mesh.

Definition at line 94 of file treeDataCell.C.

Member Function Documentation

◆ ClassName()

ClassName ( "treeDataCell"  )

◆ cellLabels()

const labelList& cellLabels ( ) const
inline

Definition at line 150 of file treeDataCell.H.

Referenced by treeDataCell::findNearestOp::operator()().

Here is the caller graph for this function:

◆ mesh()

const polyMesh& mesh ( ) const
inline

Definition at line 155 of file treeDataCell.H.

Referenced by treeDataCell::findNearestOp::operator()().

Here is the caller graph for this function:

◆ size()

label size ( ) const
inline

Definition at line 160 of file treeDataCell.H.

References List< T >::size().

Here is the call graph for this function:

◆ shapePoints()

Foam::pointField shapePoints ( ) const

Get representative point cloud for all shapes inside.

(one point per shape)

Definition at line 128 of file treeDataCell.C.

References primitiveMesh::cellCentres(), forAll, and List< T >::size().

Here is the call graph for this function:

◆ getVolumeType()

volumeType getVolumeType ( const indexedOctree< treeDataCell > &  ,
const point  
) const
inline

Get type (inside,outside,mixed,unknown) of point w.r.t. surface.

Only makes sense for closed surfaces.

Definition at line 174 of file treeDataCell.H.

◆ overlaps()

bool overlaps ( const label  index,
const treeBoundBox sampleBb 
) const

Does (bb of) shape at index overlap bb.

Definition at line 141 of file treeDataCell.C.

References primitiveMesh::cells(), polyMesh::faces(), treeBoundBox::overlaps(), and polyMesh::points().

Here is the call graph for this function:

◆ contains()

bool contains ( const label  index,
const point sample,
const pointInCellShapes  cellShapes 
) const

Does shape at index contain sample?

Definition at line 165 of file treeDataCell.C.

References cellShapes, and Foam::pointInCell().

Here is the call graph for this function:

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