18#ifdef DEAL_II_WITH_ARBORX
25 template <
int dim,
typename Number>
29 static_assert(dim != 1,
"dim equal to one is not supported.");
31 const unsigned int size = dim_points.size();
33 for (
unsigned int i = 0; i <
size; ++i)
35 points.emplace_back(
static_cast<float>(dim_points[i][0]),
36 static_cast<float>(dim_points[i][1]),
38 static_cast<float>(dim_points[i][2]));
52 const ::Point<3, float> &
60 template <
int dim,
typename Number>
68 template <
int dim,
typename Number>
71 const unsigned int n_nearest_neighbors)
73 , n_nearest_neighbors(n_nearest_neighbors)
85 template <
int dim,
typename Number>
89 const unsigned int size = bb.size();
93 for (
unsigned int i = 0; i <
size; ++i)
95 auto boundary_points = bb[i].get_boundary_points();
98 for (
unsigned int d = 0; d < dim; ++d)
100 min_corner_arborx[d] =
static_cast<float>(min_corner[d]);
101 max_corner_arborx[d] =
static_cast<float>(max_corner[d]);
104 std::make_pair(min_corner_arborx, max_corner_arborx));
118 const ::BoundingBox<3, float> &
126 template <
int dim,
typename Number>
134 template <
int dim,
typename Number>
137 const unsigned int n_nearest_neighbors)
139 , n_nearest_neighbors(n_nearest_neighbors)
151 template <
int dim,
typename Number>
156 static_assert(dim != 1,
"dim equal to one is not supported.");
158 const unsigned int size = dim_spheres.size();
160 for (
unsigned int i = 0; i <
size; ++i)
164 spheres.emplace_back(std::make_pair(
166 static_cast<float>(dim_spheres[i].
first[0]),
167 static_cast<float>(dim_spheres[i].
first[1]),
168 dim == 2 ? 0.f :
static_cast<float>(dim_spheres[i].
first[2])),
169 static_cast<float>(dim_spheres[i].
second)));
183 const std::pair<::Point<3, float>,
float> &
191 template <
int dim,
typename Number>
199 template <
int dim,
typename Number>
202 const unsigned int n_nearest_neighbors)
204 , n_nearest_neighbors(n_nearest_neighbors)
221 template <
int dim,
typename Number>
223 AccessTraits<std::vector<::Point<dim, Number>>, PrimitivesTag>::size(
231 template <
int dim,
typename Number>
233 AccessTraits<std::vector<::Point<dim, Number>>, PrimitivesTag>::get(
239 return {
static_cast<float>(v[i][0]),
240 static_cast<float>(v[i][1]),
241 dim == 2 ? 0 :
static_cast<float>(v[i][2])};
247 template <
int dim,
typename Number>
249 AccessTraits<std::vector<::BoundingBox<dim, Number>>, PrimitivesTag>::
257 template <
int dim,
typename Number>
259 AccessTraits<std::vector<::BoundingBox<dim, Number>>, PrimitivesTag>::
262 const auto boundary_points = v[i].get_boundary_points();
263 const ::Point<dim, Number> min_corner = boundary_points.first;
264 const ::Point<dim, Number> max_corner = boundary_points.second;
267 return {{
static_cast<float>(min_corner[0]),
268 static_cast<float>(min_corner[1]),
269 dim == 2 ? 0.f :
static_cast<float>(min_corner[2])},
270 {
static_cast<float>(max_corner[0]),
271 static_cast<float>(max_corner[1]),
272 dim == 2 ? 0.f :
static_cast<float>(max_corner[2])}};
278 template <
int dim,
typename Number>
280 AccessTraits<std::vector<std::pair<::Point<dim, Number>, Number>>,
289 template <
int dim,
typename Number>
291 AccessTraits<std::vector<std::pair<::Point<dim, Number>, Number>>,
298 return {{
static_cast<float>(v[i].first[0]),
299 static_cast<float>(v[i].
first[1]),
300 dim == 2 ? 0 :
static_cast<float>(v[i].first[2])},
301 static_cast<float>(v[i].second)};
306# 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)
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
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