16 #ifndef dealii_differentiation_ad_sacado_math_h 17 #define dealii_differentiation_ad_sacado_math_h 19 #include <deal.II/base/config.h> 21 #ifdef DEAL_II_TRILINOS_WITH_SACADO 23 # include <deal.II/base/numbers.h> 25 # include <deal.II/differentiation/ad/ad_number_traits.h> 26 # include <deal.II/differentiation/ad/sacado_number_types.h> 40 typename ADNumberType,
41 typename =
typename std::enable_if<
44 ADNumberType>::value>::type>
61 const double a1 = 0.254829592;
62 const double a2 = -0.284496736;
63 const double a3 = 1.421413741;
64 const double a4 = -1.453152027;
65 const double a5 = 1.061405429;
66 const double p = 0.3275911;
70 (x < ::internal::NumberType<ADNumberType>::value(0.0) ? true :
75 const ADNumberType t = 1.0 / (1.0 + p * x);
76 const ADNumberType y =
78 (((((a5 * t + a4) * t) + a3) * t + a2) * t + a1) * t * std::exp(-x * x);
91 typename ADNumberType,
92 typename =
typename std::enable_if<
95 erfc(
const ADNumberType &x)
97 return 1.0 - std::erf(x);
104 #endif // DEAL_II_TRILINOS_WITH_SACADO
Expression erfc(const Expression &x)
Expression erf(const Expression &x)