]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add ExpressionType template parameter to tensor make_substitution_map()
authorJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 11 May 2019 19:54:33 +0000 (21:54 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 11 May 2019 20:19:17 +0000 (22:19 +0200)
include/deal.II/differentiation/sd/symengine_tensor_operations.h

index 1014db2038d58882637203357024a95bd6e2e07d..0cc417eee3e5b0a681accf706f04edc5a79bf75c 100644 (file)
@@ -509,10 +509,11 @@ namespace Differentiation
      * @ref make_substitution_map(const Expression &,const ValueType &)
      * function.
      */
-    template <int rank, int dim, typename ValueType>
+    template <int rank, int dim, typename ExpressionType, typename ValueType>
     types::substitution_map
-    make_substitution_map(const Tensor<rank, dim, Expression> &symbol_tensor,
-                          const Tensor<rank, dim, ValueType> & value_tensor);
+    make_substitution_map(
+      const Tensor<rank, dim, ExpressionType> &symbol_tensor,
+      const Tensor<rank, dim, ValueType> &     value_tensor);
 
     /**
      * Return a substitution map that has the entry keys given by the
@@ -524,11 +525,11 @@ namespace Differentiation
      * @ref make_substitution_map(const Expression &,const ValueType &)
      * function.
      */
-    template <int rank, int dim, typename ValueType>
+    template <int rank, int dim, typename ExpressionType, typename ValueType>
     types::substitution_map
     make_substitution_map(
-      const SymmetricTensor<rank, dim, Expression> &symbol_tensor,
-      const SymmetricTensor<rank, dim, ValueType> & value_tensor);
+      const SymmetricTensor<rank, dim, ExpressionType> &symbol_tensor,
+      const SymmetricTensor<rank, dim, ValueType> &     value_tensor);
 
     //@}
 
@@ -1093,10 +1094,11 @@ namespace Differentiation
     /* ------------------ Symbol substitution map creation ----------------*/
 
 
-    template <int rank, int dim, typename ValueType>
+    template <int rank, int dim, typename ExpressionType, typename ValueType>
     types::substitution_map
-    make_substitution_map(const Tensor<rank, dim, Expression> &symbol_tensor,
-                          const Tensor<rank, dim, ValueType> & value_tensor)
+    make_substitution_map(
+      const Tensor<rank, dim, ExpressionType> &symbol_tensor,
+      const Tensor<rank, dim, ValueType> &     value_tensor)
     {
       types::substitution_map substitution_map;
       add_to_substitution_map(substitution_map, symbol_tensor, value_tensor);
@@ -1104,11 +1106,11 @@ namespace Differentiation
     }
 
 
-    template <int rank, int dim, typename ValueType>
+    template <int rank, int dim, typename ExpressionType, typename ValueType>
     types::substitution_map
     make_substitution_map(
-      const SymmetricTensor<rank, dim, Expression> &symbol_tensor,
-      const SymmetricTensor<rank, dim, ValueType> & value_tensor)
+      const SymmetricTensor<rank, dim, ExpressionType> &symbol_tensor,
+      const SymmetricTensor<rank, dim, ValueType> &     value_tensor)
     {
       types::substitution_map substitution_map;
       add_to_substitution_map(substitution_map, symbol_tensor, value_tensor);
@@ -1123,6 +1125,7 @@ namespace Differentiation
     {
       template <int rank,
                 int dim,
+                typename ExpressionType,
                 typename ValueType,
                 template <int, int, typename> class TensorType>
       std::vector<std::pair<ExpressionType, ValueType>>

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.