From d89487a1a4aff7154367093808277eb8a4b295d3 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 20 Nov 2019 11:30:29 -0500 Subject: [PATCH] Use overloads again --- source/base/tensor_product_polynomials.cc | 53 +++++++++++------------ 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/source/base/tensor_product_polynomials.cc b/source/base/tensor_product_polynomials.cc index 521fd17323..b1fb82078a 100644 --- a/source/base/tensor_product_polynomials.cc +++ b/source/base/tensor_product_polynomials.cc @@ -33,7 +33,7 @@ namespace internal { namespace { - template + template inline void compute_tensor_index(const unsigned int, const unsigned int, @@ -43,33 +43,30 @@ namespace internal Assert(false, ExcNotImplemented()); } - template <> inline void - compute_tensor_index<1>(const unsigned int n, - const unsigned int, - const unsigned int, - std::array &indices) + compute_tensor_index(const unsigned int n, + const unsigned int, + const unsigned int, + std::array &indices) { indices[0] = n; } - template <> inline void - compute_tensor_index<2>(const unsigned int n, - const unsigned int n_pols_0, - const unsigned int, - std::array &indices) + compute_tensor_index(const unsigned int n, + const unsigned int n_pols_0, + const unsigned int, + std::array &indices) { indices[0] = n % n_pols_0; indices[1] = n / n_pols_0; } - template <> inline void - compute_tensor_index<3>(const unsigned int n, - const unsigned int n_pols_0, - const unsigned int n_pols_1, - std::array &indices) + compute_tensor_index(const unsigned int n, + const unsigned int n_pols_0, + const unsigned int n_pols_1, + std::array &indices) { indices[0] = n % n_pols_0; indices[1] = (n / n_pols_0) % n_pols_1; @@ -88,10 +85,10 @@ TensorProductPolynomials::compute_index( { Assert(i < Utilities::fixed_power(polynomials.size()), ExcInternalError()); - internal::compute_tensor_index(index_map[i], - polynomials.size(), - polynomials.size(), - indices); + internal::compute_tensor_index(index_map[i], + polynomials.size(), + polynomials.size(), + indices); } @@ -473,15 +470,15 @@ AnisotropicPolynomials::compute_index( { } else if (dim == 1) - internal::compute_tensor_index(i, - polynomials[0].size(), - 0 /*not used*/, - indices); + internal::compute_tensor_index(i, + polynomials[0].size(), + 0 /*not used*/, + indices); else - internal::compute_tensor_index(i, - polynomials[0].size(), - polynomials[1].size(), - indices); + internal::compute_tensor_index(i, + polynomials[0].size(), + polynomials[1].size(), + indices); } -- 2.39.5