16#ifndef dealii_arborx_access_traits_h
17#define dealii_arborx_access_traits_h
21#ifdef DEAL_II_WITH_ARBORX
43 template <
int dim,
typename Number>
55 const ::Point<3, float> &
56 get(
unsigned int i)
const;
59 std::vector<::Point<3, float>>
points;
77 template <
int dim,
typename Number>
102 template <
int dim,
typename Number>
133 template <
int dim,
typename Number>
146 const ::BoundingBox<3, float> &
147 get(
unsigned int i)
const;
168 template <
int dim,
typename Number>
192 template <
int dim,
typename Number>
224 template <
int dim,
typename Number>
238 const std::pair<::Point<3, float>,
float> &
239 get(
unsigned int)
const;
242 std::vector<std::pair<::Point<3, float>,
float>>
spheres;
260 template <
int dim,
typename Number>
286 template <
int dim,
typename Number>
317 template <
int dim,
typename Number>
318 struct AccessTraits<
std::vector<::Point<dim, Number>>, PrimitivesTag>
341 template <
int dim,
typename Number>
342 struct AccessTraits<
std::vector<::BoundingBox<dim, Number>>,
366 template <
int dim,
typename Number>
368 std::vector<std::pair<::Point<dim, Number>, Number>>,
403 size(const ::ArborXWrappers::PointIntersectPredicate &pt_intersect);
410 get(const ::ArborXWrappers::PointIntersectPredicate &pt_intersect,
429 size(const ::ArborXWrappers::PointNearestPredicate &pt_nearest);
437 get(const ::ArborXWrappers::PointNearestPredicate &pt_nearest,
457 size(const ::ArborXWrappers::BoundingBoxIntersectPredicate
466 const ::ArborXWrappers::BoundingBoxIntersectPredicate &bb_intersect,
486 size(const ::ArborXWrappers::BoundingBoxNearestPredicate &bb_nearest);
496 get(const ::ArborXWrappers::BoundingBoxNearestPredicate &bb_nearest,
515 size(const ::ArborXWrappers::SphereIntersectPredicate &sph_intersect);
522 get(const ::ArborXWrappers::SphereIntersectPredicate &sph_intersect,
541 size(const ::ArborXWrappers::SphereNearestPredicate &sph_nearest);
549 get(const ::ArborXWrappers::SphereNearestPredicate &sph_nearest,
560 AccessTraits<::ArborXWrappers::PointIntersectPredicate, PredicatesTag>::
561 size(const ::ArborXWrappers::PointIntersectPredicate &pt_intersect)
563 return pt_intersect.size();
569 AccessTraits<::ArborXWrappers::PointIntersectPredicate, PredicatesTag>::
570 get(const ::ArborXWrappers::PointIntersectPredicate &pt_intersect,
573 const auto dealii_point = pt_intersect.get(i);
574 return intersects(
Point{dealii_point[0], dealii_point[1], dealii_point[2]});
580 AccessTraits<::ArborXWrappers::PointNearestPredicate, PredicatesTag>::
581 size(const ::ArborXWrappers::PointNearestPredicate &pt_nearest)
583 return pt_nearest.size();
589 AccessTraits<::ArborXWrappers::PointNearestPredicate, PredicatesTag>::
590 get(const ::ArborXWrappers::PointNearestPredicate &pt_nearest,
593 const auto dealii_point = pt_nearest.get(i);
594 return nearest(
Point{dealii_point[0], dealii_point[1], dealii_point[2]},
595 pt_nearest.get_n_nearest_neighbors());
604 const ::ArborXWrappers::BoundingBoxIntersectPredicate &bb_intersect)
606 return bb_intersect.
size();
615 const ::ArborXWrappers::BoundingBoxIntersectPredicate &bb_intersect,
619 const ::Point<3, float> min_corner = boundary_points.first;
620 const ::Point<3, float> max_corner = boundary_points.second;
622 return intersects(Box{{min_corner[0], min_corner[1], min_corner[2]},
623 {max_corner[0], max_corner[1], max_corner[2]}});
631 size(const ::ArborXWrappers::BoundingBoxNearestPredicate &bb_nearest)
633 return bb_nearest.
size();
641 get(const ::ArborXWrappers::BoundingBoxNearestPredicate &bb_nearest,
645 const ::Point<3, float> min_corner = boundary_points.first;
646 const ::Point<3, float> max_corner = boundary_points.second;
648 return nearest(Box{{min_corner[0], min_corner[1], min_corner[2]},
649 {max_corner[0], max_corner[1], max_corner[2]}},
650 bb_nearest.get_n_nearest_neighbors());
658 size(const ::ArborXWrappers::SphereIntersectPredicate &sph_intersect)
660 return sph_intersect.
size();
668 get(const ::ArborXWrappers::SphereIntersectPredicate &sph_intersect,
671 const auto sphere = sph_intersect.
get(i);
673 Sphere{{sphere.first[0], sphere.first[1], sphere.first[2]},
680 AccessTraits<::ArborXWrappers::SphereNearestPredicate, PredicatesTag>::
681 size(const ::ArborXWrappers::SphereNearestPredicate &sph_nearest)
683 return sph_nearest.size();
689 AccessTraits<::ArborXWrappers::SphereNearestPredicate, PredicatesTag>::
690 get(const ::ArborXWrappers::SphereNearestPredicate &sph_nearest,
693 const auto sphere = sph_nearest.get(i);
694 return nearest(Sphere{{sphere.first[0], sphere.first[1], sphere.first[2]},
696 sph_nearest.get_n_nearest_neighbors());
const ::BoundingBox< 3, float > & get(unsigned int i) const
unsigned int n_nearest_neighbors
unsigned int get_n_nearest_neighbors() const
const ::BoundingBox< 3, float > & get(unsigned int i) const
std::vector<::BoundingBox< 3, float > > bounding_boxes
const ::BoundingBox< 3, float > & get(unsigned int i) const
unsigned int n_nearest_neighbors
unsigned int get_n_nearest_neighbors() const
std::vector<::Point< 3, float > > points
const ::Point< 3, float > & get(unsigned int i) const
const std::pair<::Point< 3, float >, float > & get(unsigned int) const
unsigned int n_nearest_neighbors
unsigned int get_n_nearest_neighbors() const
const std::pair<::Point< 3, float >, float > & get(unsigned int) const
std::vector< std::pair<::Point< 3, float >, float > > spheres
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
Kokkos::HostSpace memory_space
Kokkos::HostSpace memory_space
Kokkos::HostSpace memory_space