From: Daniel Arndt Date: Wed, 20 Nov 2019 16:30:29 +0000 (-0500) Subject: Use overloads again X-Git-Tag: v9.2.0-rc1~862^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d89487a1a4aff7154367093808277eb8a4b295d3;p=dealii.git Use overloads again --- 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); }