From: Jean-Paul Pelteret Date: Thu, 12 Apr 2018 12:26:47 +0000 (+0200) Subject: Ensure that numbers::NumberTraits works with AD numbers. X-Git-Tag: v9.0.0-rc1~188^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d03e18eeda002c144820c24470f677c38383b64;p=dealii.git Ensure that numbers::NumberTraits works with AD numbers. --- diff --git a/doc/news/changes/minor/20180412Jean-PaulPelteret-5 b/doc/news/changes/minor/20180412Jean-PaulPelteret-5 new file mode 100644 index 0000000000..0cfec9ea3a --- /dev/null +++ b/doc/news/changes/minor/20180412Jean-PaulPelteret-5 @@ -0,0 +1,4 @@ +Fixed: Ensure that numbers::NumberTraits and its corresponding operations are +well defined for all supported auto-differentiable numbers. +
+(Jean-Paul Pelteret, 2018/04/12) diff --git a/include/deal.II/base/numbers.h b/include/deal.II/base/numbers.h index 389329db7e..d8b8d25243 100644 --- a/include/deal.II/base/numbers.h +++ b/include/deal.II/base/numbers.h @@ -39,6 +39,17 @@ template struct EnableIfScalar; DEAL_II_NAMESPACE_CLOSE +// Declare / Import auto-differentiable math functions in(to) standard +// namespace before numbers::NumberTraits is defined +#include +// Ideally we'd like to #include +// but header indirectly references numbers.h. We therefore simply +// import the whole Sacado header at this point to get the math +// functions imported into the standard namespace. +#ifdef DEAL_II_WITH_TRILINOS +#include +#endif + namespace std { template DEAL_II_ALWAYS_INLINE ::dealii::VectorizedArray