44 #ifndef ROL_TYPEB_ALGORITHMFACTORY_H
45 #define ROL_TYPEB_ALGORITHMFACTORY_H
85 std::string retString;
94 default: retString =
"INVALID EAlgorithmB";
145 template<
typename Real>
152 = parlist.sublist(
"Step").sublist(
"Line Search").sublist(
"Descent Method").get(
"Type",
"Newton-Krylov");
153 if (desc==
"Newton-Krylov" || desc==
"Newton")
154 return makePtr<NewtonKrylovAlgorithm<Real>>(parlist,secant);
155 else if (desc==
"Quasi-Newton Method" || desc==
"Quasi-Newton") {
157 = parlist.sublist(
"Step").sublist(
"Line Search").sublist(
"Quasi-Newton").get(
"Method",
"L-Secant-B");
158 if (method ==
"L-Secant-B")
159 return makePtr<LSecantBAlgorithm<Real>>(parlist,secant);
161 return makePtr<QuasiNewtonAlgorithm<Real>>(parlist,secant);
164 return makePtr<GradientAlgorithm<Real>>(parlist);
170 = parlist.sublist(
"Step").sublist(
"Trust Region").get(
"Subproblem Model",
"Lin-More");
171 if (trmod==
"Kelley-Sachs")
172 return makePtr<KelleySachsAlgorithm<Real>>(parlist,secant);
173 else if (trmod==
"SPG")
174 return makePtr<TrustRegionSPGAlgorithm<Real>>(parlist,secant);
175 else if (trmod==
"Coleman-Li")
176 return makePtr<ColemanLiAlgorithm<Real>>(parlist,secant);
178 return makePtr<LinMoreAlgorithm<Real>>(parlist,secant);
184 default:
return nullPtr;
EAlgorithmB & operator--(EAlgorithmB &type)
EAlgorithmB
Enumeration of bound constrained algorithm types.
Contains definitions of custom data types in ROL.
std::string removeStringFormat(std::string s)
std::string EAlgorithmBToString(EAlgorithmB alg)
EAlgorithmB StringToEAlgorithmB(std::string s)
Ptr< Algorithm< Real > > AlgorithmFactory(ParameterList &parlist, const Ptr< Secant< Real >> &secant=nullPtr)
Provides interface for and implements limited-memory secant operators.
EAlgorithmB & operator++(EAlgorithmB &type)
int isValidAlgorithmB(EAlgorithmB alg)
Verifies validity of a AlgorithmB enum.