44#ifndef ROL_TYPEB_NEWTONKRYLOVALGORITHM_HPP
45#define ROL_TYPEB_NEWTONKRYLOVALGORITHM_HPP
58template<
typename Real>
88 const Ptr<Objective<Real>>
obj_;
89 const Ptr<BoundConstraint<Real>>
bnd_;
90 const Ptr<const Vector<Real>>
x_;
91 const Ptr<const Vector<Real>>
g_;
95 const Ptr<Vector<Real>>
v_;
123 const Ptr<Objective<Real>>
obj_;
124 const Ptr<BoundConstraint<Real>>
bnd_;
125 const Ptr<const Vector<Real>>
x_;
126 const Ptr<const Vector<Real>>
g_;
130 const Ptr<Vector<Real>>
v_;
165 std::ostream &outStream = std::cout);
180 std::ostream &outStream = std::cout)
override;
183 std::ostream &outStream = std::cout )
override;
192 std::ostream &outStream = std::cout )
override;
194 void writeHeader( std::ostream& os )
const override;
196 void writeName( std::ostream& os )
const override;
198 void writeOutput( std::ostream& os,
bool write_header =
false )
const override;
Provides the interface to apply upper and lower bound constraints.
Defines the general constraint operator interface.
Provides definitions for Krylov solvers.
Provides the interface to apply a linear operator.
Provides the interface to evaluate objective functions.
Provides interface for and implements limited-memory secant operators.
Provides an interface to run bound constrained optimization algorithms.
Ptr< PolyhedralProjection< Real > > proj_
const Ptr< AlgorithmState< Real > > state_
const Ptr< CombinedStatusTest< Real > > status_
HessianPNK(const Ptr< Objective< Real > > &obj, const Ptr< BoundConstraint< Real > > &bnd, const Ptr< const Vector< Real > > &x, const Ptr< const Vector< Real > > &g, Real eps, const Ptr< Secant< Real > > &secant, bool useSecant, const Ptr< Vector< Real > > &pwa)
const Ptr< BoundConstraint< Real > > bnd_
const Ptr< Secant< Real > > secant_
void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
const Ptr< const Vector< Real > > g_
const Ptr< Objective< Real > > obj_
const Ptr< Vector< Real > > v_
const Ptr< const Vector< Real > > x_
const Ptr< Secant< Real > > secant_
const Ptr< const Vector< Real > > x_
const Ptr< Objective< Real > > obj_
const Ptr< const Vector< Real > > g_
void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
const Ptr< Vector< Real > > v_
PrecondPNK(const Ptr< Objective< Real > > &obj, const Ptr< BoundConstraint< Real > > &bnd, const Ptr< const Vector< Real > > &x, const Ptr< const Vector< Real > > &g, Real eps, const Ptr< Secant< Real > > &secant, bool useSecant, const Ptr< Vector< Real > > &pwa)
void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
const Ptr< BoundConstraint< Real > > bnd_
Provides an interface to run the projected secant algorithm.
Ptr< Secant< Real > > secant_
Secant object (used for quasi-Newton)
Real alpha0_
Initial line search step size (default: 1.0)
void run(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &bnd, std::ostream &outStream=std::cout) override
Run algorithm on bound constrained problems (Type-B). This general interface supports the use of dual...
ESecant esec_
Secant type.
bool useSecantPrecond_
Whether or not to use a secant approximation to precondition inexact Newton.
void writeOutput(std::ostream &os, bool write_header=false) const override
Print iterate status.
int maxit_
Maximum number of line search steps (default: 20)
void parseParameterList(ParameterList &list)
std::string secantName_
Secant name.
int flagKrylov_
Termination flag for Krylov method (used for inexact Newton)
bool useralpha_
Flag to use user-defined initial step size (default: false)
NewtonKrylovAlgorithm(ParameterList &list, const Ptr< Secant< Real > > &secant=nullPtr)
Real c1_
Sufficient Decrease Parameter (default: 1e-4)
bool useSecantHessVec_
Whether or not to use to a secant approximation as the Hessian.
std::string krylovName_
Krylov name.
void writeName(std::ostream &os) const override
Print step name.
Real rhodec_
Backtracking rate (default: 0.5)
int iterKrylov_
Number of Krylov iterations (used for inexact Newton)
Ptr< Krylov< Real > > krylov_
Krylov solver object (used for inexact Newton)
void initialize(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &bnd, std::ostream &outStream=std::cout)
bool usePrevAlpha_
Flag to use previous step size as next initial step size (default: false)
void writeHeader(std::ostream &os) const override
Print iterate header.
Defines the linear algebra or vector space interface.
virtual void set(const Vector &x)
Set where .
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis,...
virtual void plus(const Vector &x)=0
Compute , where .