10 #ifndef ROL_SECANTFACTORY_H
11 #define ROL_SECANTFACTORY_H
15 #include "ROL_ParameterList.hpp"
16 #include "ROL_Ptr.hpp"
29 case SECANT_LDFP:
return ROL::makePtr<lDFP<Real>>(L);
30 case SECANT_LSR1:
return ROL::makePtr<lSR1<Real>>(L);
32 default:
return ROL::nullPtr;
39 parlist.sublist(
"General").sublist(
"Secant").get(
"Type",
"Limited-Memory BFGS") );
40 int L = parlist.sublist(
"General").sublist(
"Secant").get(
"Maximum Storage",10);
41 int BB = parlist.sublist(
"General").sublist(
"Secant").get(
"Barzilai-Borwein",1);
42 bool uds = parlist.sublist(
"General").sublist(
"Secant").get(
"Use Default Scaling",
true);
43 Real s = parlist.sublist(
"General").sublist(
"Secant").get(
"Initial Hessian Scale",1.0);
45 case SECANT_LBFGS:
return ROL::makePtr<lBFGS<Real>>(L,uds,s);
46 case SECANT_LDFP:
return ROL::makePtr<lDFP<Real>>(L,uds,s);
47 case SECANT_LSR1:
return ROL::makePtr<lSR1<Real>>(L,uds,s,mode);
49 default:
return ROL::nullPtr;
ROL::Ptr< Secant< Real > > SecantFactory(ROL::ParameterList &parlist, ESecantMode mode=SECANTMODE_BOTH)
Contains definitions of custom data types in ROL.
ESecant StringToESecant(std::string s)
ESecant
Enumeration of secant update algorithms.
ROL::Ptr< Secant< Real > > getSecant(ESecant esec=SECANT_LBFGS, int L=10, int BBtype=1)