From: Daniel Arndt Date: Sun, 4 Aug 2019 14:47:06 +0000 (-0400) Subject: Delegate Point implementation to Tensor X-Git-Tag: v9.2.0-rc1~1242^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e59e1623f8b52bf63183d02a61f63980ac86538;p=dealii.git Delegate Point implementation to Tensor --- 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)); }