#include <KDTree.h>
Definition at line 28 of file KDTree.h.
◆ KdTreeT
◆ KDTree()
| KDTree::KDTree |
( |
const std::vector< Point > & |
master_points, |
|
|
unsigned int |
max_leaf_size |
|
) |
| |
Definition at line 27 of file KDTree.C.
30 LIBMESH_DIM,
_point_list_adaptor, nanoflann::KDTreeSingleIndexAdaptorParams(max_leaf_size)))
31{
32 mooseAssert(
_kd_tree !=
nullptr,
"KDTree was not properly initialized.");
33
35}
std::unique_ptr< KdTreeT > _kd_tree
PointListAdaptor< Point > _point_list_adaptor
◆ ~KDTree()
| virtual KDTree::~KDTree |
( |
| ) |
|
|
virtualdefault |
◆ neighborSearch() [1/2]
| void KDTree::neighborSearch |
( |
const Point & |
query_point, |
|
|
unsigned int |
patch_size, |
|
|
std::vector< std::size_t > & |
return_index |
|
) |
| |
◆ neighborSearch() [2/2]
| void KDTree::neighborSearch |
( |
const Point & |
query_point, |
|
|
unsigned int |
patch_size, |
|
|
std::vector< std::size_t > & |
return_index, |
|
|
std::vector< Real > & |
return_dist_sqr |
|
) |
| |
Definition at line 47 of file KDTree.C.
51{
52 return_index.resize(patch_size);
53
54 std::size_t n_result =
55 _kd_tree->knnSearch(&query_point(0), patch_size, return_index.data(), return_dist_sqr.data());
56
57 if (n_result == 0)
59
60 return_index.resize(n_result);
61 return_dist_sqr.resize(n_result);
62}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
◆ numberCandidatePoints()
| std::size_t KDTree::numberCandidatePoints |
( |
| ) |
|
Definition at line 74 of file KDTree.C.
75{
77}
size_t kdtree_get_point_count() const
Must return the number of data points.
◆ radiusSearch()
| void KDTree::radiusSearch |
( |
const Point & |
query_point, |
|
|
Real |
radius, |
|
|
std::vector< nanoflann::ResultItem< std::size_t, Real > > & |
indices_dist |
|
) |
| |
Definition at line 65 of file KDTree.C.
68{
70 _kd_tree->radiusSearch(&query_point(0), radius * radius, indices_dist, sp);
71}
SearchParams SearchParameters
◆ _kd_tree
| std::unique_ptr<KdTreeT> KDTree::_kd_tree |
|
protected |
◆ _point_list_adaptor
The documentation for this class was generated from the following files: