44 #ifndef ROL_PROJECTEDPRECONDITIONER_H 45 #define ROL_PROJECTEDPRECONDITIONER_H 59 const Teuchos::RCP<Objective<Real> >
obj_;
60 const Teuchos::RCP<BoundConstraint<Real> >
con_;
61 const Teuchos::RCP<const Vector<Real> >
x_;
62 const Teuchos::RCP<const Vector<Real> >
g_;
63 Teuchos::RCP<Vector<Real> >
v_;
65 const Teuchos::RCP<Secant<Real> >
secant_;
77 : obj_(obj), con_(con), x_(x), g_(g), secant_(Teuchos::null), eps_(0.0) {
78 if ( con_->isActivated() ) {
88 const Teuchos::RCP<
Vector<Real> > &g,
bool useSecant =
true )
89 : obj_(obj), con_(con), x_(x), g_(g), secant_(secant), eps_(0.0) {
90 if ( con_->isActivated() ) {
93 useSecant_ = useSecant;
108 if ( con_->isActivated() ) {
110 con_->pruneActive(*v_,*g_,*x_,eps_);
111 if ( useSecant_ && secant_ != Teuchos::null ) {
112 secant_->applyH(Hv,*v_,*x_);
115 obj_->precond(Hv,*v_,*x_,tol);
117 con_->pruneActive(Hv,*g_,*x_,eps_);
119 con_->pruneInactive(*v_,*g_,*x_,eps_);
123 if ( useSecant_ && secant_ != Teuchos::null ) {
124 secant_->applyH(Hv,v,*x_);
127 obj_->precond(Hv,v,*x_,tol);
const Teuchos::RCP< const Vector< Real > > x_
Provides the interface to evaluate objective functions.
void setData(Real eps=0.0)
virtual void plus(const Vector &x)=0
Compute , where .
Contains definitions of custom data types in ROL.
Defines the linear algebra or vector space interface.
const Teuchos::RCP< const Vector< Real > > g_
Provides interface for and implements limited-memory secant operators.
const Teuchos::RCP< Secant< Real > > secant_
Provides the interface to apply a linear operator.
Provides the interface to apply upper and lower bound constraints.
const Teuchos::RCP< Objective< Real > > obj_
ProjectedPreconditioner(const Teuchos::RCP< Secant< Real > > &secant, const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< BoundConstraint< Real > > &con, const Teuchos::RCP< Vector< Real > > &x, const Teuchos::RCP< Vector< Real > > &g, bool useSecant=true)
ProjectedPreconditioner(const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< BoundConstraint< Real > > &con, const Teuchos::RCP< Vector< Real > > &x, const Teuchos::RCP< Vector< Real > > &g)
void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply Hessian.
Teuchos::RCP< Vector< Real > > v_
const Teuchos::RCP< BoundConstraint< Real > > con_