113 std::string stepType = parlist.sublist(
"Step").get(
"Type",
"Trust Region");
118 std::string desc = parlist.sublist(
"Step").sublist(
"Line Search").sublist(
"Descent Method").get(
"Type",
"Newton-Krylov");
119 if (desc==
"Newton-Krylov" || desc==
"Newton")
120 return makePtr<NewtonKrylovAlgorithm<Real>>(parlist,secant);
121 else if (desc==
"Quasi-Newton Method" || desc==
"Quasi-Newton") {
122 std::string method = parlist.sublist(
"Step").sublist(
"Line Search").sublist(
"Quasi-Newton").get(
"Method",
"L-Secant-B");
123 if (method ==
"L-Secant-B")
124 return makePtr<LSecantBAlgorithm<Real>>(parlist,secant);
126 return makePtr<QuasiNewtonAlgorithm<Real>>(parlist,secant);
129 return makePtr<GradientAlgorithm<Real>>(parlist);
134 std::string trmod = parlist.sublist(
"Step").sublist(
"Trust Region").get(
"Subproblem Model",
"Lin-More");
135 if (trmod==
"Kelley-Sachs")
136 return makePtr<KelleySachsAlgorithm<Real>>(parlist,secant);
137 else if (trmod==
"SPG")
138 return makePtr<TrustRegionSPGAlgorithm<Real>>(parlist,secant);
139 else if (trmod==
"Coleman-Li")
140 return makePtr<ColemanLiAlgorithm<Real>>(parlist,secant);
142 return makePtr<LinMoreAlgorithm<Real>>(parlist,secant);
148 default:
return nullPtr;