44 #ifndef ROL_PRIMALDUALINTERIORPOINTOPERATOR_H
45 #define ROL_PRIMALDUALINTERIORPOINTOPERATOR_H
78 const V &x, ROL::Ptr<V> & scratch,
82 const PV &x_pv =
dynamic_cast<const PV&
>(x);
90 const PV &x_pv =
dynamic_cast<const PV&
>(x);
95 obj_->update(*
x_,flag,
true);
96 con_->update(*
x_,flag,
true);
103 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
104 const PV &v_pv =
dynamic_cast<const PV&
>(v);
107 ROL::Ptr<V> Hvx = Hv_pv.
get(
OPT);
111 ROL::Ptr<const V> vx = v_pv.
get(
OPT);
112 ROL::Ptr<const V> vl = v_pv.
get(
EQUAL);
114 obj_->hessVec(*jvx,*vx,*
x_,tol);
117 con_->applyAdjointJacobian(*
scratch_,*vl,*
x_,tol);
125 con_->applyJacobian(*jvl,*vx,*
x_,tol);
130 ROL_TEST_FOR_EXCEPTION(
true , std::logic_error,
131 ">>> ERROR (ROL_PrimalDualInteriorPointBlock11, applyInverse): "
159 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
160 const PV &v_pv =
dynamic_cast<const PV&
>(v);
163 ROL::Ptr<V> Hvx = Hv_pv.
get(
OPT);
167 ROL::Ptr<const V> vzl = v_pv.
get(
LOWER);
168 ROL::Ptr<const V> vzu = v_pv.
get(
UPPER);
171 Hvx->axpy(-1.0,*vzl);
177 ROL_TEST_FOR_EXCEPTION(
true , std::logic_error,
178 ">>> ERROR (ROL_PrimalDualInteriorPointBlock12, applyInverse): "
203 const PV &z_pv =
dynamic_cast<const PV&
>(z);
209 const PV &z_pv =
dynamic_cast<const PV&
>(z);
217 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
218 const PV &v_pv =
dynamic_cast<const PV&
>(v);
221 ROL::Ptr<V> Hvzl = Hv_pv.
get(
LOWER);
222 ROL::Ptr<V> Hvzu = Hv_pv.
get(
UPPER);
225 ROL::Ptr<const V> vx = v_pv.
get(
OPT);
226 ROL::Ptr<const V> vl = v_pv.
get(
EQUAL);
229 Hvzl->applyBinary(mult_,*
zl_);
232 Hvzu->applyBinary(mult_,*
zu_);
237 ROL_TEST_FOR_EXCEPTION(
true , std::logic_error,
238 ">>> ERROR (ROL_PrimalDualInteriorPointBlock21, applyInverse): "
256 ROL::Ptr<const V>
x_;
268 const PV &x_pv =
dynamic_cast<const PV&
>(x);
271 xl_ = bnd.getLowerBound();
272 xu_ = bnd.getUpperBound();
278 const PV &x_pv =
dynamic_cast<const PV&
>(x);
285 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
286 const PV &v_pv =
dynamic_cast<const PV&
>(v);
289 ROL::Ptr<V> Hvzl = Hv_pv.
get(
LOWER);
290 ROL::Ptr<V> Hvzu = Hv_pv.
get(
UPPER);
293 ROL::Ptr<const V> vzl = v_pv.
get(
LOWER);
294 ROL::Ptr<const V> vzu = v_pv.
get(
UPPER);
297 Hvzl->axpy(-1.0,*
xl_);
298 Hvzl->applyBinary(
mult_,*vzl);
301 Hvzu->axpy(-1.0,*
x_);
302 Hvzu->applyBinary(
mult_,*vzu);
310 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
311 const PV &v_pv =
dynamic_cast<const PV&
>(v);
314 ROL::Ptr<V> Hvzl = Hv_pv.
get(
LOWER);
315 ROL::Ptr<V> Hvzu = Hv_pv.
get(
UPPER);
318 ROL::Ptr<const V> vzl = v_pv.
get(
LOWER);
319 ROL::Ptr<const V> vzu = v_pv.
get(
UPPER);
322 Hvzl->axpy(-1.0,*
xl_);
323 Hvzl->applyBinary(
divinv_,*vzl);
326 Hvzu->axpy(-1.0,*
x_);
327 Hvzu->applyBinary(
divinv_,*vzu);
337 #endif // ROL_PRIMALDUALINTERIORPOINTOPERATOR_H
Provides the interface to evaluate objective functions.
static const size_type EQUAL
typename PV< Real >::size_type size_type
void setInertia(Real delta)
PrimalDualInteriorPointBlock22(const ROL::Ptr< BND > &bnd, const Vector< Real > &x)
virtual void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
static const size_type UPPER
ROL::Ptr< const Vector< Real > > get(size_type i) const
void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update linear operator.
static const size_type UPPER
static const size_type OPT
static const size_type EQUAL
Defines the linear algebra of vector space on a generic partitioned vector.
static const size_type EQUAL
static const size_type OPT
virtual void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update linear operator.
void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
PartitionedVector< Real > PV
PartitionedVector< Real > PV
Defines the linear algebra or vector space interface.
void update(const Vector< Real > &z, bool flag=true, int iter=-1)
Update linear operator.
static const size_type LOWER
Elementwise::Multiply< Real > divinv_
PrimalDualInteriorPointBlock21(const V &z)
Elementwise::Multiply< Real > mult_
virtual void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
virtual void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
static const size_type OPT
static const size_type LOWER
Provides the interface to apply a linear operator.
Provides the interface to apply upper and lower bound constraints.
void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
PartitionedVector< Real > PV
void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
BoundConstraint< Real > BND
virtual void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
PartitionedVector< Real > PV
static const size_type LOWER
static const size_type LOWER
static const size_type OPT
void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
PrimalDualInteriorPointBlock11(ROL::Ptr< OBJ > &obj, ROL::Ptr< CON > &con, const V &x, ROL::Ptr< V > &scratch, Real delta=0)
static const size_type UPPER
Defines the general constraint operator interface.
static const size_type UPPER