16#ifndef dealii_arborx_access_traits_h
17#define dealii_arborx_access_traits_h
21#ifdef DEAL_II_WITH_ARBORX
41 template <
int dim,
typename Number>
53 const ::Point<3, float> &
54 get(
unsigned int i)
const;
57 std::vector<::Point<3, float>>
points;
75 template <
int dim,
typename Number>
100 template <
int dim,
typename Number>
131 template <
int dim,
typename Number>
144 const ::BoundingBox<3, float> &
145 get(
unsigned int i)
const;
166 template <
int dim,
typename Number>
190 template <
int dim,
typename Number>
221 template <
int dim,
typename Number>
222 struct AccessTraits<
std::vector<::Point<dim, Number>>, PrimitivesTag>
245 template <
int dim,
typename Number>
246 struct AccessTraits<
std::vector<::BoundingBox<dim, Number>>,
279 size(const ::ArborXWrappers::PointIntersectPredicate &pt_intersect);
286 get(const ::ArborXWrappers::PointIntersectPredicate &pt_intersect,
304 size(const ::ArborXWrappers::PointNearestPredicate &pt_nearest);
312 get(const ::ArborXWrappers::PointNearestPredicate &pt_nearest,
331 size(const ::ArborXWrappers::BoundingBoxIntersectPredicate
340 const ::ArborXWrappers::BoundingBoxIntersectPredicate &bb_intersect,
359 size(const ::ArborXWrappers::BoundingBoxNearestPredicate &bb_nearest);
369 get(const ::ArborXWrappers::BoundingBoxNearestPredicate &bb_nearest,
380 AccessTraits<::ArborXWrappers::PointIntersectPredicate, PredicatesTag>::
381 size(const ::ArborXWrappers::PointIntersectPredicate &pt_intersect)
383 return pt_intersect.size();
389 AccessTraits<::ArborXWrappers::PointIntersectPredicate, PredicatesTag>::
390 get(const ::ArborXWrappers::PointIntersectPredicate &pt_intersect,
393 const auto dealii_point = pt_intersect.get(i);
394 return intersects(
Point{dealii_point[0], dealii_point[1], dealii_point[2]});
400 AccessTraits<::ArborXWrappers::PointNearestPredicate, PredicatesTag>::
401 size(const ::ArborXWrappers::PointNearestPredicate &pt_nearest)
403 return pt_nearest.size();
409 AccessTraits<::ArborXWrappers::PointNearestPredicate, PredicatesTag>::
410 get(const ::ArborXWrappers::PointNearestPredicate &pt_nearest,
413 const auto dealii_point = pt_nearest.get(i);
414 return nearest(
Point{dealii_point[0], dealii_point[1], dealii_point[2]},
415 pt_nearest.get_n_nearest_neighbors());
424 const ::ArborXWrappers::BoundingBoxIntersectPredicate &bb_intersect)
426 return bb_intersect.
size();
435 const ::ArborXWrappers::BoundingBoxIntersectPredicate &bb_intersect,
439 const ::Point<3, float> min_corner = boundary_points.first;
440 const ::Point<3, float> max_corner = boundary_points.second;
442 return intersects(Box{{min_corner[0], min_corner[1], min_corner[2]},
443 {max_corner[0], max_corner[1], max_corner[2]}});
451 size(const ::ArborXWrappers::BoundingBoxNearestPredicate &bb_nearest)
453 return bb_nearest.
size();
461 get(const ::ArborXWrappers::BoundingBoxNearestPredicate &bb_nearest,
465 const ::Point<3, float> min_corner = boundary_points.first;
466 const ::Point<3, float> max_corner = boundary_points.second;
468 return nearest(Box{{min_corner[0], min_corner[1], min_corner[2]},
469 {max_corner[0], max_corner[1], max_corner[2]}},
470 bb_nearest.get_n_nearest_neighbors());
BoundingBoxIntersectPredicate(const std::vector<::BoundingBox< dim, Number > > &bounding_boxes)
const ::BoundingBox< 3, float > & get(unsigned int i) const
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
const ::BoundingBox< 3, float > & get(unsigned int i) const
BoundingBoxPredicate(const std::vector<::BoundingBox< dim, Number > > &bounding_boxes)
std::vector<::BoundingBox< 3, float > > bounding_boxes
const ::BoundingBox< 3, float > & get(unsigned int i) const
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
std::pair< Point< spacedim, Number >, Point< spacedim, Number > > & get_boundary_points()
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
Kokkos::HostSpace memory_space
Kokkos::HostSpace memory_space
Kokkos::HostSpace memory_space
Kokkos::HostSpace memory_space
Kokkos::HostSpace memory_space
Kokkos::HostSpace memory_space