45 #ifndef ROL_MERITFUNCTION_H
46 #define ROL_MERITFUNCTION_H
49 #include "ROL_InequalityConstraint.hpp"
64 namespace InteriorPoint {
73 typedef InequalityConstraint<Real>
INCON;
75 typedef ROL::ParameterList
PLIST;
119 static const Elementwise::Logarithm<Real>
LOG_;
120 static const Elementwise::Reciprocal<Real>
RECIP_;
121 static const Elementwise::ReductionSum<Real>
SUM_;
127 ROL::Ptr<EQCON> &eqcon,
128 ROL::Ptr<INCON> &incon,
135 const PV &xpv =
dynamic_cast<const PV&
>(x);
142 PLIST &iplist = parlist.sublist(
"Step").sublist(
"Primal-Dual Interior Point");
143 mu_ = iplist.get(
"Initial Slack Penalty");
144 nu_ = iplist.get(
"Initial Constraint Norm Penalty");
151 const PV &xpv =
dynamic_cast<const PV&
>(x);
161 val +=
mu_*logs_->reduce(
SUM_);
177 const PV &xpv =
dynamic_cast<const PV&
>(x);
181 const PV &dpv =
dynamic_cast<const PV&
>(d);
182 ROL::Ptr<V> dopt = dpv.
get(
OPT);
183 ROL::Ptr<V> dslack = dpv.
get(
SLACK);
188 ce_->applyJacobian(*
jced_,*dopt,*xopt,tol);
189 ci_->applyJacobian(*
jcid_,*dopt,*xopt,tol);
195 Real ddopt =
gopt_->dot(*dopt);
197 Real ddslack =
sfun_->dot(*dslack);
203 Real ddsn =
slack_->dot(*dslack)/slack->norm();
205 return ddopt -
mu_*ddslack +
nu_*(ddce + ddci + ddsn);
222 #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