17 #include <deal.II/base/config.h> 19 #ifdef DEAL_II_WITH_ADOLC 21 #include <deal.II/differentiation/ad/adolc_number_types.h> 22 #include <deal.II/differentiation/ad/ad_number_traits.h> 26 DEAL_II_NAMESPACE_OPEN
29 #ifdef DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING 43 adouble_boolean_comparator (
const adouble &value_1,
44 const adouble &value_2,
45 const std::function<adouble(
const adouble &,
const adouble &)> &comparator)
48 static_assert(std::is_same<adouble,ad_type>::value,
"The type of the AD number is not that which was expected.");
49 const ad_type result = comparator(value_1,value_2);
57 const adouble &value_2)
59 return internal::adouble_boolean_comparator(
61 [](
const adouble &a,
const adouble &b) -> adouble
63 return ::internal::NumberType<adouble>::value(a == b);
69 const adouble &value_2)
71 return internal::adouble_boolean_comparator(
73 [](
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)