15#ifndef dealii_arborx_access_traits_h
16#define dealii_arborx_access_traits_h
20#ifdef DEAL_II_WITH_ARBORX
42 template <
int dim,
typename Number>
54 const ::Point<3, float> &
55 get(
unsigned int i)
const;
58 std::vector<::Point<3, float>>
points;
76 template <
int dim,
typename Number>
101 template <
int dim,
typename Number>
132 template <
int dim,
typename Number>
145 const ::BoundingBox<3, float> &
146 get(
unsigned int i)
const;
167 template <
int dim,
typename Number>
191 template <
int dim,
typename Number>
223 template <
int dim,
typename Number>
237 const std::pair<::Point<3, float>,
float> &
238 get(
unsigned int)
const;
241 std::vector<std::pair<::Point<3, float>,
float>>
spheres;
259 template <
int dim,
typename Number>
285 template <
int dim,
typename Number>
316 template <
int dim,
typename Number>
317 struct AccessTraits<
std::vector<::Point<dim, Number>>, PrimitivesTag>
340 template <
int dim,
typename Number>
341 struct AccessTraits<
std::vector<::BoundingBox<dim, Number>>,
365 template <
int dim,
typename Number>
367 std::vector<std::pair<::Point<dim, Number>, Number>>,
402 size(const ::ArborXWrappers::PointIntersectPredicate &pt_intersect);
409 get(const ::ArborXWrappers::PointIntersectPredicate &pt_intersect,
428 size(const ::ArborXWrappers::PointNearestPredicate &pt_nearest);
436 get(const ::ArborXWrappers::PointNearestPredicate &pt_nearest,
456 size(const ::ArborXWrappers::BoundingBoxIntersectPredicate
465 const ::ArborXWrappers::BoundingBoxIntersectPredicate &bb_intersect,
485 size(const ::ArborXWrappers::BoundingBoxNearestPredicate &bb_nearest);
495 get(const ::ArborXWrappers::BoundingBoxNearestPredicate &bb_nearest,
514 size(const ::ArborXWrappers::SphereIntersectPredicate &sph_intersect);
521 get(const ::ArborXWrappers::SphereIntersectPredicate &sph_intersect,
540 size(const ::ArborXWrappers::SphereNearestPredicate &sph_nearest);
548 get(const ::ArborXWrappers::SphereNearestPredicate &sph_nearest,
559 AccessTraits<::ArborXWrappers::PointIntersectPredicate, PredicatesTag>::
560 size(const ::ArborXWrappers::PointIntersectPredicate &pt_intersect)
562 return pt_intersect.size();
568 AccessTraits<::ArborXWrappers::PointIntersectPredicate, PredicatesTag>::
569 get(const ::ArborXWrappers::PointIntersectPredicate &pt_intersect,
572 const auto dealii_point = pt_intersect.get(i);
573 return intersects(
Point{dealii_point[0], dealii_point[1], dealii_point[2]});
579 AccessTraits<::ArborXWrappers::PointNearestPredicate, PredicatesTag>::
580 size(const ::ArborXWrappers::PointNearestPredicate &pt_nearest)
582 return pt_nearest.size();
588 AccessTraits<::ArborXWrappers::PointNearestPredicate, PredicatesTag>::
589 get(const ::ArborXWrappers::PointNearestPredicate &pt_nearest,
592 const auto dealii_point = pt_nearest.get(i);
593 return nearest(
Point{dealii_point[0], dealii_point[1], dealii_point[2]},
594 pt_nearest.get_n_nearest_neighbors());
603 const ::ArborXWrappers::BoundingBoxIntersectPredicate &bb_intersect)
605 return bb_intersect.
size();
614 const ::ArborXWrappers::BoundingBoxIntersectPredicate &bb_intersect,
618 const ::Point<3, float> min_corner = boundary_points.first;
619 const ::Point<3, float> max_corner = boundary_points.second;
621 return intersects(Box{{min_corner[0], min_corner[1], min_corner[2]},
622 {max_corner[0], max_corner[1], max_corner[2]}});
630 size(const ::ArborXWrappers::BoundingBoxNearestPredicate &bb_nearest)
632 return bb_nearest.
size();
640 get(const ::ArborXWrappers::BoundingBoxNearestPredicate &bb_nearest,
644 const ::Point<3, float> min_corner = boundary_points.first;
645 const ::Point<3, float> max_corner = boundary_points.second;
647 return nearest(Box{{min_corner[0], min_corner[1], min_corner[2]},
648 {max_corner[0], max_corner[1], max_corner[2]}},
649 bb_nearest.get_n_nearest_neighbors());
657 size(const ::ArborXWrappers::SphereIntersectPredicate &sph_intersect)
659 return sph_intersect.
size();
667 get(const ::ArborXWrappers::SphereIntersectPredicate &sph_intersect,
670 const auto sphere = sph_intersect.
get(i);
672 Sphere{{sphere.first[0], sphere.first[1], sphere.first[2]},
679 AccessTraits<::ArborXWrappers::SphereNearestPredicate, PredicatesTag>::
680 size(const ::ArborXWrappers::SphereNearestPredicate &sph_nearest)
682 return sph_nearest.size();
688 AccessTraits<::ArborXWrappers::SphereNearestPredicate, PredicatesTag>::
689 get(const ::ArborXWrappers::SphereNearestPredicate &sph_nearest,
692 const auto sphere = sph_nearest.get(i);
693 return nearest(Sphere{{sphere.first[0], sphere.first[1], sphere.first[2]},
695 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