ROL
|
Provides the interface to compute optimization steps with nonlinear CG. More...
#include <ROL_NonlinearCGStep.hpp>
Public Member Functions | |
NonlinearCGStep (ROL::ParameterList &parlist, const ROL::Ptr< NonlinearCG< Real > > &nlcg=ROL::nullPtr, const bool computeObj=true) | |
Constructor. More... | |
void | compute (Vector< Real > &s, const Vector< Real > &x, Objective< Real > &obj, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state) |
Compute step. More... | |
void | update (Vector< Real > &x, const Vector< Real > &s, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state) |
Update step, if successful. More... | |
std::string | printHeader (void) const |
Print iterate header. More... | |
std::string | printName (void) const |
Print step name. More... | |
std::string | print (AlgorithmState< Real > &algo_state, bool print_header=false) const |
Print iterate status. More... | |
Public Member Functions inherited from ROL::Step< Real > | |
virtual | ~Step () |
Step (void) | |
virtual void | initialize (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state) |
Initialize step with bound constraint. More... | |
virtual void | initialize (Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state) |
Initialize step with bound constraint. More... | |
virtual void | initialize (Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, Constraint< Real > &con, AlgorithmState< Real > &algo_state) |
Initialize step with equality constraint. More... | |
virtual void | initialize (Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, Constraint< Real > &con, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state) |
Initialize step with equality constraint. More... | |
virtual void | compute (Vector< Real > &s, const Vector< Real > &x, const Vector< Real > &l, Objective< Real > &obj, Constraint< Real > &con, AlgorithmState< Real > &algo_state) |
Compute step (equality constraints). More... | |
virtual void | update (Vector< Real > &x, Vector< Real > &l, const Vector< Real > &s, Objective< Real > &obj, Constraint< Real > &con, AlgorithmState< Real > &algo_state) |
Update step, if successful (equality constraints). More... | |
virtual void | compute (Vector< Real > &s, const Vector< Real > &x, const Vector< Real > &l, Objective< Real > &obj, Constraint< Real > &con, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state) |
Compute step (equality constraints). More... | |
virtual void | update (Vector< Real > &x, Vector< Real > &l, const Vector< Real > &s, Objective< Real > &obj, Constraint< Real > &con, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state) |
Update step, if successful (equality constraints). More... | |
const ROL::Ptr< const StepState< Real > > | getStepState (void) const |
Get state for step object. More... | |
void | reset (const Real searchSize=1.0) |
Get state for step object. More... | |
Private Attributes | |
ROL::Ptr< NonlinearCG< Real > > | nlcg_ |
NonlinearCG object (used for quasi-Newton) More... | |
ENonlinearCG | enlcg_ |
int | verbosity_ |
Verbosity setting. More... | |
const bool | computeObj_ |
std::string | ncgName_ |
Additional Inherited Members | |
Protected Member Functions inherited from ROL::Step< Real > | |
ROL::Ptr< StepState< Real > > | getState (void) |
Provides the interface to compute optimization steps with nonlinear CG.
Definition at line 60 of file ROL_NonlinearCGStep.hpp.
|
inline |
Constructor.
Constructor to build a NonlinearCGStep object with a user-defined nonlinear CG object. Algorithmic specifications are passed in through a ROL::ParameterList.
[in] | parlist | is a parameter list containing algorithmic specifications |
[in] | nlcg | is a user-defined NonlinearCG object |
Definition at line 85 of file ROL_NonlinearCGStep.hpp.
References ROL::NonlinearCGStep< Real >::enlcg_, ROL::NonlinearCGStep< Real >::ncgName_, ROL::NonlinearCGStep< Real >::nlcg_, ROL::StringToENonlinearCG(), and ROL::NonlinearCGStep< Real >::verbosity_.
|
inlinevirtual |
Compute step.
Reimplemented from ROL::Step< Real >.
Definition at line 106 of file ROL_NonlinearCGStep.hpp.
References ROL::Step< Real >::getState(), ROL::NonlinearCGStep< Real >::nlcg_, and ROL::Vector< Real >::scale().
|
inlinevirtual |
Update step, if successful.
Reimplemented from ROL::Step< Real >.
Definition at line 117 of file ROL_NonlinearCGStep.hpp.
References ROL::NonlinearCGStep< Real >::computeObj_, ROL::Step< Real >::getState(), ROL::AlgorithmState< Real >::gnorm, ROL::Objective< Real >::gradient(), ROL::AlgorithmState< Real >::iter, ROL::AlgorithmState< Real >::iterateVec, ROL::AlgorithmState< Real >::nfval, ROL::AlgorithmState< Real >::ngrad, ROL::Vector< Real >::norm(), ROL::Vector< Real >::plus(), ROL::AlgorithmState< Real >::snorm, ROL::Objective< Real >::update(), ROL::Objective< Real >::value(), and ROL::AlgorithmState< Real >::value.
|
inlinevirtual |
Print iterate header.
Reimplemented from ROL::Step< Real >.
Definition at line 142 of file ROL_NonlinearCGStep.hpp.
References ROL::DESCENT_NONLINEARCG, ROL::EDescentToString(), and ROL::NonlinearCGStep< Real >::verbosity_.
Referenced by ROL::NonlinearCGStep< Real >::print().
|
inlinevirtual |
Print step name.
Reimplemented from ROL::Step< Real >.
Definition at line 168 of file ROL_NonlinearCGStep.hpp.
References ROL::DESCENT_NONLINEARCG, ROL::EDescentToString(), and ROL::NonlinearCGStep< Real >::ncgName_.
Referenced by ROL::NonlinearCGStep< Real >::print().
|
inlinevirtual |
Print iterate status.
Reimplemented from ROL::Step< Real >.
Definition at line 174 of file ROL_NonlinearCGStep.hpp.
References ROL::AlgorithmState< Real >::gnorm, ROL::AlgorithmState< Real >::iter, ROL::AlgorithmState< Real >::nfval, ROL::AlgorithmState< Real >::ngrad, ROL::NonlinearCGStep< Real >::printHeader(), ROL::NonlinearCGStep< Real >::printName(), ROL::AlgorithmState< Real >::snorm, and ROL::AlgorithmState< Real >::value.
|
private |
NonlinearCG object (used for quasi-Newton)
Definition at line 63 of file ROL_NonlinearCGStep.hpp.
Referenced by ROL::NonlinearCGStep< Real >::compute(), and ROL::NonlinearCGStep< Real >::NonlinearCGStep().
|
private |
Definition at line 64 of file ROL_NonlinearCGStep.hpp.
Referenced by ROL::NonlinearCGStep< Real >::NonlinearCGStep().
|
private |
Verbosity setting.
Definition at line 65 of file ROL_NonlinearCGStep.hpp.
Referenced by ROL::NonlinearCGStep< Real >::NonlinearCGStep(), and ROL::NonlinearCGStep< Real >::printHeader().
|
private |
Definition at line 66 of file ROL_NonlinearCGStep.hpp.
Referenced by ROL::NonlinearCGStep< Real >::update().
|
private |
Definition at line 68 of file ROL_NonlinearCGStep.hpp.
Referenced by ROL::NonlinearCGStep< Real >::NonlinearCGStep(), and ROL::NonlinearCGStep< Real >::printName().