From 583ff6c1d5ba00c846c0afe834f841b24d070d64 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Thu, 12 Apr 2018 15:33:49 +0200 Subject: [PATCH] Instantiate Tensor class for auto-differentiable numbers --- .../changes/minor/20180412Jean-PaulPelteret-2 | 4 +++ source/base/tensor.cc | 6 +++++ source/base/tensor.inst.in | 26 +++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 doc/news/changes/minor/20180412Jean-PaulPelteret-2 diff --git a/doc/news/changes/minor/20180412Jean-PaulPelteret-2 b/doc/news/changes/minor/20180412Jean-PaulPelteret-2 new file mode 100644 index 0000000000..d809b37c8a --- /dev/null +++ b/doc/news/changes/minor/20180412Jean-PaulPelteret-2 @@ -0,0 +1,4 @@ +Fixed: The Tensor class was previously not instantiated for +auto-differentiable numbers. +
+(Jean-Paul Pelteret, 2018/04/12) diff --git a/source/base/tensor.cc b/source/base/tensor.cc index acf9af0cdd..96675577a6 100644 --- a/source/base/tensor.cc +++ b/source/base/tensor.cc @@ -13,6 +13,12 @@ // // --------------------------------------------------------------------- +#include + +// Required for instantiation of template functions +#include +#include + #include DEAL_II_NAMESPACE_OPEN diff --git a/source/base/tensor.inst.in b/source/base/tensor.inst.in index 18840ec4d7..afc817e162 100644 --- a/source/base/tensor.inst.in +++ b/source/base/tensor.inst.in @@ -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; +} + + +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; +} + +for (deal_II_dimension : DIMENSIONS; number : DIFFERENTIABLE_TRILINOS_SACADO_REAL_SCALARS) +{ + template + class Tensor<0,deal_II_dimension,number>; +} -- 2.39.5