]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Instantiate Tensor class for auto-differentiable numbers 6231/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Thu, 12 Apr 2018 13:33:49 +0000 (15:33 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Thu, 12 Apr 2018 21:16:51 +0000 (23:16 +0200)
doc/news/changes/minor/20180412Jean-PaulPelteret-2 [new file with mode: 0644]
source/base/tensor.cc
source/base/tensor.inst.in

diff --git a/doc/news/changes/minor/20180412Jean-PaulPelteret-2 b/doc/news/changes/minor/20180412Jean-PaulPelteret-2
new file mode 100644 (file)
index 0000000..d809b37
--- /dev/null
@@ -0,0 +1,4 @@
+Fixed: The Tensor class was previously not instantiated for
+auto-differentiable numbers.
+<br>
+(Jean-Paul Pelteret, 2018/04/12)
index acf9af0cdda4dc4c15c6d4f91dd487a5cc71a484..96675577a6ee870544db0e275137bcb20d55e0d6 100644 (file)
 //
 // ---------------------------------------------------------------------
 
+#include <deal.II/base/config.h>
+
+// Required for instantiation of template functions
+#include <deal.II/differentiation/ad/adolc_product_types.h>
+#include <deal.II/differentiation/ad/sacado_product_types.h>
+
 #include <deal.II/base/tensor.h>
 
 DEAL_II_NAMESPACE_OPEN
index 18840ec4d73fc98e5e9252cac1219e124a8eb6e1..afc817e16257fca49cd4598a1c7ca1d0e4bc74d7 100644 (file)
@@ -40,3 +40,29 @@ for (deal_II_dimension : DIMENSIONS; number : COMPLEX_SCALARS)
     template
     class Tensor<0,deal_II_dimension,number>;
 }
+
+
+for (rank : RANKS; deal_II_dimension : DIMENSIONS; number : DIFFERENTIABLE_ADOLC_REAL_SCALARS)
+{
+    template
+    class Tensor<rank,deal_II_dimension,number>;
+}
+
+
+for (deal_II_dimension : DIMENSIONS; number : DIFFERENTIABLE_ADOLC_REAL_SCALARS)
+{
+    template
+    class Tensor<0,deal_II_dimension,number>;
+}
+
+for (rank : RANKS; deal_II_dimension : DIMENSIONS; number : DIFFERENTIABLE_TRILINOS_SACADO_REAL_SCALARS)
+{
+    template
+    class Tensor<rank,deal_II_dimension,number>;
+}
+
+for (deal_II_dimension : DIMENSIONS; number : DIFFERENTIABLE_TRILINOS_SACADO_REAL_SCALARS)
+{
+    template
+    class Tensor<0,deal_II_dimension,number>;
+}

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.