]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Instantiate SymmetricTensor class for auto-differentiable numbers 6232/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Thu, 12 Apr 2018 13:39:11 +0000 (15:39 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 13 Apr 2018 05:07:54 +0000 (07:07 +0200)
doc/news/changes/minor/20180412Jean-PaulPelteret-4 [new file with mode: 0644]
source/base/symmetric_tensor.cc
source/base/symmetric_tensor.inst.in

diff --git a/doc/news/changes/minor/20180412Jean-PaulPelteret-4 b/doc/news/changes/minor/20180412Jean-PaulPelteret-4
new file mode 100644 (file)
index 0000000..edb1c45
--- /dev/null
@@ -0,0 +1,4 @@
+Fixed: The SymmetricTensor class was previously not instantiated for
+auto-differentiable numbers.
+<br>
+(Jean-Paul Pelteret, 2018/04/12)
index b6c125d0e5e5caf1963fcf68d2e9cc66ecc5c8cf..f4b6242ca5d562a32146bbca49cce9bb3b29dd77 100644 (file)
 #include <deal.II/base/config.h>
 
 // Required for instantiation of template functions
-#ifdef DEAL_II_WITH_TRILINOS
-
-#  include <Sacado.hpp>
-
+#include <deal.II/differentiation/ad/adolc_product_types.h>
 #include <deal.II/differentiation/ad/sacado_product_types.h>
-#endif
 
 #include <deal.II/base/symmetric_tensor.h>
 #include <deal.II/base/symmetric_tensor.templates.h>
index e321af8d47ae7bef2e3efe153c8d65415f111bd7..7e7963fe7dded34588cca570d45db7c7376db275 100644 (file)
@@ -22,123 +22,79 @@ for (deal_II_dimension : DIMENSIONS; number : REAL_SCALARS)
     template
     class SymmetricTensor<4,deal_II_dimension,number>;
 
-    namespace internal
-    \{
-    namespace SymmetricTensorImplementation
-    \{
     template
-    void
-    tridiagonalize<deal_II_dimension, number>
-    (const dealii::SymmetricTensor<2,deal_II_dimension,number> &,
-     dealii::Tensor<2,deal_II_dimension,number>                &,
-     std::array<number,deal_II_dimension>                      &,
-     std::array<number,deal_II_dimension-1>                    &);
+    std::array<number,deal_II_dimension>
+    eigenvalues (const SymmetricTensor<2,deal_II_dimension,number> &);
 
     template
     std::array<std::pair<number, Tensor<1,deal_II_dimension,number> >,deal_II_dimension>
-    ql_implicit_shifts<deal_II_dimension, number>
-    (const dealii::SymmetricTensor<2,deal_II_dimension,number> &);
-
-    template
-    std::array<std::pair<number, Tensor<1,deal_II_dimension,number> >,deal_II_dimension>
-    jacobi<deal_II_dimension, number>
-    (dealii::SymmetricTensor<2,deal_II_dimension,number>);
-
-#ifdef DEAL_II_WITH_TRILINOS
-    template
-    void
-    tridiagonalize<deal_II_dimension,Sacado::Fad::DFad<number> >
-    (const dealii::SymmetricTensor<2,deal_II_dimension,Sacado::Fad::DFad<number> > &,
-     dealii::Tensor<2,deal_II_dimension,Sacado::Fad::DFad<number> >                &,
-     std::array<Sacado::Fad::DFad<number>,deal_II_dimension>                       &,
-     std::array<Sacado::Fad::DFad<number>,deal_II_dimension-1>                     &);
-
-    template
-    std::array<std::pair<Sacado::Fad::DFad<number>, Tensor<1,deal_II_dimension,Sacado::Fad::DFad<number> > >,deal_II_dimension>
-    ql_implicit_shifts<deal_II_dimension,Sacado::Fad::DFad<number> >
-    (const dealii::SymmetricTensor<2,deal_II_dimension,Sacado::Fad::DFad<number> > &);
-
-    template
-    std::array<std::pair<Sacado::Fad::DFad<number>, Tensor<1,deal_II_dimension,Sacado::Fad::DFad<number> > >,deal_II_dimension>
-    jacobi<deal_II_dimension,Sacado::Fad::DFad<number> >
-    (dealii::SymmetricTensor<2,deal_II_dimension,Sacado::Fad::DFad<number> >);
-#endif
-    \}
-    \}
+    eigenvectors (const SymmetricTensor<2,deal_II_dimension,number> &,
+                  const SymmetricTensorEigenvectorMethod);
 }
 
-for (deal_II_dimension : DIMENSIONS; number : COMPLEX_SCALARS)
+for (deal_II_dimension : DIMENSIONS; number : DIFFERENTIABLE_ADOLC_REAL_SCALARS)
 {
     template
     class SymmetricTensor<2,deal_II_dimension,number>;
 
     template
     class SymmetricTensor<4,deal_II_dimension,number>;
-}
 
-
-for (number : REAL_SCALARS)
-{
-    namespace internal
-    \{
-    namespace SymmetricTensorImplementation
-    \{
     template
-    struct Inverse<4,3,number>;
-    \}
-    \}
+    std::array<number,deal_II_dimension>
+    eigenvalues (const SymmetricTensor<2,deal_II_dimension,number> &);
 
     template
-    SymmetricTensor<4,3,number>
-    invert (const SymmetricTensor<4,3,number> &t);
+    std::array<std::pair<number, Tensor<1,deal_II_dimension,number> >,deal_II_dimension>
+    eigenvectors (const SymmetricTensor<2,deal_II_dimension,number> &,
+                  const SymmetricTensorEigenvectorMethod);
+}
 
+for (deal_II_dimension : DIMENSIONS; number : DIFFERENTIABLE_TRILINOS_SACADO_REAL_SCALARS)
+{
     template
-    std::array<number,1>
-    eigenvalues (const SymmetricTensor<2,1,number> &);
+    class SymmetricTensor<2,deal_II_dimension,number>;
 
     template
-    std::array<number,2>
-    eigenvalues (const SymmetricTensor<2,2,number> &);
+    class SymmetricTensor<4,deal_II_dimension,number>;
 
     template
-    std::array<number,3>
-    eigenvalues (const SymmetricTensor<2,3,number> &);
+    std::array<number,deal_II_dimension>
+    eigenvalues (const SymmetricTensor<2,deal_II_dimension,number> &);
 
-#ifdef DEAL_II_WITH_TRILINOS
     template
-    std::array<Sacado::Fad::DFad<number>,1>
-    eigenvalues (const SymmetricTensor<2,1,Sacado::Fad::DFad<number> > &);
+    std::array<std::pair<number, Tensor<1,deal_II_dimension,number> >,deal_II_dimension>
+    eigenvectors (const SymmetricTensor<2,deal_II_dimension,number> &,
+                  const SymmetricTensorEigenvectorMethod);
+}
 
+for (deal_II_dimension : DIMENSIONS; number : COMPLEX_SCALARS)
+{
     template
-    std::array<Sacado::Fad::DFad<number>,2>
-    eigenvalues (const SymmetricTensor<2,2,Sacado::Fad::DFad<number> > &);
+    class SymmetricTensor<2,deal_II_dimension,number>;
 
     template
-    std::array<Sacado::Fad::DFad<number>,3>
-    eigenvalues (const SymmetricTensor<2,3,Sacado::Fad::DFad<number> > &);
-#endif
+    class SymmetricTensor<4,deal_II_dimension,number>;
+}
 
-    namespace internal
-    \{
-    namespace SymmetricTensorImplementation
-    \{
-    template
-    std::array<std::pair<number, Tensor<1,2,number> >,2>
-    hybrid (const dealii::SymmetricTensor<2,2,number> &);
 
+for (number : REAL_SCALARS)
+{
     template
-    std::array<std::pair<number, Tensor<1,3,number> >,3>
-    hybrid (const dealii::SymmetricTensor<2,3,number> &A);
+    SymmetricTensor<4,3,number>
+    invert (const SymmetricTensor<4,3,number> &t);
+}
 
-#ifdef DEAL_II_WITH_TRILINOS
+for (number : DIFFERENTIABLE_ADOLC_REAL_SCALARS)
+{
     template
-    std::array<std::pair<Sacado::Fad::DFad<number>, Tensor<1,2,Sacado::Fad::DFad<number> > >,2>
-    hybrid (const dealii::SymmetricTensor<2,2,Sacado::Fad::DFad<number> > &);
+    SymmetricTensor<4,3,number>
+    invert (const SymmetricTensor<4,3,number> &t);
+}
 
+for (number : DIFFERENTIABLE_TRILINOS_SACADO_REAL_SCALARS)
+{
     template
-    std::array<std::pair<Sacado::Fad::DFad<number>, Tensor<1,3,Sacado::Fad::DFad<number> > >,3>
-    hybrid (const dealii::SymmetricTensor<2,3,Sacado::Fad::DFad<number> > &A);
-#endif
-    \}
-    \}
+    SymmetricTensor<4,3,number>
+    invert (const SymmetricTensor<4,3,number> &t);
 }

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.