From 249ed3e0e4634d879670a51ccd1ed1afb2f2b74c Mon Sep 17 00:00:00 2001 From: jdsteinman Date: Fri, 7 Jun 2024 13:49:05 -0600 Subject: [PATCH] Update Rosenbrock tutorial to ROL 2. --- packages/rol/tutorial/example_unc.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/rol/tutorial/example_unc.cpp b/packages/rol/tutorial/example_unc.cpp index 49bb07c9341d..ab3c56567cab 100644 --- a/packages/rol/tutorial/example_unc.cpp +++ b/packages/rol/tutorial/example_unc.cpp @@ -47,7 +47,7 @@ #define OPTIMIZATION_PROBLEM_REFACTOR -#include "ROL_OptimizationSolver.hpp" +#include "ROL_Solver.hpp" #include "ROL_RandomVector.hpp" #include "ROL_StdObjective.hpp" @@ -107,6 +107,7 @@ int main(int argc, char *argv[]) { try { ROL::ParameterList parlist; + parlist.sublist("General").set("Output Level", 1); parlist.sublist("General").sublist("Secant").set("Use as Hessian",false); parlist.sublist("Step").set("Type","Trust Region"); parlist.sublist("Step").sublist("Trust Region").set("Subproblem Solver","Truncated CG"); @@ -118,10 +119,10 @@ int main(int argc, char *argv[]) { ROL::Ptr > obj = ROL::makePtr>(); - ROL::OptimizationProblem problem( obj, x ); - problem.check(*outStream); + ROL::Ptr > problem = ROL::makePtr>( obj, x ); + problem->check(true, *outStream); - ROL::OptimizationSolver solver( problem, parlist ); + ROL::Solver solver( problem, parlist ); solver.solve(*outStream); *outStream << "x_opt = [" << (*x_ptr)[0] << ", " << (*x_ptr)[1] << "]" << std::endl; @@ -138,8 +139,6 @@ int main(int argc, char *argv[]) { return 0; - - return 0; }