Encapsulation of data needed to search in/for cells. Used to find the cell containing a point (e.g. cell-cell mapping). More...
Data Structures | |
class | findIntersectOp |
class | findNearestOp |
Public Member Functions | |
ClassName ("treeDataCell") | |
treeDataCell (const bool cacheBb, const polyMesh &, const labelUList &, const polyMesh::cellDecomposition decompMode) | |
Construct from mesh and subset of cells. More... | |
treeDataCell (const bool cacheBb, const polyMesh &, const Xfer< labelList > &, const polyMesh::cellDecomposition decompMode) | |
Construct from mesh and subset of cells, transferring contents. More... | |
treeDataCell (const bool cacheBb, const polyMesh &, const polyMesh::cellDecomposition decompMode) | |
Construct from mesh. Uses all cells in mesh. More... | |
const labelList & | cellLabels () const |
const polyMesh & | mesh () const |
polyMesh::cellDecomposition | decompMode () 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 |
Does shape at index contain sample. More... | |
Private Member Functions | |
treeBoundBox | calcCellBb (const label cellI) const |
Calculate cell bounding box. More... | |
void | update () |
Initialise all member data. More... | |
Private Attributes | |
const polyMesh & | mesh_ |
const labelList | cellLabels_ |
Subset of cells to work on. More... | |
const bool | cacheBb_ |
Whether to precalculate and store cell bounding box. More... | |
const polyMesh::cellDecomposition | decompMode_ |
How to decide if point is inside cell. More... | |
treeBoundBoxList | bbs_ |
Cell bounding boxes (valid only if cacheBb_) 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 54 of file treeDataCell.H.
treeDataCell | ( | const bool | cacheBb, |
const polyMesh & | mesh, | ||
const labelUList & | cellLabels, | ||
const polyMesh::cellDecomposition | decompMode | ||
) |
Construct from mesh and subset of cells.
Definition at line 87 of file treeDataCell.C.
treeDataCell | ( | const bool | cacheBb, |
const polyMesh & | mesh, | ||
const Xfer< labelList > & | cellLabels, | ||
const polyMesh::cellDecomposition | decompMode | ||
) |
Construct from mesh and subset of cells, transferring contents.
Definition at line 104 of file treeDataCell.C.
treeDataCell | ( | const bool | cacheBb, |
const polyMesh & | mesh, | ||
const polyMesh::cellDecomposition | decompMode | ||
) |
Construct from mesh. Uses all cells in mesh.
Definition at line 121 of file treeDataCell.C.
|
private |
Calculate cell bounding box.
Definition at line 40 of file treeDataCell.C.
References cells, primitiveMesh::cells(), f(), polyMesh::faces(), forAll, boundBox::max(), Foam::max(), treeDataCell::mesh_, boundBox::min(), Foam::min(), p, points, and polyMesh::points().
Referenced by treeDataCell::findIntersectOp::operator()().
|
private |
ClassName | ( | "treeDataCell" | ) |
|
inline |
Definition at line 170 of file treeDataCell.H.
References treeDataCell::cellLabels_.
Referenced by treeDataCell::findNearestOp::operator()().
|
inline |
Definition at line 175 of file treeDataCell.H.
References treeDataCell::mesh_.
Referenced by treeDataCell::findNearestOp::operator()().
|
inline |
Definition at line 180 of file treeDataCell.H.
References treeDataCell::decompMode_.
|
inline |
Definition at line 185 of file treeDataCell.H.
References treeDataCell::cellLabels_, and List::size().
Foam::pointField shapePoints | ( | ) | const |
Get representative point cloud for all shapes inside.
(one point per shape)
Definition at line 156 of file treeDataCell.C.
References forAll.
|
inline |
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
Only makes sense for closed surfaces.
Definition at line 200 of file treeDataCell.H.
References NotImplemented, and volumeType::UNKNOWN.
bool overlaps | ( | const label | index, |
const treeBoundBox & | sampleBb | ||
) | const |
Does (bb of) shape at index overlap bb.
Definition at line 170 of file treeDataCell.C.
References treeBoundBox::overlaps().
Does shape at index contain sample.
Definition at line 187 of file treeDataCell.C.
|
private |
Definition at line 58 of file treeDataCell.H.
Referenced by treeDataCell::calcCellBb(), treeDataCell::mesh(), and treeDataCell::findIntersectOp::operator()().
|
private |
Subset of cells to work on.
Definition at line 61 of file treeDataCell.H.
Referenced by treeDataCell::cellLabels(), treeDataCell::findIntersectOp::operator()(), and treeDataCell::size().
|
private |
Whether to precalculate and store cell bounding box.
Definition at line 64 of file treeDataCell.H.
Referenced by treeDataCell::findIntersectOp::operator()().
|
private |
How to decide if point is inside cell.
Definition at line 67 of file treeDataCell.H.
Referenced by treeDataCell::decompMode().
|
private |
Cell bounding boxes (valid only if cacheBb_)
Definition at line 70 of file treeDataCell.H.
Referenced by treeDataCell::findIntersectOp::operator()().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.