From: Jean-Paul Pelteret Date: Tue, 7 May 2019 19:45:51 +0000 (+0200) Subject: Move definition of a template function to the header file X-Git-Tag: v9.1.0-rc1~35^2~8 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e4e08f06b4f6321847e595f46a5da2751bf8b37;p=dealii.git Move definition of a template function to the header file --- diff --git a/include/deal.II/differentiation/sd/symengine_tensor_operations.h b/include/deal.II/differentiation/sd/symengine_tensor_operations.h index bee99ca003..d1d78a2c6b 100644 --- a/include/deal.II/differentiation/sd/symengine_tensor_operations.h +++ b/include/deal.II/differentiation/sd/symengine_tensor_operations.h @@ -761,7 +761,17 @@ namespace Differentiation template TableIndices<4> make_rank_4_tensor_indices(const unsigned int &idx_i, - const unsigned int &idx_j); + const unsigned int &idx_j) + { + const TableIndices<2> indices_i( + SymmetricTensor<2, dim>::unrolled_to_component_indices(idx_i)); + const TableIndices<2> indices_j( + SymmetricTensor<2, dim>::unrolled_to_component_indices(idx_j)); + return TableIndices<4>(indices_i[0], + indices_i[1], + indices_j[0], + indices_j[1]); + } template diff --git a/source/differentiation/sd/symengine_tensor_operations.cc b/source/differentiation/sd/symengine_tensor_operations.cc index e07a3b4911..ced2db7940 100644 --- a/source/differentiation/sd/symengine_tensor_operations.cc +++ b/source/differentiation/sd/symengine_tensor_operations.cc @@ -38,21 +38,6 @@ namespace Differentiation namespace internal { - template - TableIndices<4> - make_rank_4_tensor_indices(const unsigned int &idx_i, - const unsigned int &idx_j) - { - const TableIndices<2> indices_i( - SymmetricTensor<2, dim>::unrolled_to_component_indices(idx_i)); - const TableIndices<2> indices_j( - SymmetricTensor<2, dim>::unrolled_to_component_indices(idx_j)); - return TableIndices<4>(indices_i[0], - indices_i[1], - indices_j[0], - indices_j[1]); - } - namespace { template