| 56 | \*---------------------------------------------------------------------------*/ |
| 57 | |
| 58 | class meshSearch |
| 59 | { |
| 60 | // Private data |
| 61 | |
| 62 | //- Reference to mesh |
| 63 | const polyMesh& mesh_; |
| 64 | |
| 65 | //- Whether to use cell decomposition for all geometric tests |
| 66 | const polyMesh::cellDecomposition cellDecompMode_; |
| 67 | |
| 68 | //- Data bounding box |
| 69 | mutable autoPtr<treeBoundBox> overallBbPtr_; |
| 70 | |
| 71 | //- Demand driven octrees |
| 72 | mutable autoPtr<indexedOctree<treeDataFace>> boundaryTreePtr_; |
| 73 | mutable autoPtr<indexedOctree<treeDataCell>> cellTreePtr_; |
| 74 | |
| 75 | |
| 76 | // Private Member Functions |
| 77 | |
| 78 | //- Updates nearestI, nearestDistSqr from any closer ones. |
| 79 | static bool findNearer |
| 80 | ( |
| 81 | const point& sample, |
| 82 | const pointField& points, |
| 83 | label& nearestI, |
| 84 | scalar& nearestDistSqr |
| 85 | ); |
| 86 | |
| 87 | //- Updates nearestI, nearestDistSqr from any selected closer ones. |
| 88 | static bool findNearer |
| 89 | ( |
| 90 | const point& sample, |
| 91 | const pointField& points, |
| 92 | const labelList& indices, |
| 93 | label& nearestI, |
| 94 | scalar& nearestDistSqr |
| 95 | ); |
| 96 | |
| 97 | |
| 98 | // Cells |
| 99 | |
| 100 | //- Nearest cell centre using octree |
| 101 | label findNearestCellTree(const point&) const; |
| 102 | |
| 103 | //- Nearest cell centre going through all cells |
| 104 | label findNearestCellLinear(const point&) const; |
| 105 | |
| 106 | //- Walk from seed. Does not 'go around' boundary, just returns |
| 107 | // last cell before boundary. |
| 108 | label findNearestCellWalk(const point&, const label) const; |
| 109 | |
| 110 | //- Cell containing location. Linear search. |
| 111 | label findCellLinear(const point&) const; |
| 112 | |
| 113 | //- Walk from seed. Does not 'go around' boundary, just returns |
| 114 | // last cell before boundary. |
| 115 | label findCellWalk(const point&, const label) const; |
no outgoing calls
no test coverage detected