Encapsulation of data needed to search in/for cells. Used to find the cell containing a point (e.g. cell-cell mapping). More...
#include <treeDataCell.H>
Classes | |
| class | findNearestOp |
| class | findIntersectOp |
Public Member Functions | |
| ClassNameNoDebug ("treeDataCell") | |
| treeDataCell (const bool cacheBb, const polyMesh &mesh, polyMesh::cellDecomposition decompMode) | |
| Construct from mesh, using all cells in mesh. | |
| treeDataCell (const bool cacheBb, const polyMesh &mesh, const labelUList &cellLabels, polyMesh::cellDecomposition decompMode) | |
| Construct from mesh, copying subset of cells. | |
| treeDataCell (const bool cacheBb, const polyMesh &mesh, labelList &&cellLabels, polyMesh::cellDecomposition decompMode) | |
| Construct from mesh, moving subset of cells. | |
| treeDataCell (const polyMesh &mesh, polyMesh::cellDecomposition decompMode) | |
| Construct from mesh, using all cells in mesh. | |
| treeDataCell (const polyMesh &mesh, const labelUList &cellLabels, polyMesh::cellDecomposition decompMode) | |
| Construct from mesh, copying subset of cells. | |
| treeDataCell (const polyMesh &mesh, labelList &&cellLabels, polyMesh::cellDecomposition decompMode) | |
| Construct from mesh, moving subset of cells. | |
| int | nDim () const noexcept |
| Object dimension == 3 (volume element). | |
| treeBoundBox | bounds (const labelUList &indices) const |
| Return bounding box for the specified cell indices. | |
| const polyMesh & | mesh () const noexcept |
| Reference to the supporting mesh. | |
| polyMesh::cellDecomposition | decompMode () const noexcept |
| The cell decomposition mode used. | |
| const labelList & | cellLabels () const noexcept |
| The subset of cell ids to use. | |
| bool | useSubset () const noexcept |
| Use a subset of cells. | |
| bool | empty () const noexcept |
| Is the effective cell selection empty? | |
| label | size () const noexcept |
| The size of the cell selection. | |
| label | objectIndex (const label index) const |
| Map from shape index to original (non-subset) cell label. | |
| const point & | centre (const label index) const |
| Representative point (cell centre) at shape index. | |
| tmp< pointField > | centres () const |
| Representative point cloud for contained shapes. One point per shape, corresponding to the cell centres. | |
| volumeType | getVolumeType (const indexedOctree< treeDataCell > &, 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 | contains (const label index, const point &sample) const |
| Does shape at index contain sample. | |
| 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 cells. | |
| static treeBoundBoxList | boxes (const primitiveMesh &mesh, const labelUList &cellIds) |
| Calculate and return bounding boxes for specified mesh cells. | |
| static treeBoundBox | bounds (const primitiveMesh &mesh, const labelUList &cellIds) |
| Return bounding box of specified mesh cells. | |
Encapsulation of data needed to search in/for cells. Used to find the cell containing a point (e.g. cell-cell mapping).
Definition at line 53 of file treeDataCell.H.
| treeDataCell | ( | const bool | cacheBb, |
| const polyMesh & | mesh, | ||
| polyMesh::cellDecomposition | decompMode ) |
Construct from mesh, using all cells in mesh.
Definition at line 158 of file treeDataCell.C.
References decompMode(), mesh(), and update().
Referenced by treeDataCell::findIntersectOp::operator()(), treeDataCell(), treeDataCell(), and treeDataCell().


| treeDataCell | ( | const bool | cacheBb, |
| const polyMesh & | mesh, | ||
| const labelUList & | cellLabels, | ||
| polyMesh::cellDecomposition | decompMode ) |
Construct from mesh, copying subset of cells.
Definition at line 175 of file treeDataCell.C.
References cellLabels(), decompMode(), mesh(), and update().

| treeDataCell | ( | const bool | cacheBb, |
| const polyMesh & | mesh, | ||
| labelList && | cellLabels, | ||
| polyMesh::cellDecomposition | decompMode ) |
Construct from mesh, moving subset of cells.
Definition at line 193 of file treeDataCell.C.
References cellLabels(), decompMode(), mesh(), and update().

|
inline |
Construct from mesh, using all cells in mesh.
Definition at line 196 of file treeDataCell.H.
References decompMode(), mesh(), and treeDataCell().

|
inline |
Construct from mesh, copying subset of cells.
Definition at line 208 of file treeDataCell.H.
References cellLabels(), decompMode(), mesh(), and treeDataCell().

|
inline |
Construct from mesh, moving subset of cells.
Definition at line 221 of file treeDataCell.H.
References cellLabels(), decompMode(), mesh(), and treeDataCell().

| ClassNameNoDebug | ( | "treeDataCell" | ) |
|
static |
Calculate and return bounding boxes for all mesh cells.
Definition at line 85 of file treeDataCell.C.
References Foam::boxesImpl(), and mesh().

|
static |
Calculate and return bounding boxes for specified mesh cells.
Definition at line 93 of file treeDataCell.C.
References Foam::boxesImpl(), and mesh().

|
static |
Return bounding box of specified mesh cells.
Definition at line 104 of file treeDataCell.C.
References boundBox::add(), and mesh().
Referenced by bounds().


|
inlinenoexcept |
Object dimension == 3 (volume element).
Definition at line 266 of file treeDataCell.H.
References Foam::noexcept.
| Foam::treeBoundBox bounds | ( | const labelUList & | indices | ) | const |
Return bounding box for the specified cell indices.
Definition at line 214 of file treeDataCell.C.
References boundBox::add(), and bounds().

|
inlinenoexcept |
Reference to the supporting mesh.
Definition at line 279 of file treeDataCell.H.
References Foam::noexcept.
Referenced by bounds(), boxes(), boxes(), ClassNameNoDebug(), treeDataCell::findIntersectOp::operator()(), treeDataCell(), treeDataCell(), treeDataCell(), treeDataCell(), treeDataCell(), and treeDataCell().

|
inlinenoexcept |
The cell decomposition mode used.
Definition at line 284 of file treeDataCell.H.
References Foam::noexcept.
Referenced by ClassNameNoDebug(), treeDataCell(), treeDataCell(), treeDataCell(), treeDataCell(), treeDataCell(), and treeDataCell().

|
inlinenoexcept |
The subset of cell ids to use.
Definition at line 292 of file treeDataCell.H.
References Foam::noexcept.
Referenced by ClassNameNoDebug(), treeDataCell(), treeDataCell(), treeDataCell(), and treeDataCell().

|
inlinenoexcept |
|
inlinenoexcept |
Is the effective cell selection empty?
Definition at line 302 of file treeDataCell.H.
References Foam::noexcept.
|
inlinenoexcept |
The size of the cell selection.
Definition at line 310 of file treeDataCell.H.
References Foam::noexcept.
|
inline |
Map from shape index to original (non-subset) cell label.
Definition at line 318 of file treeDataCell.H.
Referenced by centre(), contains(), and treeDataCell::findIntersectOp::operator()().

|
inline |
Representative point (cell centre) at shape index.
const cell& operator[](const label index) const { return mesh_.cells()[objectIndex(index)]; }
Definition at line 330 of file treeDataCell.H.
References objectIndex().
Referenced by findNearest().


| Foam::tmp< Foam::pointField > centres | ( | ) | const |
Representative point cloud for contained shapes. One point per shape, corresponding to the cell centres.
Definition at line 246 of file treeDataCell.C.
References tmp< T >::New().

|
inline |
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
Only makes sense for closed surfaces.
Definition at line 349 of file treeDataCell.H.
References NotImplemented, and volumeType::UNKNOWN.
| bool overlaps | ( | const label | index, |
| const treeBoundBox & | searchBox ) const |
Does (bb of) shape at index overlap searchBox.
Definition at line 257 of file treeDataCell.C.
References treeBoundBox::overlaps().

| bool contains | ( | const label | index, |
| const point & | sample ) const |
Does shape at index contain sample.
Definition at line 272 of file treeDataCell.C.
References objectIndex().

| 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 302 of file treeDataCell.C.
References centre().
