93int main(
int argc,
char* argv[] ) {
97 Teuchos::GlobalMPISession mpiSession(&argc, &argv);
100 auto outStream = makeStreamPtr( std::cout, argc > 1 );
103 RealT errtol = std::sqrt(ROL_EPSILON<RealT>());
111 auto xp = makePtr<std::vector<RealT>>(N);
112 auto x = makePtr<StdVector<RealT>>(xp);
118 RandomizeVector( *x );
119 RandomizeVector( *y );
121 auto result = 0.5*polar.
dot(*x,*y);
122 result += 0.5*polar.
dot(*y,*x);
124 auto x_dot_y = x->dot(*y);
125 errorFlag += ( std::abs( x_dot_y - result ) > errtol );
127 *outStream << std::setprecision(16) << x_dot_y << std::endl;
128 *outStream << std::setprecision(16) << result << std::endl;
136 catch (std::logic_error& err) {
137 *outStream << err.what() <<
"\n";
142 std::cout <<
"End Result: TEST FAILED\n";
144 std::cout <<
"End Result: TEST PASSED\n";