]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix undefined reference to some ADNumberTraits static variables. 7218/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Thu, 20 Sep 2018 09:36:18 +0000 (11:36 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Thu, 20 Sep 2018 12:46:15 +0000 (14:46 +0200)
Fixes #7211

include/deal.II/differentiation/ad/ad_number_traits.h

index 2b5073bb2e311a4c012ed160a07f9ba2c1b356d6..4675c493bf63dc564c2e1baeae058eaacbe99185 100644 (file)
@@ -1009,6 +1009,62 @@ namespace Differentiation
         typename internal::RemoveComplexWrapper<ScalarType>::type,
         ADNumberTypeCode>::n_supported_derivative_levels;
 
+#  else
+
+    template <typename ScalarType, enum NumberTypes ADNumberTypeCode>
+    constexpr bool NumberTraits<
+      ScalarType,
+      ADNumberTypeCode,
+      typename std::enable_if<
+        std::is_floating_point<ScalarType>::value ||
+        (boost::is_complex<ScalarType>::value &&
+         std::is_floating_point<typename internal::RemoveComplexWrapper<
+           ScalarType>::type>::value)>::type>::is_taped;
+
+
+    template <typename ScalarType, enum NumberTypes ADNumberTypeCode>
+    constexpr bool NumberTraits<
+      ScalarType,
+      ADNumberTypeCode,
+      typename std::enable_if<
+        std::is_floating_point<ScalarType>::value ||
+        (boost::is_complex<ScalarType>::value &&
+         std::is_floating_point<typename internal::RemoveComplexWrapper<
+           ScalarType>::type>::value)>::type>::is_tapeless;
+
+
+    template <typename ScalarType, enum NumberTypes ADNumberTypeCode>
+    constexpr bool NumberTraits<
+      ScalarType,
+      ADNumberTypeCode,
+      typename std::enable_if<
+        std::is_floating_point<ScalarType>::value ||
+        (boost::is_complex<ScalarType>::value &&
+         std::is_floating_point<typename internal::RemoveComplexWrapper<
+           ScalarType>::type>::value)>::type>::is_real_valued;
+
+
+    template <typename ScalarType, enum NumberTypes ADNumberTypeCode>
+    constexpr bool NumberTraits<
+      ScalarType,
+      ADNumberTypeCode,
+      typename std::enable_if<
+        std::is_floating_point<ScalarType>::value ||
+        (boost::is_complex<ScalarType>::value &&
+         std::is_floating_point<typename internal::RemoveComplexWrapper<
+           ScalarType>::type>::value)>::type>::is_complex_valued;
+
+
+    template <typename ScalarType, enum NumberTypes ADNumberTypeCode>
+    constexpr unsigned int NumberTraits<
+      ScalarType,
+      ADNumberTypeCode,
+      typename std::enable_if<
+        std::is_floating_point<ScalarType>::value ||
+        (boost::is_complex<ScalarType>::value &&
+         std::is_floating_point<typename internal::RemoveComplexWrapper<
+           ScalarType>::type>::value)>::type>::n_supported_derivative_levels;
+
 #  endif
 
 

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.