17#ifdef DEAL_II_WITH_ARBORX
25 template <
int dim,
typename Number>
29 static_assert(dim >= 1 && dim <= 3);
40 template <
int dim,
typename Number>
44 const unsigned int size = dim_points.size();
46 for (
unsigned int i = 0; i <
size; ++i)
47 points.emplace_back(to_3d_float_point(dim_points[i]));
60 const ::Point<3, float> &
68 template <
int dim,
typename Number>
76 template <
int dim,
typename Number>
79 const unsigned int n_nearest_neighbors)
81 , n_nearest_neighbors(n_nearest_neighbors)
93 template <
int dim,
typename Number>
97 const unsigned int size = bb.size();
101 for (
unsigned int i = 0; i <
size; ++i)
103 auto boundary_points = bb[i].get_boundary_points();
106 for (
unsigned int d = 0; d < dim; ++d)
108 min_corner_arborx[d] =
static_cast<float>(min_corner[d]);
109 max_corner_arborx[d] =
static_cast<float>(max_corner[d]);
112 std::make_pair(min_corner_arborx, max_corner_arborx));
126 const ::BoundingBox<3, float> &
134 template <
int dim,
typename Number>
142 template <
int dim,
typename Number>
145 const unsigned int n_nearest_neighbors)
147 , n_nearest_neighbors(n_nearest_neighbors)
159 template <
int dim,
typename Number>
164 const unsigned int size = dim_spheres.size();
166 for (
unsigned int i = 0; i <
size; ++i)
170 spheres.emplace_back(to_3d_float_point(dim_spheres[i].
first),
171 static_cast<float>(dim_spheres[i].
second));
185 const std::pair<::Point<3, float>,
float> &
193 template <
int dim,
typename Number>
201 template <
int dim,
typename Number>
204 const unsigned int n_nearest_neighbors)
206 , n_nearest_neighbors(n_nearest_neighbors)
224 template <
int dim,
typename Number>
228 static_assert(dim >= 1 && dim <= 3);
230 return {float(p[0]), 0.f, 0.f};
232 return {float(p[0]), float(p[1]), 0.f};
234 return {float(p[0]), float(p[1]), float(p[2])};
241 template <
int dim,
typename Number>
243 AccessTraits<std::vector<::Point<dim, Number>>, PrimitivesTag>::size(
251 template <
int dim,
typename Number>
253 AccessTraits<std::vector<::Point<dim, Number>>, PrimitivesTag>::get(
259 return to_arborx_point(v[i]);
265 template <
int dim,
typename Number>
267 AccessTraits<std::vector<::BoundingBox<dim, Number>>, PrimitivesTag>::
275 template <
int dim,
typename Number>
277 AccessTraits<std::vector<::BoundingBox<dim, Number>>, PrimitivesTag>::
280 const auto boundary_points = v[i].get_boundary_points();
281 const ::Point<dim, Number> min_corner = boundary_points.first;
282 const ::Point<dim, Number> max_corner = boundary_points.second;
285 return {to_arborx_point(min_corner), to_arborx_point(max_corner)};
291 template <
int dim,
typename Number>
293 AccessTraits<std::vector<std::pair<::Point<dim, Number>, Number>>,
302 template <
int dim,
typename Number>
304 AccessTraits<std::vector<std::pair<::Point<dim, Number>, Number>>,
311 return {to_arborx_point(v[i].
first),
static_cast<float>(v[i].second)};
316# include "access_traits.inst"
BoundingBoxIntersectPredicate(const std::vector<::BoundingBox< dim, Number > > &bounding_boxes)
unsigned int n_nearest_neighbors
BoundingBoxNearestPredicate(const std::vector<::BoundingBox< dim, Number > > &bounding_boxes, const unsigned int n_nearest_neighbors)
unsigned int get_n_nearest_neighbors() const
BoundingBoxPredicate(const std::vector<::BoundingBox< dim, Number > > &bounding_boxes)
const ::BoundingBox< 3, float > & get(unsigned int i) const
std::vector<::BoundingBox< 3, float > > bounding_boxes
PointIntersectPredicate(const std::vector<::Point< dim, Number > > &points)
unsigned int n_nearest_neighbors
unsigned int get_n_nearest_neighbors() const
PointNearestPredicate(const std::vector<::Point< dim, Number > > &points, const unsigned int n_nearest_neighbors)
std::vector<::Point< 3, float > > points
PointPredicate(const std::vector<::Point< dim, Number > > &points)
const ::Point< 3, float > & get(unsigned int i) const
SphereIntersectPredicate(const std::vector< std::pair<::Point< dim, Number >, Number > > &spheres)
unsigned int n_nearest_neighbors
unsigned int get_n_nearest_neighbors() const
SphereNearestPredicate(const std::vector< std::pair<::Point< dim, Number >, Number > > &spheres, const unsigned int n_nearest_neighbors)
const std::pair<::Point< 3, float >, float > & get(unsigned int) const
std::vector< std::pair<::Point< 3, float >, float > > spheres
SpherePredicate(const std::vector< std::pair<::Point< dim, Number >, Number > > &spheres)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE