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 | |
| ClassNameNoDebug ("treeDataCell") | |
| treeDataCell (const bool cacheBb, const polyMesh &mesh, polyMesh::cellDecomposition decompMode) | |
| Construct from mesh, using all cells in mesh. More... | |
| treeDataCell (const bool cacheBb, const polyMesh &mesh, const labelUList &cellLabels, polyMesh::cellDecomposition decompMode) | |
| Construct from mesh, copying subset of cells. More... | |
| treeDataCell (const bool cacheBb, const polyMesh &mesh, labelList &&cellLabels, polyMesh::cellDecomposition decompMode) | |
| Construct from mesh, moving subset of cells. More... | |
| treeDataCell (const polyMesh &mesh, polyMesh::cellDecomposition decompMode) | |
| Construct from mesh, using all cells in mesh. More... | |
| treeDataCell (const polyMesh &mesh, const labelUList &cellLabels, polyMesh::cellDecomposition decompMode) | |
| Construct from mesh, copying subset of cells. More... | |
| treeDataCell (const polyMesh &mesh, labelList &&cellLabels, polyMesh::cellDecomposition decompMode) | |
| Construct from mesh, moving subset of cells. More... | |
| int | nDim () const noexcept |
| Object dimension == 3 (volume element) More... | |
| treeBoundBox | bounds (const labelUList &indices) const |
| Return bounding box for the specified cell indices. More... | |
| const polyMesh & | mesh () const noexcept |
| Reference to the supporting mesh. More... | |
| polyMesh::cellDecomposition | decompMode () const noexcept |
| The cell decomposition mode used. More... | |
| const labelList & | cellLabels () const noexcept |
| The subset of cell ids to use. More... | |
| bool | useSubset () const noexcept |
| Use a subset of cells. More... | |
| bool | empty () const noexcept |
| Is the effective cell selection empty? More... | |
| label | size () const noexcept |
| The size of the cell selection. More... | |
| label | objectIndex (const label index) const |
| Map from shape index to original (non-subset) cell label. More... | |
| const point & | centre (const label index) const |
| Representative point (cell centre) at shape index. More... | |
| tmp< pointField > | centres () const |
| Representative point cloud for contained shapes. One point per shape, corresponding to the cell centres. 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 &searchBox) const |
| Does (bb of) shape at index overlap searchBox. More... | |
| bool | contains (const label index, const point &sample) const |
| Does shape at index contain sample. More... | |
| void | findNearest (const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const |
| Calculates nearest (to sample) point in shape. More... | |
Static Public Member Functions | |
| static treeBoundBoxList | boxes (const primitiveMesh &mesh) |
| Calculate and return bounding boxes for all mesh cells. More... | |
| static treeBoundBoxList | boxes (const primitiveMesh &mesh, const labelUList &cellIds) |
| Calculate and return bounding boxes for specified mesh cells. More... | |
| static treeBoundBox | bounds (const primitiveMesh &mesh, const labelUList &cellIds) |
| Return bounding box of specified mesh cells. More... | |
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 159 of file treeDataCell.C.
References update().

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

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

|
inline |
Construct from mesh, using all cells in mesh.
Definition at line 197 of file treeDataCell.H.
|
inline |
Construct from mesh, copying subset of cells.
Definition at line 209 of file treeDataCell.H.
|
inline |
Construct from mesh, moving subset of cells.
Definition at line 222 of file treeDataCell.H.
| ClassNameNoDebug | ( | "treeDataCell" | ) |
|
static |
Calculate and return bounding boxes for all mesh cells.
Definition at line 85 of file treeDataCell.C.
References Foam::boxesImpl(), treeDataCell::mesh(), and primitiveMesh::nCells().

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

|
static |
Return bounding box of specified mesh cells.
Definition at line 105 of file treeDataCell.C.
References boundBox::add(), primitiveMesh::cellPoints(), primitiveMesh::cells(), primitiveMesh::hasCellPoints(), mesh, and polyMesh::points().
Referenced by treeDataCell::bounds().


|
inlinenoexcept |
Object dimension == 3 (volume element)
Definition at line 266 of file treeDataCell.H.
| 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 treeDataCell::bounds().

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

|
inlinenoexcept |
The cell decomposition mode used.
Definition at line 284 of file treeDataCell.H.
|
inlinenoexcept |
The subset of cell ids to use.
Definition at line 292 of file treeDataCell.H.
|
inlinenoexcept |
Use a subset of cells.
Definition at line 297 of file treeDataCell.H.
|
inlinenoexcept |
Is the effective cell selection empty?
Definition at line 302 of file treeDataCell.H.
References UList< T >::empty(), and primitiveMesh::nCells().

|
inlinenoexcept |
The size of the cell selection.
Definition at line 310 of file treeDataCell.H.
References primitiveMesh::nCells(), and UList< T >::size().

|
inline |
Map from shape index to original (non-subset) cell label.
Definition at line 318 of file treeDataCell.H.
Referenced by treeDataCell::centre(), 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 primitiveMesh::cellCentres(), and treeDataCell::objectIndex().

| 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 350 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 258 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 273 of file treeDataCell.C.
| 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 303 of file treeDataCell.C.