17 #include <deal.II/base/config.h> 19 #ifdef DEAL_II_WITH_ADOLC 21 # include <deal.II/differentiation/ad/ad_number_traits.h> 22 # include <deal.II/differentiation/ad/adolc_number_types.h> 26 DEAL_II_NAMESPACE_OPEN
29 # ifdef DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING 42 adouble_boolean_comparator(
43 const adouble &value_1,
44 const adouble &value_2,
45 const std::function<adouble(
const adouble &,
const adouble &)>
52 std::is_same<adouble, ad_type>::value,
53 "The type of the AD number is not that which was expected.");
54 const ad_type result = comparator(value_1, value_2);
64 return internal::adouble_boolean_comparator(
65 value_1, value_2, [](
const adouble &a,
const adouble &b) -> adouble {
66 return ::internal::NumberType<adouble>::value(a == b);
73 return internal::adouble_boolean_comparator(
74 value_1, value_2, [](
const adouble &a,
const adouble &b) -> adouble {
75 return ::internal::NumberType<adouble>::value(a < b);
85 # include "adolc_number_types.inst" 87 DEAL_II_NAMESPACE_CLOSE
bool values_are_equal(const Number1 &value_1, const Number2 &value_2)
bool value_is_less_than(const Number1 &value_1, const Number2 &value_2)