44 #ifndef ROL_TYPEB_ALGORITHMFACTORY_H 45 #define ROL_TYPEB_ALGORITHMFACTORY_H 83 std::string retString;
92 default: retString =
"INVALID EAlgorithmB";
143 template<
typename Real>
147 = parlist.sublist(
"Step").sublist(
"Line Search").sublist(
"Descent Method").get(
"Type",
"Newton-Krylov");
149 = parlist.sublist(
"Step").sublist(
"Trust Region").get(
"Subproblem Model",
"Lin-More");
152 if (desc==
"Newton-Krylov" || desc==
"Newton")
153 return makePtr<NewtonKrylovAlgorithm<Real>>(parlist);
154 else if (desc==
"Quasi-Newton Method")
155 return makePtr<QuasiNewtonAlgorithm<Real>>(parlist);
157 return makePtr<GradientAlgorithm<Real>>(parlist);
159 if (trmod==
"Kelley-Sachs")
160 return makePtr<KelleySachsAlgorithm<Real>>(parlist);
161 else if (trmod==
"SPG")
162 return makePtr<TrustRegionSPGAlgorithm<Real>>(parlist);
164 return makePtr<LinMoreAlgorithm<Real>>(parlist);
169 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)
EAlgorithmB & operator++(EAlgorithmB &type)
Ptr< Algorithm< Real > > AlgorithmFactory(ParameterList &parlist)
int isValidAlgorithmB(EAlgorithmB alg)
Verifies validity of a AlgorithmB enum.