30 #include "Teuchos_UnitTestHarness.hpp"
31 #include "Teuchos_UnitTestRepository.hpp"
32 #include "Teuchos_GlobalMPISession.hpp"
33 #include "Teuchos_TestingHelpers.hpp"
48 for (
int i=0; i<
N; ++i)
49 x.fastAccessDx(i) = 2.0;
52 TEST_EQUALITY( y.val(), z.val() );
53 for (
int i=0; i<
N; ++i)
54 TEST_EQUALITY( y.dx(i), z.dx(i) );
59 TEST_EQUALITY_CONST( y.val(), 0.0 );
60 for (
int i=0; i<
N; ++i)
61 TEST_EQUALITY_CONST( y.dx(i), 0.0 );
67 TEST_EQUALITY( b,
c );
73 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( SafeSqrt, SafeSqrt,
Fad_DFadType )
74 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( SafeSqrt, SafeSqrt,
Fad_SLFadType )
75 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( SafeSqrt, SafeSqrt,
Fad_SFadType )
80 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( SafeSqrt, SafeSqrt,
ELRFad_DFadType )
82 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( SafeSqrt, SafeSqrt,
ELRFad_SFadType )
98 #if defined(SACADO_ENABLE_NEW_DESIGN) && !defined(SACADO_NEW_FAD_DESIGN_IS_DEFAULT)
102 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( SafeSqrt, SafeSqrt, ExpFad_DFadType )
103 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( SafeSqrt, SafeSqrt, ExpFad_SLFadType )
104 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( SafeSqrt, SafeSqrt, ExpFad_SFadType )
107 int main(
int argc,
char* argv[] ) {
108 Teuchos::GlobalMPISession mpiSession(&argc, &argv);
109 return Teuchos::UnitTestRepository::runUnitTestsFromMain(argc, argv);
expr expr1 expr1 expr1 c expr2 expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 c expr2 expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 c *expr2 expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 c expr2 expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr2 expr1 expr2 expr1 expr1 expr1 c
Sacado::Fad::SLFad< double, N > Fad_SLFadType
int main(int argc, char *argv[])
Sacado::Fad::SFad< double, N > Fad_SFadType
Sacado::Fad::DFad< double > Fad_DFadType
TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL(SafeSqrt, SafeSqrt, AD)
Forward-mode AD class templated on the storage for the derivative array.
GeneralFad< DynamicStorage< T > > DFad
GeneralFad< StaticFixedStorage< T, Num > > SFad
GeneralFad< StaticStorage< T, Num > > SLFad
KOKKOS_INLINE_FUNCTION T safe_sqrt(const T &x)