From: Matthias Maier Date: Thu, 7 May 2020 02:23:07 +0000 (-0500) Subject: rol/vector_adaptor_02: port to Trilinos 12.18.1 X-Git-Tag: v9.2.0-rc1~107^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4affb75c934852fe4a3a37223fe517fc46d855b;p=dealii.git rol/vector_adaptor_02: port to Trilinos 12.18.1 --- diff --git a/tests/rol/vector_adaptor_02.cc b/tests/rol/vector_adaptor_02.cc index 7d4c797595..382d65cc3b 100644 --- a/tests/rol/vector_adaptor_02.cc +++ b/tests/rol/vector_adaptor_02.cc @@ -87,12 +87,28 @@ test(const double x, const double y) Rol::VectorAdaptor x_rol(x_rcp); Teuchos::ParameterList parlist; - // Set parameters. - parlist.sublist("Secant").set("Use as Preconditioner", false); + +#if DEAL_II_TRILINOS_VERSION_GTE(12, 18, 0) + // Define algorithm in three intuitive and easy steps. + // + // For the future developer: if this ever fails again, copy the relevant + // changes out of packages/rol/example/rosenbrock/example_01.cpp found in + // the Trilinos git repository - the package documentation might be + // outdated. + ROL::Ptr> step = + ROL::makePtr>(parlist); + ROL::Ptr> status = + ROL::makePtr>(parlist); + ROL::Algorithm algo(step, status, false); +#else // Define algorithm. ROL::Algorithm algo("Line Search", parlist); +#endif + + // Set parameters. + parlist.sublist("Secant").set("Use as Preconditioner", false); - // Run Algorithm + // Run Algorithm. algo.run(x_rol, quad_objective, true, *outStream); Teuchos::RCP xg = x_rol.getVector();