--- /dev/null
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2016 - 2017 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+// Test that all of the floating point number traits return the correct
+// information
+
+#include <deal.II/differentiation/ad/ad_number_types.h>
+#include <deal.II/differentiation/ad/sacado_number_types.h>
+
+#include <complex>
+#include <fstream>
+#include <iomanip>
+#include <type_traits>
+
+#include "../tests.h"
+
+using namespace dealii;
+namespace AD = Differentiation::AD;
+
+template <typename NumberTraitsType>
+void
+print_info()
+{
+ deallog << "type_code: "
+ << static_cast<std::underlying_type<AD::NumberTypes>::type>(
+ NumberTraitsType::type_code)
+ << std::endl;
+ deallog << "is_taped: " << NumberTraitsType::is_taped << std::endl;
+ deallog << "is_tapeless: " << NumberTraitsType::is_tapeless << std::endl;
+ deallog << "is_real_valued: " << NumberTraitsType::is_real_valued
+ << std::endl;
+ deallog << "is_complex_valued: " << NumberTraitsType::is_complex_valued
+ << std::endl;
+ deallog << "n_supported_derivative_levels: "
+ << NumberTraitsType::n_supported_derivative_levels << std::endl;
+
+ deallog << "is_ad_number: "
+ << AD::is_ad_number<typename NumberTraitsType::ad_type>::value
+ << std::endl;
+ deallog << "is_sacado_number: "
+ << AD::is_sacado_number<typename NumberTraitsType::ad_type>::value
+ << std::endl;
+ deallog << "is_taped_ad_number: "
+ << AD::is_taped_ad_number<typename NumberTraitsType::ad_type>::value
+ << std::endl;
+ deallog
+ << "is_tapeless_ad_number: "
+ << AD::is_tapeless_ad_number<typename NumberTraitsType::ad_type>::value
+ << std::endl;
+}
+
+int
+main()
+{
+ initlog();
+
+ deallog.push("NumberTraits");
+
+ deallog.push("float");
+ print_info<AD::NumberTraits<float, AD::NumberTypes::none>>();
+ deallog.pop();
+
+ deallog.push("std::complex<float>");
+ print_info<AD::NumberTraits<std::complex<float>, AD::NumberTypes::none>>();
+ deallog.pop();
+
+ deallog.push("double");
+ print_info<AD::NumberTraits<double, AD::NumberTypes::none>>();
+ deallog.pop();
+
+ deallog.push("std::complex<double>");
+ print_info<AD::NumberTraits<std::complex<double>, AD::NumberTypes::none>>();
+ deallog.pop();
+
+ deallog.pop(); // NumberTraits
+
+ deallog << std::endl;
+
+ deallog.push("ADNumberTraits");
+
+ deallog.push("float");
+ print_info<AD::ADNumberTraits<float>>();
+ deallog.pop();
+
+ deallog.push("std::complex<float>");
+ print_info<AD::ADNumberTraits<std::complex<float>>>();
+ deallog.pop();
+
+ deallog.push("double");
+ print_info<AD::ADNumberTraits<double>>();
+ deallog.pop();
+
+ deallog.push("std::complex<double>");
+ print_info<AD::ADNumberTraits<std::complex<double>>>();
+ deallog.pop();
+
+ deallog.pop(); // ADNumberTraits
+
+ deallog << "OK" << std::endl;
+}
--- /dev/null
+
+DEAL:NumberTraits:float::type_code: 0
+DEAL:NumberTraits:float::is_taped: 0
+DEAL:NumberTraits:float::is_tapeless: 0
+DEAL:NumberTraits:float::is_real_valued: 1
+DEAL:NumberTraits:float::is_complex_valued: 0
+DEAL:NumberTraits:float::n_supported_derivative_levels: 0
+DEAL:NumberTraits:float::is_ad_number: 0
+DEAL:NumberTraits:float::is_sacado_number: 0
+DEAL:NumberTraits:float::is_taped_ad_number: 0
+DEAL:NumberTraits:float::is_tapeless_ad_number: 0
+DEAL:NumberTraits:std::complex<float>::type_code: 0
+DEAL:NumberTraits:std::complex<float>::is_taped: 0
+DEAL:NumberTraits:std::complex<float>::is_tapeless: 0
+DEAL:NumberTraits:std::complex<float>::is_real_valued: 0
+DEAL:NumberTraits:std::complex<float>::is_complex_valued: 1
+DEAL:NumberTraits:std::complex<float>::n_supported_derivative_levels: 0
+DEAL:NumberTraits:std::complex<float>::is_ad_number: 0
+DEAL:NumberTraits:std::complex<float>::is_sacado_number: 0
+DEAL:NumberTraits:std::complex<float>::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex<float>::is_tapeless_ad_number: 0
+DEAL:NumberTraits:double::type_code: 0
+DEAL:NumberTraits:double::is_taped: 0
+DEAL:NumberTraits:double::is_tapeless: 0
+DEAL:NumberTraits:double::is_real_valued: 1
+DEAL:NumberTraits:double::is_complex_valued: 0
+DEAL:NumberTraits:double::n_supported_derivative_levels: 0
+DEAL:NumberTraits:double::is_ad_number: 0
+DEAL:NumberTraits:double::is_sacado_number: 0
+DEAL:NumberTraits:double::is_taped_ad_number: 0
+DEAL:NumberTraits:double::is_tapeless_ad_number: 0
+DEAL:NumberTraits:std::complex<double>::type_code: 0
+DEAL:NumberTraits:std::complex<double>::is_taped: 0
+DEAL:NumberTraits:std::complex<double>::is_tapeless: 0
+DEAL:NumberTraits:std::complex<double>::is_real_valued: 0
+DEAL:NumberTraits:std::complex<double>::is_complex_valued: 1
+DEAL:NumberTraits:std::complex<double>::n_supported_derivative_levels: 0
+DEAL:NumberTraits:std::complex<double>::is_ad_number: 0
+DEAL:NumberTraits:std::complex<double>::is_sacado_number: 0
+DEAL:NumberTraits:std::complex<double>::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex<double>::is_tapeless_ad_number: 0
+DEAL::
+DEAL:ADNumberTraits:float::type_code: 0
+DEAL:ADNumberTraits:float::is_taped: 0
+DEAL:ADNumberTraits:float::is_tapeless: 0
+DEAL:ADNumberTraits:float::is_real_valued: 1
+DEAL:ADNumberTraits:float::is_complex_valued: 0
+DEAL:ADNumberTraits:float::n_supported_derivative_levels: 0
+DEAL:ADNumberTraits:float::is_ad_number: 0
+DEAL:ADNumberTraits:float::is_sacado_number: 0
+DEAL:ADNumberTraits:float::is_taped_ad_number: 0
+DEAL:ADNumberTraits:float::is_tapeless_ad_number: 0
+DEAL:ADNumberTraits:std::complex<float>::type_code: 0
+DEAL:ADNumberTraits:std::complex<float>::is_taped: 0
+DEAL:ADNumberTraits:std::complex<float>::is_tapeless: 0
+DEAL:ADNumberTraits:std::complex<float>::is_real_valued: 0
+DEAL:ADNumberTraits:std::complex<float>::is_complex_valued: 1
+DEAL:ADNumberTraits:std::complex<float>::n_supported_derivative_levels: 0
+DEAL:ADNumberTraits:std::complex<float>::is_ad_number: 0
+DEAL:ADNumberTraits:std::complex<float>::is_sacado_number: 0
+DEAL:ADNumberTraits:std::complex<float>::is_taped_ad_number: 0
+DEAL:ADNumberTraits:std::complex<float>::is_tapeless_ad_number: 0
+DEAL:ADNumberTraits:double::type_code: 0
+DEAL:ADNumberTraits:double::is_taped: 0
+DEAL:ADNumberTraits:double::is_tapeless: 0
+DEAL:ADNumberTraits:double::is_real_valued: 1
+DEAL:ADNumberTraits:double::is_complex_valued: 0
+DEAL:ADNumberTraits:double::n_supported_derivative_levels: 0
+DEAL:ADNumberTraits:double::is_ad_number: 0
+DEAL:ADNumberTraits:double::is_sacado_number: 0
+DEAL:ADNumberTraits:double::is_taped_ad_number: 0
+DEAL:ADNumberTraits:double::is_tapeless_ad_number: 0
+DEAL:ADNumberTraits:std::complex<double>::type_code: 0
+DEAL:ADNumberTraits:std::complex<double>::is_taped: 0
+DEAL:ADNumberTraits:std::complex<double>::is_tapeless: 0
+DEAL:ADNumberTraits:std::complex<double>::is_real_valued: 0
+DEAL:ADNumberTraits:std::complex<double>::is_complex_valued: 1
+DEAL:ADNumberTraits:std::complex<double>::n_supported_derivative_levels: 0
+DEAL:ADNumberTraits:std::complex<double>::is_ad_number: 0
+DEAL:ADNumberTraits:std::complex<double>::is_sacado_number: 0
+DEAL:ADNumberTraits:std::complex<double>::is_taped_ad_number: 0
+DEAL:ADNumberTraits:std::complex<double>::is_tapeless_ad_number: 0
+DEAL::OK