10 #ifndef ROL_INTERIORPOINTPENALTY_H
11 #define ROL_INTERIORPOINTPENALTY_H
15 #include "ROL_ParameterList.hpp"
41 const ROL::Ptr<const V>
lo_;
42 const ROL::Ptr<const V>
up_;
70 Real
apply(
const Real &x )
const {
71 return (x>0) ? std::log(x) : Real(0.0);
79 Real
apply(
const Real &x )
const {
80 return (x>0) ? 1.0/x : Real(0.0);
89 Real
apply(
const Real &x,
const Real &y )
const {
90 return (x>0) ? y/x : Real(0.0);
98 class Mask :
public Elementwise::BinaryFunction<Real> {
103 Real
apply(
const Real &x,
const Real &y )
const {
115 ROL::ParameterList &parlist ) :
116 obj_(obj),
bnd_(con),
lo_( con->getLowerBound() ),
up_( con->getUpperBound() ) {
122 ValueSet isBoundedBelow( ROL_NINF<Real>(), ValueSet::GREATER_THAN, one, zero );
123 ValueSet isBoundedAbove( ROL_INF<Real>(), ValueSet::LESS_THAN, one, zero );
128 maskL_->applyBinary(isBoundedBelow,*
lo_);
129 maskU_->applyBinary(isBoundedAbove,*
up_);
131 ROL::ParameterList &iplist = parlist.sublist(
"Step").sublist(
"Primal Dual Interior Point");
132 ROL::ParameterList &lblist = iplist.sublist(
"Barrier Objective");
135 kappaD_ = lblist.get(
"Linear Damping Coefficient",1.e-4);
136 mu_ = lblist.get(
"Initial Barrier Parameter",0.1);
141 g_ =
lo_->dual().clone();
180 obj_->update(x,flag,iter);
197 Elementwise::ReductionSum<Real> sum;
198 Elementwise::Multiply<Real> mult;
205 Real linearTerm = 0.0;
216 c_->applyBinary(mult,*
a_);
219 linearTerm +=
c_->reduce(sum);
222 a_->applyUnary(mlog);
235 c_->applyBinary(mult,*
b_);
239 linearTerm +=
c_->reduce(sum);
243 b_->applyUnary(mlog);
248 fval -=
mu_*(aval+bval);
265 obj_->gradient(*
g_,x,tol);
275 a_->applyUnary(mrec);
280 b_->applyUnary(mrec);
312 Elementwise::Multiply<Real> mult;
313 Elementwise::Power<Real> square(2.0);
315 obj_->hessVec(hv,v,x,tol);
319 a_->applyUnary(mrec);
321 a_->applyUnary(square);
323 a_->applyBinary(mult,v);
327 b_->applyUnary(mrec);
329 b_->applyUnary(square);
331 b_->applyBinary(mult,v);
348 #endif // ROL_INTERIORPOINTPENALTY_H
Provides the interface to evaluate objective functions.
Real value(const Vector< Real > &x, Real &tol)
Compute value.
void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update the interior point penalized objective.
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
ROL::Ptr< const Vector< Real > > getLowerMask(void) const
ROL::Ptr< const Vector< Real > > getUpperMask(void) const
InteriorPointPenalty(const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< BoundConstraint< Real > > &con, ROL::ParameterList &parlist)
Defines the linear algebra or vector space interface.
Real apply(const Real &x, const Real &y) const
Real apply(const Real &x) const
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
const ROL::Ptr< OBJ > getObjective(void)
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Compute action of Hessian on vector.
Provides the interface to evaluate the Interior Pointy log barrier penalty function with upper and lo...
const ROL::Ptr< BND > getBoundConstraint(void)
BoundConstraint< Real > BND
ROL::Ptr< Vector< Real > > getGradient(void) const
Real apply(const Real &x, const Real &y) const
const ROL::Ptr< const V > lo_
const ROL::Ptr< const V > up_
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
const ROL::Ptr< BND > bnd_
Provides the interface to apply upper and lower bound constraints.
int getNumberFunctionEvaluations(void) const
int getNumberGradientEvaluations(void) const
const ROL::Ptr< OBJ > obj_
virtual void set(const Vector &x)
Set where .
Elementwise::ValueSet< Real > ValueSet
Real getObjectiveValue(void) const
Real apply(const Real &x) const