59int main(
int argc,
char* argv[] ) {
63 Teuchos::GlobalMPISession mpiSession(&argc, &argv);
66 auto outStream = makeStreamPtr( std::cout, argc > 1 );
69 RealT errtol = std::sqrt(ROL_EPSILON<RealT>());
77 auto xp = makePtr<std::vector<RealT>>(N);
78 auto x = makePtr<StdVector<RealT>>(xp);
84 RandomizeVector( *x );
85 RandomizeVector( *y );
87 auto result = 0.5*polar.
dot(*x,*y);
88 result += 0.5*polar.
dot(*y,*x);
90 auto x_dot_y = x->dot(*y);
91 errorFlag += ( std::abs( x_dot_y - result ) > errtol );
93 *outStream << std::setprecision(16) << x_dot_y << std::endl;
94 *outStream << std::setprecision(16) << result << std::endl;
102 catch (std::logic_error& err) {
103 *outStream << err.what() <<
"\n";
108 std::cout <<
"End Result: TEST FAILED\n";
110 std::cout <<
"End Result: TEST PASSED\n";