* This struct allows ArborX to use std::vector<T> as primitive.
*/
template <typename T>
- struct AccessTraits<std::vector<T>>
+ struct AccessTraits<
+ std::vector<T>,
+ std::enable_if_t<
+ std::is_same_v<T, dealii::Point<T::dimension, float>> ||
+ std::is_same_v<T, dealii::Point<T::dimension, double>> ||
+ std::is_same_v<T, dealii::BoundingBox<T::dimension, float>> ||
+ std::is_same_v<T, dealii::BoundingBox<T::dimension, double>> ||
+ std::is_same_v<T, std::pair<dealii::Point<T::dimension, float>, float>> ||
+ std::is_same_v<T,
+ std::pair<dealii::Point<T::dimension, double>, double>>>>
{
using memory_space = Kokkos::HostSpace;
class BoundingBox
{
public:
+ /**
+ * Provide a way to get the dimension of an object without explicit
+ * knowledge of it's data type.
+ */
+ static constexpr unsigned int dimension = spacedim;
+
/**
* Standard constructor. Creates an object that corresponds to an empty box,
* i.e. a degenerate box with both points being the origin.
# else
template <typename T>
std::size_t
- AccessTraits<std::vector<T>>::size(const std::vector<T> &v)
+ AccessTraits<
+ std::vector<T>,
+ std::enable_if_t<
+ std::is_same_v<T, dealii::Point<T::dimension, float>> ||
+ std::is_same_v<T, dealii::Point<T::dimension, double>> ||
+ std::is_same_v<T, dealii::BoundingBox<T::dimension, float>> ||
+ std::is_same_v<T, dealii::BoundingBox<T::dimension, double>> ||
+ std::is_same_v<T, std::pair<dealii::Point<T::dimension, float>, float>> ||
+ std::is_same_v<T,
+ std::pair<dealii::Point<T::dimension, double>, double>>>>::
+ size(const std::vector<T> &v)
{
return v.size();
}
template <typename T>
T
- AccessTraits<std::vector<T>>::get(const std::vector<T> &v, std::size_t i)
+ AccessTraits<
+ std::vector<T>,
+ std::enable_if_t<
+ std::is_same_v<T, dealii::Point<T::dimension, float>> ||
+ std::is_same_v<T, dealii::Point<T::dimension, double>> ||
+ std::is_same_v<T, dealii::BoundingBox<T::dimension, float>> ||
+ std::is_same_v<T, dealii::BoundingBox<T::dimension, double>> ||
+ std::is_same_v<T, std::pair<dealii::Point<T::dimension, float>, float>> ||
+ std::is_same_v<T,
+ std::pair<dealii::Point<T::dimension, double>, double>>>>::
+ get(const std::vector<T> &v, std::size_t i)
{
return v[i];
}