16#ifndef dealii_arborx_bvh_h
17#define dealii_arborx_bvh_h
21#ifdef DEAL_II_WITH_ARBORX
24# include <ArborX_LinearBVH.hpp>
25# include <Kokkos_Core.hpp>
60 template <
int dim,
typename Number>
66 template <
int dim,
typename Number>
138 template <
typename QueryType>
139 std::pair<std::vector<int>, std::vector<int>>
140 query(
const QueryType &queries);
146 ArborX::BVH<Kokkos::HostSpace>
bvh;
151 template <
int dim,
typename Number>
153 : bvh(Kokkos::DefaultHostExecutionSpace{}, bounding_boxes)
158 template <
int dim,
typename Number>
160 : bvh(Kokkos::DefaultHostExecutionSpace{}, points)
165 template <
typename QueryType>
166 std::pair<std::vector<int>, std::vector<int>>
169 Kokkos::View<int *, Kokkos::HostSpace> indices(
"indices", 0);
171 Kokkos::View<int *, Kokkos::HostSpace> offset(
"offset", 0);
173 bvh, Kokkos::DefaultHostExecutionSpace{}, queries, indices, offset);
174 std::vector<int> indices_vector;
175 indices_vector.insert(indices_vector.begin(),
177 indices.data() + indices.extent(0));
178 std::vector<int> offset_vector;
179 offset_vector.insert(offset_vector.begin(),
181 offset.data() + offset.extent(0));
183 return {indices_vector, offset_vector};
ArborX::BVH< Kokkos::HostSpace > bvh
std::pair< std::vector< int >, std::vector< int > > query(const QueryType &queries)
BVH(const std::vector< BoundingBox< dim, Number > > &bounding_boxes)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE