From: Jean-Paul Pelteret Date: Thu, 12 Apr 2018 12:42:36 +0000 (+0200) Subject: Update Sacado number types. X-Git-Tag: v9.0.0-rc1~188^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e8de1df7316423bd7717cf9edcc1a356f188878;p=dealii.git Update Sacado number types. Default definitions for helper functions are now given irrespective of whether deal.II is compiled with Trilinos or not. This assists in generic programming. --- diff --git a/include/deal.II/differentiation/ad/sacado_number_types.h b/include/deal.II/differentiation/ad/sacado_number_types.h index ac93c961bb..69430d88b9 100644 --- a/include/deal.II/differentiation/ad/sacado_number_types.h +++ b/include/deal.II/differentiation/ad/sacado_number_types.h @@ -17,27 +17,9 @@ #define dealii_differentiation_ad_sacado_number_types_h #include - -#ifdef DEAL_II_WITH_TRILINOS - -#include -// It appears that some versions of Trilinos do not directly or indirectly -// include all the headers for all forward and reverse Sacado AD types. -// So we directly include these both here as a precaution. -// Standard forward AD classes (templated) -#include -// Reverse AD classes (templated) -#include - -#include -#include - -#include -#include - -#include #include + DEAL_II_NAMESPACE_OPEN @@ -54,7 +36,9 @@ namespace Differentiation * @author Jean-Paul Pelteret, 2017 */ template - struct is_sacado_number; + struct is_sacado_number + : std::false_type + {}; /** @@ -65,7 +49,9 @@ namespace Differentiation * @author Jean-Paul Pelteret, 2017 */ template - struct is_sacado_dfad_number; + struct is_sacado_dfad_number + : std::false_type + {}; /** @@ -76,7 +62,47 @@ namespace Differentiation * @author Jean-Paul Pelteret, 2017 */ template - struct is_sacado_rad_number; + struct is_sacado_rad_number + : std::false_type + {}; + + } // namespace AD +} // namespace Differentiation + + +DEAL_II_NAMESPACE_CLOSE + + + +#ifdef DEAL_II_WITH_TRILINOS + +DEAL_II_DISABLE_EXTRA_DIAGNOSTICS +#include +// It appears that some versions of Trilinos do not directly or indirectly +// include all the headers for all forward and reverse Sacado AD types. +// So we directly include these both here as a precaution. +// Standard forward AD classes (templated) +#include +// Reverse AD classes (templated) +#include +DEAL_II_ENABLE_EXTRA_DIAGNOSTICS + +#include +#include + +#include +#include + +#include +#include + +DEAL_II_NAMESPACE_OPEN + + +namespace Differentiation +{ + namespace AD + { namespace internal @@ -743,12 +769,6 @@ namespace Differentiation /* -------------- Additional type traits -------------- */ - template - struct is_sacado_dfad_number - : std::false_type - {}; - - template struct is_sacado_dfad_number::type>::type_code == NumberTypes::sacado_dfad || @@ -758,12 +778,6 @@ namespace Differentiation {}; - template - struct is_sacado_rad_number - : std::false_type - {}; - - template struct is_sacado_rad_number::type>::type_code == NumberTypes::sacado_rad || @@ -773,12 +787,6 @@ namespace Differentiation {}; - template - struct is_sacado_number - : std::false_type - {}; - - template struct is_sacado_number::value ||