57 #include "ROL_ParameterList.hpp"
60 #include "Teuchos_GlobalMPISession.hpp"
68 int main(
int argc,
char **argv)
70 Teuchos::GlobalMPISession mpiSession(&argc, &argv);
73 int iprint = argc - 1;
74 ROL::Ptr<std::ostream> outStream;
77 outStream = ROL::makePtrFromRef(std::cout);
79 outStream = ROL::makePtrFromRef(bhs);
92 std::string paramfile =
"parameters.xml";
93 auto parlist = ROL::getParametersFromXmlFile(paramfile);
99 ROL::Ptr<std::vector<RealT> > x_ptr = ROL::makePtr<std::vector<RealT>>(dim, 0.0);
101 for (
int i=0; i<dim; i++) {
108 algo.
run(x, obj,
true, *outStream);
111 ROL::Ptr<std::vector<RealT> > xtrue_ptr = ROL::makePtr<std::vector<RealT>>(dim, 0.0);
118 *outStream << std::scientific <<
"\n Absolute Error: " << abserr;
119 if ( abserr > sqrt(ROL_EPSILON<RealT>()) ) {
123 catch (std::logic_error err) {
124 *outStream << err.what() <<
"\n";
129 std::cout <<
"End Result: TEST FAILED\n";
131 std::cout <<
"End Result: TEST PASSED\n";