Encapsulation of data for searching on faces. More...
Classes | |
| class | findIntersectOp |
| class | findNearestOp |
Public Member Functions | |
| ClassName ("treeDataFace") | |
| treeDataFace (const bool cacheBb, const primitiveMesh &mesh) | |
| Construct from mesh, using all faces. More... | |
| treeDataFace (const bool cacheBb, const polyPatch &patch) | |
| Construct from mesh, using polyPatch faces. More... | |
| treeDataFace (const bool cacheBb, const primitiveMesh &mesh, const labelRange &range) | |
| Construct from mesh, using specified range of faces. More... | |
| treeDataFace (const bool cacheBb, const primitiveMesh &mesh, const labelUList &faceLabels) | |
| Construct from mesh, copying subset of faces. More... | |
| treeDataFace (const bool cacheBb, const primitiveMesh &mesh, labelList &&faceLabels) | |
| Construct from mesh, moving subset of faces. More... | |
| treeDataFace (const primitiveMesh &mesh) | |
| Construct from mesh, using all faces. More... | |
| treeDataFace (const polyPatch &patch) | |
| Construct from mesh, using polyPatch faces. More... | |
| treeDataFace (const primitiveMesh &mesh, const labelRange &range) | |
| Construct from mesh, using specified range of faces. More... | |
| treeDataFace (const primitiveMesh &mesh, const labelUList &faceLabels) | |
| Construct from mesh, copying subset of faces. More... | |
| treeDataFace (const primitiveMesh &mesh, labelList &&faceLabels) | |
| Construct from mesh, moving subset of faces. More... | |
| int | nDim () const noexcept |
| Object dimension == 2 (face element) More... | |
| treeBoundBox | bounds (const labelUList &indices) const |
| Return bounding box for the specified face indices. More... | |
| const primitiveMesh & | mesh () const noexcept |
| Reference to the supporting mesh. More... | |
| const labelList & | faceLabels () const noexcept |
| The subset of face ids to use. More... | |
| bool | useSubset () const noexcept |
| Use a subset of faces. More... | |
| bool | empty () const noexcept |
| Is the effective face selection empty? More... | |
| label | size () const noexcept |
| The size of the face selection. More... | |
| label | objectIndex (const label index) const |
| Map from shape index to original (non-subset) face label. More... | |
| const face & | operator[] (const label index) const |
| Face at specified shape index. More... | |
| const point & | centre (const label index) const |
| Representative point (face centre) at shape index. More... | |
| tmp< pointField > | centres () const |
| Representative point cloud for contained shapes. One point per shape, corresponding to the face centres. More... | |
| volumeType | getVolumeType (const indexedOctree< treeDataFace > &, 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 | overlaps (const label index, const point ¢re, const scalar radiusSqr) const |
| Does shape at index overlap sphere. 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 faces. More... | |
| static treeBoundBoxList | boxes (const primitiveMesh &mesh, const labelRange &range) |
| Calculate and return bounding boxes for specified range of faces. More... | |
| static treeBoundBoxList | boxes (const primitiveMesh &mesh, const labelUList &faceIds) |
| Calculate and return bounding boxes for specified mesh faces. More... | |
| static treeBoundBox | bounds (const primitiveMesh &mesh, const labelRange &range) |
| Return bounding box of specified range of faces. More... | |
| static treeBoundBox | bounds (const primitiveMesh &mesh, const labelUList &faceIds) |
| Return bounding box of specified mesh faces. More... | |
Encapsulation of data for searching on faces.
Definition at line 55 of file treeDataFace.H.
| treeDataFace | ( | const bool | cacheBb, |
| const primitiveMesh & | mesh | ||
| ) |
Construct from mesh, using all faces.
Definition at line 177 of file treeDataFace.C.
References update().

| treeDataFace | ( | const bool | cacheBb, |
| const polyPatch & | patch | ||
| ) |
Construct from mesh, using polyPatch faces.
Definition at line 210 of file treeDataFace.C.
| treeDataFace | ( | const bool | cacheBb, |
| const primitiveMesh & | mesh, | ||
| const labelRange & | range | ||
| ) |
Construct from mesh, using specified range of faces.
Definition at line 193 of file treeDataFace.C.
References update().

| treeDataFace | ( | const bool | cacheBb, |
| const primitiveMesh & | mesh, | ||
| const labelUList & | faceLabels | ||
| ) |
Construct from mesh, copying subset of faces.
Definition at line 220 of file treeDataFace.C.
References update().

| treeDataFace | ( | const bool | cacheBb, |
| const primitiveMesh & | mesh, | ||
| labelList && | faceLabels | ||
| ) |
Construct from mesh, moving subset of faces.
Definition at line 237 of file treeDataFace.C.
References update().

|
inlineexplicit |
Construct from mesh, using all faces.
Definition at line 228 of file treeDataFace.H.
|
inlineexplicit |
Construct from mesh, using polyPatch faces.
Definition at line 236 of file treeDataFace.H.
|
inline |
Construct from mesh, using specified range of faces.
Definition at line 244 of file treeDataFace.H.
|
inline |
Construct from mesh, copying subset of faces.
Definition at line 252 of file treeDataFace.H.
|
inline |
Construct from mesh, moving subset of faces.
Definition at line 260 of file treeDataFace.H.
| ClassName | ( | "treeDataFace" | ) |
|
static |
Calculate and return bounding boxes for all mesh faces.
Definition at line 90 of file treeDataFace.C.
References Foam::boxesImpl(), treeDataFace::mesh(), and primitiveMesh::nFaces().

|
static |
Calculate and return bounding boxes for specified range of faces.
Definition at line 99 of file treeDataFace.C.
References Foam::boxesImpl(), mesh, and range.

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

|
static |
Return bounding box of specified range of faces.
Definition at line 121 of file treeDataFace.C.
References Foam::boundsImpl(), mesh, and range.
Referenced by treeDataFace::bounds().


|
static |
Return bounding box of specified mesh faces.
Definition at line 132 of file treeDataFace.C.
References Foam::boundsImpl(), and mesh.

|
inlinenoexcept |
Object dimension == 2 (face element)
Definition at line 318 of file treeDataFace.H.
| 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 treeDataFace::bounds().

|
inlinenoexcept |
Reference to the supporting mesh.
Definition at line 331 of file treeDataFace.H.
Referenced by treeDataFace::boxes().

|
inlinenoexcept |
The subset of face ids to use.
Definition at line 336 of file treeDataFace.H.
|
inlinenoexcept |
Use a subset of faces.
Definition at line 341 of file treeDataFace.H.
|
inlinenoexcept |
Is the effective face selection empty?
Definition at line 346 of file treeDataFace.H.
References UList< T >::empty(), and primitiveMesh::nFaces().

|
inlinenoexcept |
The size of the face selection.
Definition at line 354 of file treeDataFace.H.
References primitiveMesh::nFaces(), and UList< T >::size().

|
inline |
Map from shape index to original (non-subset) face label.
Definition at line 362 of file treeDataFace.H.
Referenced by treeDataFace::centre(), treeDataFace::findIntersectOp::operator()(), and treeDataFace::operator[]().

|
inline |
Face at specified shape index.
Definition at line 370 of file treeDataFace.H.
References primitiveMesh::faces(), and treeDataFace::objectIndex().

|
inline |
Representative point (face centre) at shape index.
Definition at line 378 of file treeDataFace.H.
References primitiveMesh::faceCentres(), and treeDataFace::objectIndex().

| 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().

| Foam::volumeType getVolumeType | ( | const indexedOctree< treeDataFace > & | oc, |
| const point & | sample | ||
| ) | const |
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
Only makes sense for closed surfaces.
Definition at line 288 of file treeDataFace.C.
References Foam::abort(), Foam::fieldTypes::area, Foam::ensightOutput::debug, Foam::constant::electromagnetic::e, Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, UList< T >::fcIndex(), forAll, indexedOctree< Type >::getSide(), PointHit< PointType >::hit(), PointIndexHit< PointType >::index(), Foam::mag(), Foam::magSqr(), Foam::normalised(), PointHit< PointType >::point(), points, Foam::Pout, UList< T >::rcIndex(), Foam::sqr(), volumeType::UNKNOWN, and Foam::Zero.

| bool overlaps | ( | const label | index, |
| const treeBoundBox & | searchBox | ||
| ) | const |
Does (bb of) shape at index overlap searchBox.
Definition at line 528 of file treeDataFace.C.
References boundBox::containsAny(), f(), forAll, treeBoundBox::intersects(), treeBoundBox::overlaps(), points, and UList< T >::size().

| bool overlaps | ( | const label | index, |
| const point & | centre, | ||
| const scalar | radiusSqr | ||
| ) | const |
Does shape at index overlap sphere.
Definition at line 587 of file treeDataFace.C.
References PointHit< PointType >::distance(), f(), polyMesh::faces(), mesh, points, and Foam::sqr().

| 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 640 of file treeDataFace.C.
References PointHit< PointType >::distance(), f(), polyMesh::faces(), mesh, PointHit< PointType >::point(), points, and Foam::sqr().

Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.