36 indirectRegionPatches_(),
48 indirectRegionPatches_(),
64 treeByRegion_.clear();
73 if (treeByRegion_.empty())
80 regionSizes(regionI)++;
85 indirectRegionPatches_.setSize(nRegions);
86 treeByRegion_.setSize(nRegions);
90 forAll(regionsAddressing, regionI)
92 regionsAddressing[regionI] =
labelList(regionSizes[regionI], -1);
101 regionsAddressing[regionI][nFacesInRegions[regionI]++] = fI;
104 forAll(regionsAddressing, regionI)
109 indirectRegionPatches_.set
117 regionsAddressing[regionI]
126 if (indirectRegionPatches_[regionI].size())
131 indirectRegionPatches_[regionI],
161 indirectRegionPatches_[regionI],
175 return treeByRegion_;
187 if (regionIndices.
empty())
202 if (
findIndex(regionIndices, treeI) == -1)
207 const treeType& octree = octrees[treeI];
225 currentRegionHit.
hit()
232 <
magSqr(info[i].hitPoint() - samples[i])
237 info[i] = currentRegionHit;
label maxTreeDepth() const
Return max tree depth of octree.
#define forAll(list, i)
Loop across all elements in list.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
void clearOut()
Clear storage.
void findNearest(const pointField &samples, const scalarField &nearestDistSqr, const labelList ®ionIndices, List< pointIndexHit > &info) const
Find the nearest point on the surface out of the regions.
A list of keyword definitions, which are a keyword followed by any number of values (e...
triSurfaceRegionSearch(const triSurface &)
Construct from surface. Holds reference to surface!
void size(const label)
Override size to be inconsistent with allocated storage.
static scalar & perturbTol()
Get the perturbation tolerance.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
label size() const
Return number of elements in table.
~triSurfaceRegionSearch()
Destructor.
void findNearest(const pointField &samples, const scalarField &nearestDistSqr, List< pointIndexHit > &info) const
Helper class to search on triSurface.
A list of faces which address into the list of points.
const Point & hitPoint() const
Return hit point.
triSurfaceSearch(const triSurface &)
Construct from surface. Holds reference to surface!
void clearOut()
Clear storage.
Encapsulation of data needed to search on PrimitivePatches.
bool hit() const
Is there a hit.
List< label > labelList
A List of labels.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
const PtrList< treeType > & treeByRegion() const
Demand driven construction of octree for each region.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
const triSurface & surface() const
Return reference to the surface.
void setSize(const label)
Reset size of List.
Non-pointer based hierarchical recursive searching.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
scalar tolerance() const
Return tolerance to use in searches.
Standard boundBox + extra functionality for use in octree.
const doubleScalar e
Elementary charge.
Triangulated surface description with patch information.
A List with indirect addressing.
treeBoundBox extend(const scalar s) const
Return asymetrically extended bounding box, with guaranteed.