From 1e59e1623f8b52bf63183d02a61f63980ac86538 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sun, 4 Aug 2019 10:47:06 -0400 Subject: [PATCH] Delegate Point implementation to Tensor --- include/deal.II/base/point.h | 51 +++++------------------------------- 1 file changed, 6 insertions(+), 45 deletions(-) diff --git a/include/deal.II/base/point.h b/include/deal.II/base/point.h index 8a62844aba..7599edde4c 100644 --- a/include/deal.II/base/point.h +++ b/include/deal.II/base/point.h @@ -560,50 +560,6 @@ inline DEAL_II_CUDA_HOST_DEV -namespace internal -{ - namespace PointImplementation - { - template ::type>::value, - int>::type = 0> - inline DEAL_II_CUDA_HOST_DEV - Point::type> - division_operator(const Point &p, const OtherNumber factor) - { - using common_type = typename ProductType::type; - Point tmp; - const auto inverse_factor = - static_cast(1.) / static_cast(factor); - for (unsigned int i = 0; i < dim; ++i) - tmp[i] = p[i] * inverse_factor; - return tmp; - } - - template ::type>::value, - int>::type = 0> - inline DEAL_II_CUDA_HOST_DEV - Point::type> - division_operator(const Point &p, const OtherNumber factor) - { - Point::type> tmp; - for (unsigned int i = 0; i < dim; ++i) - tmp[i] = p[i] / factor; - return tmp; - } - } // namespace PointImplementation -} // namespace internal - - template template inline DEAL_II_CUDA_HOST_DEV @@ -612,7 +568,12 @@ inline DEAL_II_CUDA_HOST_DEV typename EnableIfScalar::type>::type> Point::operator/(const OtherNumber factor) const { - return internal::PointImplementation::division_operator(*this, factor); + const Tensor<1, dim, Number> &base_object = *this; + return Point< + dim, + typename ProductType::type>::type>( + dealii::operator/(base_object, factor)); } -- 2.39.5