44 #ifndef ROL_MOREAUYOSIDAPENALTY_H 45 #define ROL_MOREAUYOSIDAPENALTY_H 51 #include "Teuchos_RCP.hpp" 67 const Teuchos::RCP<Objective<Real> >
obj_;
68 const Teuchos::RCP<BoundConstraint<Real> >
con_;
70 Teuchos::RCP<Vector<Real> >
g_;
71 Teuchos::RCP<Vector<Real> >
l_;
72 Teuchos::RCP<Vector<Real> >
u_;
73 Teuchos::RCP<Vector<Real> >
l1_;
74 Teuchos::RCP<Vector<Real> >
u1_;
75 Teuchos::RCP<Vector<Real> >
dl1_;
76 Teuchos::RCP<Vector<Real> >
du1_;
77 Teuchos::RCP<Vector<Real> >
xlam_;
78 Teuchos::RCP<Vector<Real> >
v_;
79 Teuchos::RCP<Vector<Real> >
dv_;
80 Teuchos::RCP<Vector<Real> >
dv2_;
81 Teuchos::RCP<Vector<Real> >
lam_;
82 Teuchos::RCP<Vector<Real> >
tmp_;
91 if (
con_->isActivated() ) {
153 con_->setVectorToLowerBound(*
l_);
154 con_->setVectorToUpperBound(*
u_);
163 if (
con_->isActivated() ) {
202 obj_->update(x,flag,iter);
203 con_->update(x,flag,iter);
220 if (
con_->isActivated() ) {
236 obj_->gradient(*
g_,x,tol);
240 if (
con_->isActivated() ) {
257 obj_->hessVec(hv,v,x,tol);
259 if (
con_->isActivated() ) {
267 dv_->set(
v_->dual());
278 dv_->set(
v_->dual());
291 obj_->setParameter(param);
Provides the interface to evaluate objective functions.
const Teuchos::RCP< Objective< Real > > obj_
Teuchos::RCP< Vector< Real > > g_
void setParameter(const std::vector< Real > ¶m)
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
Teuchos::RCP< Vector< Real > > dv_
int getNumberGradientEvaluations(void)
Teuchos::RCP< Vector< Real > > xlam_
Contains definitions of custom data types in ROL.
Teuchos::RCP< Vector< Real > > v_
Real value(const Vector< Real > &x, Real &tol)
Compute value.
virtual Teuchos::RCP< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
void updateMultipliers(Real mu, const ROL::Vector< Real > &x)
Defines the linear algebra or vector space interface.
Teuchos::RCP< Vector< Real > > dv2_
Teuchos::RCP< Vector< Real > > tmp_
void computePenalty(const Vector< Real > &x)
Teuchos::RCP< Vector< Real > > u_
Teuchos::RCP< Vector< Real > > l_
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
Teuchos::RCP< Vector< Real > > du1_
Teuchos::RCP< Vector< Real > > getGradient(void) const
MoreauYosidaPenalty(const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< BoundConstraint< Real > > &con, const ROL::Vector< Real > &x, const Real mu=1.0)
Provides the interface to evaluate the Moreau-Yosida penalty function.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Provides the interface to apply upper and lower bound constraints.
const Teuchos::RCP< BoundConstraint< Real > > con_
int getNumberFunctionEvaluations(void)
Teuchos::RCP< Vector< Real > > lam_
virtual void setParameter(const std::vector< Real > ¶m)
void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update Moreau-Yosida penalty function.
Teuchos::RCP< Vector< Real > > u1_
virtual void set(const Vector &x)
Set where .
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply Hessian approximation to vector.
Real getObjectiveValue(void) const
Teuchos::RCP< Vector< Real > > dl1_
Teuchos::RCP< Vector< Real > > l1_