30#include "Teuchos_UnitTestHarness.hpp"
31#include "Teuchos_UnitTestRepository.hpp"
32#include "Teuchos_GlobalMPISession.hpp"
33#include "Teuchos_TestingHelpers.hpp"
44 typedef typename ad_type::value_type value_type;
50 x.fastAccessDx(
i) = 2.0;
52 ad_type
y =
x > 0 ? -
x :
x;
54 TEST_EQUALITY_CONST(
y.val(), -1.5 );
56 TEST_EQUALITY_CONST(
y.dx(
i), -2.0 );
62TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Ternary, Ternary,
Fad_DFadType )
63TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Ternary, Ternary,
Fad_SLFadType )
64TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Ternary, Ternary,
Fad_SFadType )
69TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Ternary, Ternary,
ELRFad_DFadType )
71TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Ternary, Ternary,
ELRFad_SFadType )
87#if defined(SACADO_ENABLE_NEW_DESIGN) && !defined(SACADO_NEW_FAD_DESIGN_IS_DEFAULT)
91TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Ternary, Ternary, ExpFad_DFadType )
92TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Ternary, Ternary, ExpFad_SLFadType )
93TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( Ternary, Ternary, ExpFad_SFadType )
96int main(
int argc,
char* argv[] ) {
97 Teuchos::GlobalMPISession mpiSession(&argc, &argv);
98 return Teuchos::UnitTestRepository::runUnitTestsFromMain(argc, argv);
Sacado::Fad::SLFad< double, global_fad_size > Fad_SLFadType
TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL(Ternary, Ternary, AD)
Sacado::Fad::DFad< double > Fad_DFadType
Sacado::Fad::SFad< double, global_fad_size > Fad_SFadType
const int global_fad_size
Forward-mode AD class templated on the storage for the derivative array.