10 #ifndef ROL_MERITFUNCTION_H
11 #define ROL_MERITFUNCTION_H
14 #include "ROL_InequalityConstraint.hpp"
29 namespace InteriorPoint {
38 typedef InequalityConstraint<Real>
INCON;
40 typedef ROL::ParameterList
PLIST;
84 static const Elementwise::Logarithm<Real>
LOG_;
85 static const Elementwise::Reciprocal<Real>
RECIP_;
86 static const Elementwise::ReductionSum<Real>
SUM_;
92 ROL::Ptr<EQCON> &eqcon,
93 ROL::Ptr<INCON> &incon,
100 const PV &xpv =
dynamic_cast<const PV&
>(x);
107 PLIST &iplist = parlist.sublist(
"Step").sublist(
"Primal-Dual Interior Point");
108 mu_ = iplist.get(
"Initial Slack Penalty");
109 nu_ = iplist.get(
"Initial Constraint Norm Penalty");
116 const PV &xpv =
dynamic_cast<const PV&
>(x);
126 val +=
mu_*logs_->reduce(
SUM_);
142 const PV &xpv =
dynamic_cast<const PV&
>(x);
146 const PV &dpv =
dynamic_cast<const PV&
>(d);
147 ROL::Ptr<V> dopt = dpv.
get(
OPT);
148 ROL::Ptr<V> dslack = dpv.
get(
SLACK);
153 ce_->applyJacobian(*
jced_,*dopt,*xopt,tol);
154 ci_->applyJacobian(*
jcid_,*dopt,*xopt,tol);
160 Real ddopt =
gopt_->dot(*dopt);
162 Real ddslack =
sfun_->dot(*dslack);
168 Real ddsn =
slack_->dot(*dslack)/slack->norm();
170 return ddopt -
mu_*ddslack +
nu_*(ddce + ddci + ddsn);
187 #endif // ROL_MERITFUNCTION_H
Provides the interface to evaluate objective functions.
ROL::Ptr< const Vector< Real > > get(size_type i) const
Defines the linear algebra of vector space on a generic partitioned vector.
static const Elementwise::Reciprocal< Real > RECIP_
Defines the linear algebra or vector space interface.
static const Elementwise::Logarithm< Real > LOG_
static const Elementwise::ReductionSum< Real > SUM_
std::vector< PV >::size_type size_type
Real dirDeriv(const V &x, const V &d, Real tol)
MeritFunction(ROL::Ptr< OBJ > &obj, ROL::Ptr< EQCON > &eqcon, ROL::Ptr< INCON > &incon, const V &x, const V &eqmult, const V &inmult, PLIST &parlist)
PartitionedVector< Real > PV
Real value(const V &x, Real &tol)
Compute value.
void updateBarrier(Real mu)
Defines the general constraint operator interface.
InequalityConstraint< Real > INCON