|
Reference documentation for deal.II version 9.2.0
|
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\)
\(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\)
\(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\)
\(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Go to the documentation of this file.
16 #ifndef dealii_numerics_kdtree_h
17 #define dealii_numerics_kdtree_h
21 #ifdef DEAL_II_WITH_NANOFLANN
25 # include <nanoflann.hpp>
91 KDTree(
const unsigned int max_leaf_size = 10,
125 kdtree_get_point_count()
const;
132 kdtree_distance(
const coord_t * p1,
133 const std::size_t idx_p2,
134 const std::size_t size)
const;
141 kdtree_get_pt(
const std::size_t idx,
const int d)
const;
151 template <
class BBOX>
153 kdtree_get_bbox(BBOX &)
const;
161 nanoflann::L2_Simple_Adaptor<double, PointCloudAdaptor>,
185 set_points(
const std::vector<
Point<dim>> &pts);
191 const Point<dim> &operator[](
const unsigned int i)
const;
214 std::vector<std::pair<unsigned int, double>>
215 get_points_within_ball(
const Point<dim> &target,
217 const bool sorted =
false)
const;
228 std::vector<std::pair<unsigned int, double>>
230 const unsigned int n_points)
const;
260 return adaptor->points.size();
271 return adaptor->points[i];
299 return points[idx][
d];
305 template <
class BBOX>
317 const std::size_t idx_p2,
318 const std::size_t
size)
const
322 for (std::size_t
d = 0;
d <
size; ++
d)
323 res += (p1[
d] - points[idx_p2][
d]) * (p1[
d] - points[idx_p2][
d]);
330 #endif // DEAL_II_WITH_NANO_FLANN
coord_t kdtree_get_pt(const std::size_t idx, const int d) const
bool kdtree_get_bbox(BBOX &) const
std::unique_ptr< NanoFlannKDTree > kdtree
#define AssertIndexRange(index, range)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
const Point< dim > & operator[](const unsigned int i) const
typename nanoflann::KDTreeSingleIndexAdaptor< nanoflann::L2_Simple_Adaptor< double, PointCloudAdaptor >, PointCloudAdaptor, dim, unsigned int > NanoFlannKDTree
coord_t kdtree_distance(const coord_t *p1, const std::size_t idx_p2, const std::size_t size) const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_DEPRECATED
#define AssertDimension(dim1, dim2)
const std::vector< Point< dim > > & points
std::unique_ptr< PointCloudAdaptor > adaptor
inline ::VectorizedArray< Number, width > sqrt(const ::VectorizedArray< Number, width > &x)
PointCloudAdaptor(const std::vector< Point< dim >> &_points)
const unsigned int max_leaf_size
size_t kdtree_get_point_count() const
#define DEAL_II_NAMESPACE_CLOSE
unsigned int size() const