--- /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 at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+// Test that all of the Sacado number traits combinations are constructible
+
+#include "../tests.h"
+#include <deal.II/differentiation/ad/ad_number_types.h>
+#include <deal.II/differentiation/ad/sacado_number_types.h>
+
+//# include <Sacado.hpp>
+
+#include <complex>
+#include <fstream>
+#include <iomanip>
+
+using namespace dealii;
+namespace AD = Differentiation::AD;
+
+int main ()
+{
+ initlog();
+
+ // --- Sacado::Fad::DFad ---
+ AD::NumberTraits<float,AD::NumberTypes::sacado_dfad>();
+ AD::NumberTraits<std::complex<float>,AD::NumberTypes::sacado_dfad>();
+ AD::NumberTraits<double,AD::NumberTypes::sacado_dfad>();
+ AD::NumberTraits<std::complex<double>,AD::NumberTypes::sacado_dfad>();
+
+ AD::ADNumberTraits<Sacado::Fad::DFad<float> >();
+ AD::ADNumberTraits<std::complex< Sacado::Fad::DFad<float> > >();
+ AD::ADNumberTraits<Sacado::Fad::DFad<double> >();
+ AD::ADNumberTraits<std::complex< Sacado::Fad::DFad<double> > >();
+ AD::NumberTraits<Sacado::Fad::DFad<float>,AD::NumberTypes::sacado_dfad>();
+ AD::NumberTraits<std::complex< Sacado::Fad::DFad<float> >,AD::NumberTypes::sacado_dfad>();
+ AD::NumberTraits<Sacado::Fad::DFad<double>,AD::NumberTypes::sacado_dfad>();
+ AD::NumberTraits<std::complex< Sacado::Fad::DFad<double> >,AD::NumberTypes::sacado_dfad>();
+ deallog << "Sacado::Fad::DFad OK" << std::endl;
+
+ // --- Nested Sacado::Fad::DFad ---
+ AD::NumberTraits<float,AD::NumberTypes::sacado_dfad_dfad>();
+ AD::NumberTraits<std::complex<float>,AD::NumberTypes::sacado_dfad_dfad>();
+ AD::NumberTraits<double,AD::NumberTypes::sacado_dfad_dfad>();
+ AD::NumberTraits<std::complex<double>,AD::NumberTypes::sacado_dfad_dfad>();
+
+ AD::ADNumberTraits<Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >();
+ AD::ADNumberTraits<std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > > >();
+ AD::ADNumberTraits<Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >();
+ AD::ADNumberTraits<std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > > >();
+ AD::NumberTraits<Sacado::Fad::DFad<Sacado::Fad::DFad<float> >,AD::NumberTypes::sacado_dfad_dfad>();
+ AD::NumberTraits<std::complex< Sacado::Fad::DFad<Sacado::Fad::DFad<float> > >,AD::NumberTypes::sacado_dfad_dfad>();
+ AD::NumberTraits<Sacado::Fad::DFad<Sacado::Fad::DFad<double> >,AD::NumberTypes::sacado_dfad_dfad>();
+ AD::NumberTraits<std::complex< Sacado::Fad::DFad<Sacado::Fad::DFad<double> > >,AD::NumberTypes::sacado_dfad_dfad>();
+ deallog << "Nested Sacado::Fad::DFad OK" << std::endl;
+
+ // --- Sacado::Rad::ADvar ---
+ AD::NumberTraits<float,AD::NumberTypes::sacado_rad>();
+ AD::NumberTraits<double,AD::NumberTypes::sacado_rad>();
+
+ AD::ADNumberTraits<Sacado::Rad::ADvar<float> >();
+ AD::ADNumberTraits<Sacado::Rad::ADvar<double> >();
+ AD::NumberTraits<Sacado::Rad::ADvar<float>,AD::NumberTypes::sacado_rad>();
+ AD::NumberTraits<Sacado::Rad::ADvar<double>,AD::NumberTypes::sacado_rad>();
+
+#ifdef DEAL_II_WITH_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ AD::NumberTraits<std::complex<float>,AD::NumberTypes::sacado_rad>();
+ AD::NumberTraits<std::complex<double>,AD::NumberTypes::sacado_rad>();
+
+ AD::ADNumberTraits<std::complex< Sacado::Rad::ADvar<float> > >();
+ AD::ADNumberTraits<std::complex< Sacado::Rad::ADvar<double> > >();
+ AD::NumberTraits<std::complex< Sacado::Rad::ADvar<float> >,AD::NumberTypes::sacado_rad>();
+ AD::NumberTraits<std::complex< Sacado::Rad::ADvar<double> >,AD::NumberTypes::sacado_rad>();
+#endif
+ deallog << "Sacado::Rad::ADvar OK" << std::endl;
+
+ // --- Nested Sacado::Rad::ADvar<Sacado::Fad::DFad> ---
+ AD::NumberTraits<float,AD::NumberTypes::sacado_rad_dfad>();
+ AD::NumberTraits<double,AD::NumberTypes::sacado_rad_dfad>();
+
+ AD::ADNumberTraits<Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >();
+ AD::ADNumberTraits<Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >();
+ AD::NumberTraits<Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >,AD::NumberTypes::sacado_rad_dfad>();
+ AD::NumberTraits<Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >,AD::NumberTypes::sacado_rad_dfad>();
+
+#ifdef DEAL_II_WITH_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ AD::NumberTraits<std::complex<Sacado::Fad::DFad<float> >,AD::NumberTypes::sacado_rad_dfad>();
+ AD::NumberTraits<std::complex<Sacado::Fad::DFad<double> >,AD::NumberTypes::sacado_rad_dfad>();
+
+ AD::ADNumberTraits<std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > > >();
+ AD::ADNumberTraits<std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > > >();
+ AD::NumberTraits<std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >,AD::NumberTypes::sacado_rad_dfad>();
+ AD::NumberTraits<std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >,AD::NumberTypes::sacado_rad_dfad>();
+#endif
+ deallog << "Sacado::Rad::ADvar<Sacado::Fad::DFad> OK" << std::endl;
+ deallog << "OK" << std::endl;
+}
--- /dev/null
+
+DEAL::Sacado::Fad::DFad OK
+DEAL::Nested Sacado::Fad::DFad OK
+DEAL::Sacado::Rad::ADvar OK
+DEAL::Sacado::Rad::ADvar<Sacado::Fad::DFad> OK
+DEAL::OK
--- /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 at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+// Test that all of the Sacado number traits return the correct information
+// Sacado::Fad::DFad
+
+#include "../tests.h"
+#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>
+
+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::sacado_dfad> >();
+ deallog.pop();
+
+ deallog.push("std::complex<float>");
+ print_info<AD::NumberTraits<std::complex<float>,AD::NumberTypes::sacado_dfad> >();
+ deallog.pop();
+
+ deallog.push("double");
+ print_info<AD::NumberTraits<double,AD::NumberTypes::sacado_dfad> >();
+ deallog.pop();
+
+ deallog.push("std::complex<double>");
+ print_info<AD::NumberTraits<std::complex<double>,AD::NumberTypes::sacado_dfad> >();
+ deallog.pop();
+
+ deallog.push("Sacado::Fad::DFad<float>");
+ print_info<AD::NumberTraits<Sacado::Fad::DFad<float>,AD::NumberTypes::sacado_dfad> >();
+ deallog.pop();
+
+ deallog.push("std::complex< Sacado::Fad::DFad<float> >");
+ print_info<AD::NumberTraits<std::complex< Sacado::Fad::DFad<float> >,AD::NumberTypes::sacado_dfad> >();
+ deallog.pop();
+
+ deallog.push("Sacado::Fad::DFad<double>");
+ print_info<AD::NumberTraits<Sacado::Fad::DFad<double>,AD::NumberTypes::sacado_dfad> >();
+ deallog.pop();
+
+ deallog.push("std::complex< Sacado::Fad::DFad<double> >");
+ print_info<AD::NumberTraits<std::complex< Sacado::Fad::DFad<double> >,AD::NumberTypes::sacado_dfad> >();
+ deallog.pop();
+
+ deallog.pop(); // NumberTraits
+
+ deallog << std::endl;
+
+ deallog.push("ADNumberTraits");
+
+ deallog.push("Sacado::Fad::DFad<float>");
+ print_info<AD::ADNumberTraits< Sacado::Fad::DFad<float> > >();
+ deallog.pop();
+
+ deallog.push("std::complex< Sacado::Fad::DFad<float> >");
+ print_info<AD::ADNumberTraits<std::complex< Sacado::Fad::DFad<float> > > >();
+ deallog.pop();
+
+ deallog.push("Sacado::Fad::DFad<double>");
+ print_info<AD::ADNumberTraits< Sacado::Fad::DFad<double> > >();
+ deallog.pop();
+
+ deallog.push("std::complex< Sacado::Fad::DFad<double> >");
+ print_info<AD::ADNumberTraits<std::complex< Sacado::Fad::DFad<double> > > >();
+ deallog.pop();
+
+ deallog.pop(); // ADNumberTraits
+
+ deallog << "OK" << std::endl;
+}
--- /dev/null
+
+DEAL:NumberTraits:float::type_code: 2
+DEAL:NumberTraits:float::is_taped: 0
+DEAL:NumberTraits:float::is_tapeless: 1
+DEAL:NumberTraits:float::is_real_valued: 1
+DEAL:NumberTraits:float::is_complex_valued: 0
+DEAL:NumberTraits:float::n_supported_derivative_levels: 1
+DEAL:NumberTraits:float::is_ad_number: 1
+DEAL:NumberTraits:float::is_sacado_number: 1
+DEAL:NumberTraits:float::is_taped_ad_number: 0
+DEAL:NumberTraits:float::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex<float>::type_code: 2
+DEAL:NumberTraits:std::complex<float>::is_taped: 0
+DEAL:NumberTraits:std::complex<float>::is_tapeless: 1
+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: 1
+DEAL:NumberTraits:std::complex<float>::is_ad_number: 1
+DEAL:NumberTraits:std::complex<float>::is_sacado_number: 1
+DEAL:NumberTraits:std::complex<float>::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex<float>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:double::type_code: 2
+DEAL:NumberTraits:double::is_taped: 0
+DEAL:NumberTraits:double::is_tapeless: 1
+DEAL:NumberTraits:double::is_real_valued: 1
+DEAL:NumberTraits:double::is_complex_valued: 0
+DEAL:NumberTraits:double::n_supported_derivative_levels: 1
+DEAL:NumberTraits:double::is_ad_number: 1
+DEAL:NumberTraits:double::is_sacado_number: 1
+DEAL:NumberTraits:double::is_taped_ad_number: 0
+DEAL:NumberTraits:double::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex<double>::type_code: 2
+DEAL:NumberTraits:std::complex<double>::is_taped: 0
+DEAL:NumberTraits:std::complex<double>::is_tapeless: 1
+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: 1
+DEAL:NumberTraits:std::complex<double>::is_ad_number: 1
+DEAL:NumberTraits:std::complex<double>::is_sacado_number: 1
+DEAL:NumberTraits:std::complex<double>::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex<double>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:Sacado::Fad::DFad<float>::type_code: 2
+DEAL:NumberTraits:Sacado::Fad::DFad<float>::is_taped: 0
+DEAL:NumberTraits:Sacado::Fad::DFad<float>::is_tapeless: 1
+DEAL:NumberTraits:Sacado::Fad::DFad<float>::is_real_valued: 1
+DEAL:NumberTraits:Sacado::Fad::DFad<float>::is_complex_valued: 0
+DEAL:NumberTraits:Sacado::Fad::DFad<float>::n_supported_derivative_levels: 1
+DEAL:NumberTraits:Sacado::Fad::DFad<float>::is_ad_number: 1
+DEAL:NumberTraits:Sacado::Fad::DFad<float>::is_sacado_number: 1
+DEAL:NumberTraits:Sacado::Fad::DFad<float>::is_taped_ad_number: 0
+DEAL:NumberTraits:Sacado::Fad::DFad<float>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<float> >::type_code: 2
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_taped: 0
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_tapeless: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_real_valued: 0
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_complex_valued: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<float> >::n_supported_derivative_levels: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_sacado_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_tapeless_ad_number: 1
+DEAL:NumberTraits:Sacado::Fad::DFad<double>::type_code: 2
+DEAL:NumberTraits:Sacado::Fad::DFad<double>::is_taped: 0
+DEAL:NumberTraits:Sacado::Fad::DFad<double>::is_tapeless: 1
+DEAL:NumberTraits:Sacado::Fad::DFad<double>::is_real_valued: 1
+DEAL:NumberTraits:Sacado::Fad::DFad<double>::is_complex_valued: 0
+DEAL:NumberTraits:Sacado::Fad::DFad<double>::n_supported_derivative_levels: 1
+DEAL:NumberTraits:Sacado::Fad::DFad<double>::is_ad_number: 1
+DEAL:NumberTraits:Sacado::Fad::DFad<double>::is_sacado_number: 1
+DEAL:NumberTraits:Sacado::Fad::DFad<double>::is_taped_ad_number: 0
+DEAL:NumberTraits:Sacado::Fad::DFad<double>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<double> >::type_code: 2
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_taped: 0
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_tapeless: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_real_valued: 0
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_complex_valued: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<double> >::n_supported_derivative_levels: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_sacado_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_tapeless_ad_number: 1
+DEAL::
+DEAL:ADNumberTraits:Sacado::Fad::DFad<float>::type_code: 2
+DEAL:ADNumberTraits:Sacado::Fad::DFad<float>::is_taped: 0
+DEAL:ADNumberTraits:Sacado::Fad::DFad<float>::is_tapeless: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<float>::is_real_valued: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<float>::is_complex_valued: 0
+DEAL:ADNumberTraits:Sacado::Fad::DFad<float>::n_supported_derivative_levels: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<float>::is_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<float>::is_sacado_number: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<float>::is_taped_ad_number: 0
+DEAL:ADNumberTraits:Sacado::Fad::DFad<float>::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<float> >::type_code: 2
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_taped: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_tapeless: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_real_valued: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_complex_valued: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<float> >::n_supported_derivative_levels: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_sacado_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<float> >::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::type_code: 2
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_taped: 0
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_tapeless: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_real_valued: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_complex_valued: 0
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::n_supported_derivative_levels: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_sacado_number: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_taped_ad_number: 0
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<double> >::type_code: 2
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_taped: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_tapeless: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_real_valued: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_complex_valued: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<double> >::n_supported_derivative_levels: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_sacado_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad<double> >::is_tapeless_ad_number: 1
+DEAL::OK
--- /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 at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+// Test that all of the Sacado number traits return the correct information
+// Nested Sacado::Fad::DFad
+
+#include "../tests.h"
+#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>
+
+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::sacado_dfad_dfad> >();
+ deallog.pop();
+
+ deallog.push("std::complex<float>");
+ print_info<AD::NumberTraits<std::complex<float>,AD::NumberTypes::sacado_dfad_dfad> >();
+ deallog.pop();
+
+ deallog.push("double");
+ print_info<AD::NumberTraits<double,AD::NumberTypes::sacado_dfad_dfad> >();
+ deallog.pop();
+
+ deallog.push("std::complex<double>");
+ print_info<AD::NumberTraits<std::complex<double>,AD::NumberTypes::sacado_dfad_dfad> >();
+ deallog.pop();
+
+ deallog.push("Sacado::Fad::DFad< Sacado::Fad::DFad<float> >");
+ print_info<AD::NumberTraits<Sacado::Fad::DFad< Sacado::Fad::DFad<float> >,AD::NumberTypes::sacado_dfad_dfad> >();
+ deallog.pop();
+
+ deallog.push("std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >");
+ print_info<AD::NumberTraits<std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >,AD::NumberTypes::sacado_dfad_dfad> >();
+ deallog.pop();
+
+ deallog.push("Sacado::Fad::DFad< Sacado::Fad::DFad<double> >");
+ print_info<AD::NumberTraits<Sacado::Fad::DFad< Sacado::Fad::DFad<double> >,AD::NumberTypes::sacado_dfad_dfad> >();
+ deallog.pop();
+
+ deallog.push("std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >");
+ print_info<AD::NumberTraits<std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >,AD::NumberTypes::sacado_dfad_dfad> >();
+ deallog.pop();
+
+ deallog.pop(); // NumberTraits
+
+ deallog << std::endl;
+
+ deallog.push("ADNumberTraits");
+
+ deallog.push("Sacado::Fad::DFad< Sacado::Fad::DFad<float> >");
+ print_info<AD::ADNumberTraits< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > > >();
+ deallog.pop();
+
+ deallog.push("std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >");
+ print_info<AD::ADNumberTraits<std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > > > >();
+ deallog.pop();
+
+ deallog.push("Sacado::Fad::DFad<double>");
+ print_info<AD::ADNumberTraits< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > > >();
+ deallog.pop();
+
+ deallog.push("std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >");
+ print_info<AD::ADNumberTraits<std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > > > >();
+ deallog.pop();
+
+ deallog.pop(); // ADNumberTraits
+
+ deallog << "OK" << std::endl;
+}
--- /dev/null
+
+DEAL:NumberTraits:float::type_code: 3
+DEAL:NumberTraits:float::is_taped: 0
+DEAL:NumberTraits:float::is_tapeless: 1
+DEAL:NumberTraits:float::is_real_valued: 1
+DEAL:NumberTraits:float::is_complex_valued: 0
+DEAL:NumberTraits:float::n_supported_derivative_levels: 2
+DEAL:NumberTraits:float::is_ad_number: 1
+DEAL:NumberTraits:float::is_sacado_number: 1
+DEAL:NumberTraits:float::is_taped_ad_number: 0
+DEAL:NumberTraits:float::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex<float>::type_code: 3
+DEAL:NumberTraits:std::complex<float>::is_taped: 0
+DEAL:NumberTraits:std::complex<float>::is_tapeless: 1
+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: 2
+DEAL:NumberTraits:std::complex<float>::is_ad_number: 1
+DEAL:NumberTraits:std::complex<float>::is_sacado_number: 1
+DEAL:NumberTraits:std::complex<float>::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex<float>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:double::type_code: 3
+DEAL:NumberTraits:double::is_taped: 0
+DEAL:NumberTraits:double::is_tapeless: 1
+DEAL:NumberTraits:double::is_real_valued: 1
+DEAL:NumberTraits:double::is_complex_valued: 0
+DEAL:NumberTraits:double::n_supported_derivative_levels: 2
+DEAL:NumberTraits:double::is_ad_number: 1
+DEAL:NumberTraits:double::is_sacado_number: 1
+DEAL:NumberTraits:double::is_taped_ad_number: 0
+DEAL:NumberTraits:double::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex<double>::type_code: 3
+DEAL:NumberTraits:std::complex<double>::is_taped: 0
+DEAL:NumberTraits:std::complex<double>::is_tapeless: 1
+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: 2
+DEAL:NumberTraits:std::complex<double>::is_ad_number: 1
+DEAL:NumberTraits:std::complex<double>::is_sacado_number: 1
+DEAL:NumberTraits:std::complex<double>::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex<double>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::type_code: 3
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_taped: 0
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_tapeless: 1
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_real_valued: 1
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_complex_valued: 0
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::n_supported_derivative_levels: 2
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_ad_number: 1
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_sacado_number: 1
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_taped_ad_number: 0
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::type_code: 3
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_taped: 0
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_tapeless: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_real_valued: 0
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_complex_valued: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::n_supported_derivative_levels: 2
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_sacado_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_tapeless_ad_number: 1
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<double> >::type_code: 3
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<double> >::is_taped: 0
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<double> >::is_tapeless: 1
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<double> >::is_real_valued: 1
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<double> >::is_complex_valued: 0
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<double> >::n_supported_derivative_levels: 2
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<double> >::is_ad_number: 1
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<double> >::is_sacado_number: 1
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<double> >::is_taped_ad_number: 0
+DEAL:NumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<double> >::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::type_code: 3
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_taped: 0
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_tapeless: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_real_valued: 0
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_complex_valued: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::n_supported_derivative_levels: 2
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_sacado_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_tapeless_ad_number: 1
+DEAL::
+DEAL:ADNumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::type_code: 3
+DEAL:ADNumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_taped: 0
+DEAL:ADNumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_tapeless: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_real_valued: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_complex_valued: 0
+DEAL:ADNumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::n_supported_derivative_levels: 2
+DEAL:ADNumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_sacado_number: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:Sacado::Fad::DFad< Sacado::Fad::DFad<float> >::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::type_code: 3
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_taped: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_tapeless: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_real_valued: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_complex_valued: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::n_supported_derivative_levels: 2
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_sacado_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<float> > >::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::type_code: 3
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_taped: 0
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_tapeless: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_real_valued: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_complex_valued: 0
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::n_supported_derivative_levels: 2
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_sacado_number: 1
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_taped_ad_number: 0
+DEAL:ADNumberTraits:Sacado::Fad::DFad<double>::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::type_code: 3
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_taped: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_tapeless: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_real_valued: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_complex_valued: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::n_supported_derivative_levels: 2
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_sacado_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Fad::DFad< Sacado::Fad::DFad<double> > >::is_tapeless_ad_number: 1
+DEAL::OK
--- /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 at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+// Test that all of the Sacado number traits return the correct information
+// Sacado::Rad::ADvar
+
+#include "../tests.h"
+#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>
+
+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::sacado_rad> >();
+ deallog.pop();
+
+#ifdef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ deallog.push("std::complex<float>");
+ print_info<AD::NumberTraits<std::complex<float>,AD::NumberTypes::sacado_rad> >();
+ deallog.pop();
+#endif
+
+ deallog.push("double");
+ print_info<AD::NumberTraits<double,AD::NumberTypes::sacado_rad> >();
+ deallog.pop();
+
+#ifdef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ deallog.push("std::complex<double>");
+ print_info<AD::NumberTraits<std::complex<double>,AD::NumberTypes::sacado_rad> >();
+ deallog.pop();
+#endif
+
+ deallog.push("Sacado::Rad::ADvar<float>");
+ print_info<AD::NumberTraits<Sacado::Rad::ADvar<float>,AD::NumberTypes::sacado_rad> >();
+ deallog.pop();
+
+#ifdef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ deallog.push("std::complex< Sacado::Rad::ADvar<float> >");
+ print_info<AD::NumberTraits<std::complex< Sacado::Rad::ADvar<float> >,AD::NumberTypes::sacado_rad> >();
+ deallog.pop();
+#endif
+
+ deallog.push("Sacado::Rad::ADvar<double>");
+ print_info<AD::NumberTraits<Sacado::Rad::ADvar<double>,AD::NumberTypes::sacado_rad> >();
+ deallog.pop();
+
+#ifdef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ deallog.push("std::complex< Sacado::Rad::ADvar<double> >");
+ print_info<AD::NumberTraits<std::complex< Sacado::Rad::ADvar<double> >,AD::NumberTypes::sacado_rad> >();
+ deallog.pop();
+#endif
+
+ deallog.pop(); // NumberTraits
+ deallog << std::endl;
+ deallog.push("ADNumberTraits");
+
+ deallog.push("Sacado::Rad::ADvar<float>");
+ print_info<AD::ADNumberTraits< Sacado::Rad::ADvar<float> > >();
+ deallog.pop();
+
+#ifdef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ deallog.push("std::complex< Sacado::Rad::ADvar<float> >");
+ print_info<AD::ADNumberTraits<std::complex< Sacado::Rad::ADvar<float> > > >();
+ deallog.pop();
+#endif
+
+ deallog.push("Sacado::Rad::ADvar<double>");
+ print_info<AD::ADNumberTraits< Sacado::Rad::ADvar<double> > >();
+ deallog.pop();
+
+#ifdef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ deallog.push("std::complex< Sacado::Rad::ADvar<double> >");
+ print_info<AD::ADNumberTraits<std::complex< Sacado::Rad::ADvar<double> > > >();
+ deallog.pop();
+#endif
+
+ deallog.pop(); // ADNumberTraits
+
+ deallog << "OK" << std::endl;
+}
--- /dev/null
+
+DEAL:NumberTraits:float::type_code: 4
+DEAL:NumberTraits:float::is_taped: 0
+DEAL:NumberTraits:float::is_tapeless: 1
+DEAL:NumberTraits:float::is_real_valued: 1
+DEAL:NumberTraits:float::is_complex_valued: 0
+DEAL:NumberTraits:float::n_supported_derivative_levels: 1
+DEAL:NumberTraits:float::is_ad_number: 1
+DEAL:NumberTraits:float::is_sacado_number: 1
+DEAL:NumberTraits:float::is_taped_ad_number: 0
+DEAL:NumberTraits:float::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex<float>::type_code: 4
+DEAL:NumberTraits:std::complex<float>::is_taped: 0
+DEAL:NumberTraits:std::complex<float>::is_tapeless: 1
+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: 1
+DEAL:NumberTraits:std::complex<float>::is_ad_number: 1
+DEAL:NumberTraits:std::complex<float>::is_sacado_number: 1
+DEAL:NumberTraits:std::complex<float>::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex<float>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:double::type_code: 4
+DEAL:NumberTraits:double::is_taped: 0
+DEAL:NumberTraits:double::is_tapeless: 1
+DEAL:NumberTraits:double::is_real_valued: 1
+DEAL:NumberTraits:double::is_complex_valued: 0
+DEAL:NumberTraits:double::n_supported_derivative_levels: 1
+DEAL:NumberTraits:double::is_ad_number: 1
+DEAL:NumberTraits:double::is_sacado_number: 1
+DEAL:NumberTraits:double::is_taped_ad_number: 0
+DEAL:NumberTraits:double::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex<double>::type_code: 4
+DEAL:NumberTraits:std::complex<double>::is_taped: 0
+DEAL:NumberTraits:std::complex<double>::is_tapeless: 1
+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: 1
+DEAL:NumberTraits:std::complex<double>::is_ad_number: 1
+DEAL:NumberTraits:std::complex<double>::is_sacado_number: 1
+DEAL:NumberTraits:std::complex<double>::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex<double>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::type_code: 4
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_taped: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_tapeless: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_real_valued: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_complex_valued: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::n_supported_derivative_levels: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_sacado_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_taped_ad_number: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<float> >::type_code: 4
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_taped: 0
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_tapeless: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_real_valued: 0
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_complex_valued: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<float> >::n_supported_derivative_levels: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_sacado_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_tapeless_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::type_code: 4
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_taped: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_tapeless: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_real_valued: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_complex_valued: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::n_supported_derivative_levels: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_sacado_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_taped_ad_number: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<double> >::type_code: 4
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_taped: 0
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_tapeless: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_real_valued: 0
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_complex_valued: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<double> >::n_supported_derivative_levels: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_sacado_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_tapeless_ad_number: 1
+DEAL::
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::type_code: 4
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_taped: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_tapeless: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_real_valued: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_complex_valued: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::n_supported_derivative_levels: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_sacado_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_taped_ad_number: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<float> >::type_code: 4
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_taped: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_tapeless: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_real_valued: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_complex_valued: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<float> >::n_supported_derivative_levels: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_sacado_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<float> >::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::type_code: 4
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_taped: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_tapeless: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_real_valued: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_complex_valued: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::n_supported_derivative_levels: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_sacado_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_taped_ad_number: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<double> >::type_code: 4
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_taped: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_tapeless: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_real_valued: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_complex_valued: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<double> >::n_supported_derivative_levels: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_sacado_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<double> >::is_tapeless_ad_number: 1
+DEAL::OK
--- /dev/null
+
+DEAL:NumberTraits:float::type_code: 4
+DEAL:NumberTraits:float::is_taped: 0
+DEAL:NumberTraits:float::is_tapeless: 1
+DEAL:NumberTraits:float::is_real_valued: 1
+DEAL:NumberTraits:float::is_complex_valued: 0
+DEAL:NumberTraits:float::n_supported_derivative_levels: 1
+DEAL:NumberTraits:float::is_ad_number: 1
+DEAL:NumberTraits:float::is_sacado_number: 1
+DEAL:NumberTraits:float::is_taped_ad_number: 0
+DEAL:NumberTraits:float::is_tapeless_ad_number: 1
+DEAL:NumberTraits:double::type_code: 4
+DEAL:NumberTraits:double::is_taped: 0
+DEAL:NumberTraits:double::is_tapeless: 1
+DEAL:NumberTraits:double::is_real_valued: 1
+DEAL:NumberTraits:double::is_complex_valued: 0
+DEAL:NumberTraits:double::n_supported_derivative_levels: 1
+DEAL:NumberTraits:double::is_ad_number: 1
+DEAL:NumberTraits:double::is_sacado_number: 1
+DEAL:NumberTraits:double::is_taped_ad_number: 0
+DEAL:NumberTraits:double::is_tapeless_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::type_code: 4
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_taped: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_tapeless: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_real_valued: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_complex_valued: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::n_supported_derivative_levels: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_sacado_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_taped_ad_number: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<float>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::type_code: 4
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_taped: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_tapeless: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_real_valued: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_complex_valued: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::n_supported_derivative_levels: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_sacado_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_taped_ad_number: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<double>::is_tapeless_ad_number: 1
+DEAL::
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::type_code: 4
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_taped: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_tapeless: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_real_valued: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_complex_valued: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::n_supported_derivative_levels: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_sacado_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_taped_ad_number: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<float>::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::type_code: 4
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_taped: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_tapeless: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_real_valued: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_complex_valued: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::n_supported_derivative_levels: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_sacado_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_taped_ad_number: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<double>::is_tapeless_ad_number: 1
+DEAL::OK
--- /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 at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+// Test that all of the Sacado number traits return the correct information
+// Nested Sacado::Rad::ADvar<Sacado::Fad::DFad>
+
+#include "../tests.h"
+#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>
+
+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::sacado_rad_dfad> >();
+ deallog.pop();
+
+#ifdef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ deallog.push("std::complex<float>");
+ print_info<AD::NumberTraits<std::complex<float>,AD::NumberTypes::sacado_rad_dfad> >();
+ deallog.pop();
+#endif
+
+ deallog.push("double");
+ print_info<AD::NumberTraits<double,AD::NumberTypes::sacado_rad_dfad> >();
+ deallog.pop();
+
+#ifdef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ deallog.push("std::complex<double>");
+ print_info<AD::NumberTraits<std::complex<double>,AD::NumberTypes::sacado_rad_dfad> >();
+ deallog.pop();
+#endif
+
+ deallog.push("Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >");
+ print_info<AD::NumberTraits<Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >,AD::NumberTypes::sacado_rad_dfad> >();
+ deallog.pop();
+
+#ifdef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ deallog.push("std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >");
+ print_info<AD::NumberTraits<std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >,AD::NumberTypes::sacado_rad_dfad> >();
+ deallog.pop();
+#endif
+
+ deallog.push("Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >");
+ print_info<AD::NumberTraits<Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >,AD::NumberTypes::sacado_rad_dfad> >();
+ deallog.pop();
+
+#ifdef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ deallog.push("std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >");
+ print_info<AD::NumberTraits<std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >,AD::NumberTypes::sacado_rad_dfad> >();
+ deallog.pop();
+#endif
+
+ deallog.pop(); // NumberTraits
+
+ deallog << std::endl;
+
+ deallog.push("ADNumberTraits");
+
+ deallog.push("Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >");
+ print_info<AD::ADNumberTraits< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > > >();
+ deallog.pop();
+
+#ifdef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ deallog.push("std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >");
+ print_info<AD::ADNumberTraits<std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > > > >();
+ deallog.pop();
+#endif
+
+ deallog.push("Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >");
+ print_info<AD::ADNumberTraits< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > > >();
+ deallog.pop();
+
+#ifdef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
+ deallog.push("std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >");
+ print_info<AD::ADNumberTraits<std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > > > >();
+ deallog.pop();
+#endif
+
+ deallog.pop(); // ADNumberTraits
+
+ deallog << "OK" << std::endl;
+}
--- /dev/null
+
+DEAL:NumberTraits:float::type_code: 5
+DEAL:NumberTraits:float::is_taped: 0
+DEAL:NumberTraits:float::is_tapeless: 1
+DEAL:NumberTraits:float::is_real_valued: 1
+DEAL:NumberTraits:float::is_complex_valued: 0
+DEAL:NumberTraits:float::n_supported_derivative_levels: 2
+DEAL:NumberTraits:float::is_ad_number: 1
+DEAL:NumberTraits:float::is_sacado_number: 1
+DEAL:NumberTraits:float::is_taped_ad_number: 0
+DEAL:NumberTraits:float::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex<float>::type_code: 5
+DEAL:NumberTraits:std::complex<float>::is_taped: 0
+DEAL:NumberTraits:std::complex<float>::is_tapeless: 1
+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: 2
+DEAL:NumberTraits:std::complex<float>::is_ad_number: 1
+DEAL:NumberTraits:std::complex<float>::is_sacado_number: 1
+DEAL:NumberTraits:std::complex<float>::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex<float>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:double::type_code: 5
+DEAL:NumberTraits:double::is_taped: 0
+DEAL:NumberTraits:double::is_tapeless: 1
+DEAL:NumberTraits:double::is_real_valued: 1
+DEAL:NumberTraits:double::is_complex_valued: 0
+DEAL:NumberTraits:double::n_supported_derivative_levels: 2
+DEAL:NumberTraits:double::is_ad_number: 1
+DEAL:NumberTraits:double::is_sacado_number: 1
+DEAL:NumberTraits:double::is_taped_ad_number: 0
+DEAL:NumberTraits:double::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex<double>::type_code: 5
+DEAL:NumberTraits:std::complex<double>::is_taped: 0
+DEAL:NumberTraits:std::complex<double>::is_tapeless: 1
+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: 2
+DEAL:NumberTraits:std::complex<double>::is_ad_number: 1
+DEAL:NumberTraits:std::complex<double>::is_sacado_number: 1
+DEAL:NumberTraits:std::complex<double>::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex<double>::is_tapeless_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::type_code: 5
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_taped: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_tapeless: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_real_valued: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_complex_valued: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::n_supported_derivative_levels: 2
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_sacado_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_taped_ad_number: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::type_code: 5
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_taped: 0
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_tapeless: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_real_valued: 0
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_complex_valued: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::n_supported_derivative_levels: 2
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_sacado_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_tapeless_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::type_code: 5
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_taped: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_tapeless: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_real_valued: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_complex_valued: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::n_supported_derivative_levels: 2
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_sacado_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_taped_ad_number: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_tapeless_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::type_code: 5
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_taped: 0
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_tapeless: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_real_valued: 0
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_complex_valued: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::n_supported_derivative_levels: 2
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_ad_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_sacado_number: 1
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_taped_ad_number: 0
+DEAL:NumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_tapeless_ad_number: 1
+DEAL::
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::type_code: 5
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_taped: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_tapeless: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_real_valued: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_complex_valued: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::n_supported_derivative_levels: 2
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_sacado_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::type_code: 5
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_taped: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_tapeless: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_real_valued: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_complex_valued: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::n_supported_derivative_levels: 2
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_sacado_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<float> > >::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::type_code: 5
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_taped: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_tapeless: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_real_valued: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_complex_valued: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::n_supported_derivative_levels: 2
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_sacado_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::type_code: 5
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_taped: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_tapeless: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_real_valued: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_complex_valued: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::n_supported_derivative_levels: 2
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_ad_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_sacado_number: 1
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:std::complex< Sacado::Rad::ADvar<Sacado::Fad::DFad<double> > >::is_tapeless_ad_number: 1
+DEAL::OK
--- /dev/null
+
+DEAL:NumberTraits:float::type_code: 5
+DEAL:NumberTraits:float::is_taped: 0
+DEAL:NumberTraits:float::is_tapeless: 1
+DEAL:NumberTraits:float::is_real_valued: 1
+DEAL:NumberTraits:float::is_complex_valued: 0
+DEAL:NumberTraits:float::n_supported_derivative_levels: 2
+DEAL:NumberTraits:float::is_ad_number: 1
+DEAL:NumberTraits:float::is_sacado_number: 1
+DEAL:NumberTraits:float::is_taped_ad_number: 0
+DEAL:NumberTraits:float::is_tapeless_ad_number: 1
+DEAL:NumberTraits:double::type_code: 5
+DEAL:NumberTraits:double::is_taped: 0
+DEAL:NumberTraits:double::is_tapeless: 1
+DEAL:NumberTraits:double::is_real_valued: 1
+DEAL:NumberTraits:double::is_complex_valued: 0
+DEAL:NumberTraits:double::n_supported_derivative_levels: 2
+DEAL:NumberTraits:double::is_ad_number: 1
+DEAL:NumberTraits:double::is_sacado_number: 1
+DEAL:NumberTraits:double::is_taped_ad_number: 0
+DEAL:NumberTraits:double::is_tapeless_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::type_code: 5
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_taped: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_tapeless: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_real_valued: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_complex_valued: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::n_supported_derivative_levels: 2
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_sacado_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_taped_ad_number: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_tapeless_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::type_code: 5
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_taped: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_tapeless: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_real_valued: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_complex_valued: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::n_supported_derivative_levels: 2
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_ad_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_sacado_number: 1
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_taped_ad_number: 0
+DEAL:NumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_tapeless_ad_number: 1
+DEAL::
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::type_code: 5
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_taped: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_tapeless: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_real_valued: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_complex_valued: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::n_supported_derivative_levels: 2
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_sacado_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<float> >::is_tapeless_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::type_code: 5
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_taped: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_tapeless: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_real_valued: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_complex_valued: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::n_supported_derivative_levels: 2
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_ad_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_sacado_number: 1
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_taped_ad_number: 0
+DEAL:ADNumberTraits:Sacado::Rad::ADvar<Sacado::Fad::DFad<double> >::is_tapeless_ad_number: 1
+DEAL::OK
--- /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 at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+// Test that all of the nested Sacado number extractors return the correct information
+
+#include "../tests.h"
+#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>
+
+using namespace dealii;
+namespace AD = Differentiation::AD;
+
+template <typename Number>
+Number func(const Number &a, const Number &b, const Number &c)
+{
+ const Number r = c*std::log(b+1.)/std::sin(a);
+ return r;
+}
+
+template <typename Number>
+void print(const Number &r, const Number &drda, const Number &drdb,
+ const Number &d2rda2, const Number &d2rdb2,
+ const Number &d2rdadb, const Number &d2rdbda)
+{
+ deallog
+ << " r = " << r
+ << std::endl
+ << " dr/da = " << drda
+ << std::endl
+ << " dr/db = " << drdb
+ << std::endl
+ << "d^2r/da^2 = " << d2rda2
+ << std::endl
+ << "d^2r/db^2 = " << d2rdb2
+ << std::endl
+ << "d^2r/dadb = " << d2rdadb
+ << std::endl
+ << "d^2r/dbda = " << d2rdbda
+ << std::endl;
+}
+
+int main ()
+{
+ initlog();
+
+ // Values of function arguments
+ const double a = M_PI/4;
+ const double b = 2.0;
+ const double c = 3.0;
+
+ // Number of independent variables
+ const int num_deriv = 2;
+
+ // Fad objects
+ Sacado::Fad::DFad< Sacado::Fad::DFad<double> > afad(num_deriv, 0, a);
+ Sacado::Fad::DFad< Sacado::Fad::DFad<double> > bfad(num_deriv, 1, b);
+ Sacado::Fad::DFad< Sacado::Fad::DFad<double> > cfad = c;
+
+ afad.val() = Sacado::Fad::DFad<double>(num_deriv, 0, a);
+ bfad.val() = Sacado::Fad::DFad<double>(num_deriv, 1, b);
+
+ // AD typedefs
+ typedef Sacado::Fad::DFad< Sacado::Fad::DFad<double> > ADNumberType;
+ typedef typename ADNumberType::value_type ADDerivativeType;
+ typedef typename ADNumberType::scalar_type ADScalarType; // == double
+
+ // Compute function and derivative with AD
+ const ADNumberType rfad = func(afad, bfad, cfad);
+
+ deallog.push("Native");
+ {
+ // Extract value and derivatives
+ const double r = rfad.val().val(); // r
+ const double drda = rfad.dx(0).val(); // dr/da
+ const double drdb = rfad.dx(1).val(); // dr/db
+ const double d2rda2 = rfad.dx(0).dx(0); // d^2r/da^2
+ const double d2rdadb = rfad.dx(0).dx(1); // d^2r/dadb
+ const double d2rdbda = rfad.dx(1).dx(0); // d^2r/dbda
+ const double d2rdb2 = rfad.dx(1).dx(1); // d^2/db^2
+
+ print(r,drda,drdb,
+ d2rda2,d2rdb2,
+ d2rdadb,d2rdbda);
+ }
+ deallog.pop();
+
+ deallog.push("Extracted");
+ {
+ // Extract value and derivatives
+ const ADScalarType r = AD::internal::ExtractData<ADNumberType>::value(rfad); // r
+ const ADDerivativeType drda_ad = AD::internal::ExtractData<ADNumberType>::directional_derivative(rfad,0);
+ const ADDerivativeType drdb_ad = AD::internal::ExtractData<ADNumberType>::directional_derivative(rfad,1);
+ const ADScalarType drda = AD::internal::ExtractData<ADDerivativeType>::value(drda_ad); // dr/da
+ const ADScalarType drdb = AD::internal::ExtractData<ADDerivativeType>::value(drdb_ad); // dr/db
+ const ADScalarType d2rda2 = AD::internal::ExtractData<ADDerivativeType>::directional_derivative(drda_ad,0); // d^2r/da^2
+ const ADScalarType d2rdadb = AD::internal::ExtractData<ADDerivativeType>::directional_derivative(drda_ad,1); // d^2r/dadb
+ const ADScalarType d2rdbda = AD::internal::ExtractData<ADDerivativeType>::directional_derivative(drdb_ad,0); // d^2r/dbda
+ const ADScalarType d2rdb2 = AD::internal::ExtractData<ADDerivativeType>::directional_derivative(drdb_ad,1); // d^2/db^2
+
+ print(r,drda,drdb,
+ d2rda2,d2rdb2,
+ d2rdadb,d2rdbda);
+ }
+ deallog.pop();
+
+ deallog << "OK" << std::endl;
+}
--- /dev/null
+
+DEAL:Native:: r = 4.66102
+DEAL:Native:: dr/da = -4.66102
+DEAL:Native:: dr/db = 1.41421
+DEAL:Native::d^2r/da^2 = 13.9831
+DEAL:Native::d^2r/db^2 = -0.471405
+DEAL:Native::d^2r/dadb = -1.41421
+DEAL:Native::d^2r/dbda = -1.41421
+DEAL:Extracted:: r = 4.66102
+DEAL:Extracted:: dr/da = -4.66102
+DEAL:Extracted:: dr/db = 1.41421
+DEAL:Extracted::d^2r/da^2 = 13.9831
+DEAL:Extracted::d^2r/db^2 = -0.471405
+DEAL:Extracted::d^2r/dadb = -1.41421
+DEAL:Extracted::d^2r/dbda = -1.41421
+DEAL::OK