]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move definition of a template function to the header file
authorJean-Paul Pelteret <jppelteret@gmail.com>
Tue, 7 May 2019 19:45:51 +0000 (21:45 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Sun, 12 May 2019 19:24:02 +0000 (21:24 +0200)
include/deal.II/differentiation/sd/symengine_tensor_operations.h
source/differentiation/sd/symengine_tensor_operations.cc

index bee99ca0032fbb94bbca01ce5e26f3c75c29e481..d1d78a2c6bafe05543eb44efee3f56d2001a9665 100644 (file)
@@ -761,7 +761,17 @@ namespace Differentiation
       template <int dim>
       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 <int rank_1, int rank_2>
index e07a3b49113dde3b225d9cfcce2715758b0ada09..ced2db79404b77344eb4f8c142e46b497943e2a1 100644 (file)
@@ -38,21 +38,6 @@ namespace Differentiation
 
     namespace internal
     {
-      template <int dim>
-      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 <int rank>

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.