10 #ifndef ROL_PRIMALDUALINTERIORPOINTOPERATOR_H
11 #define ROL_PRIMALDUALINTERIORPOINTOPERATOR_H
44 const V &x, ROL::Ptr<V> & scratch,
48 const PV &x_pv =
dynamic_cast<const PV&
>(x);
56 const PV &x_pv =
dynamic_cast<const PV&
>(x);
61 obj_->update(*
x_,flag,
true);
62 con_->update(*
x_,flag,
true);
69 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
70 const PV &v_pv =
dynamic_cast<const PV&
>(v);
73 ROL::Ptr<V> Hvx = Hv_pv.
get(
OPT);
77 ROL::Ptr<const V> vx = v_pv.
get(
OPT);
78 ROL::Ptr<const V> vl = v_pv.
get(
EQUAL);
80 obj_->hessVec(*jvx,*vx,*
x_,tol);
83 con_->applyAdjointJacobian(*
scratch_,*vl,*
x_,tol);
91 con_->applyJacobian(*jvl,*vx,*
x_,tol);
96 ROL_TEST_FOR_EXCEPTION(
true , std::logic_error,
97 ">>> ERROR (ROL_PrimalDualInteriorPointBlock11, applyInverse): "
125 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
126 const PV &v_pv =
dynamic_cast<const PV&
>(v);
129 ROL::Ptr<V> Hvx = Hv_pv.
get(
OPT);
133 ROL::Ptr<const V> vzl = v_pv.
get(
LOWER);
134 ROL::Ptr<const V> vzu = v_pv.
get(
UPPER);
137 Hvx->axpy(-1.0,*vzl);
143 ROL_TEST_FOR_EXCEPTION(
true , std::logic_error,
144 ">>> ERROR (ROL_PrimalDualInteriorPointBlock12, applyInverse): "
169 const PV &z_pv =
dynamic_cast<const PV&
>(z);
175 const PV &z_pv =
dynamic_cast<const PV&
>(z);
183 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
184 const PV &v_pv =
dynamic_cast<const PV&
>(v);
187 ROL::Ptr<V> Hvzl = Hv_pv.
get(
LOWER);
188 ROL::Ptr<V> Hvzu = Hv_pv.
get(
UPPER);
191 ROL::Ptr<const V> vx = v_pv.
get(
OPT);
192 ROL::Ptr<const V> vl = v_pv.
get(
EQUAL);
195 Hvzl->applyBinary(mult_,*
zl_);
198 Hvzu->applyBinary(mult_,*
zu_);
203 ROL_TEST_FOR_EXCEPTION(
true , std::logic_error,
204 ">>> ERROR (ROL_PrimalDualInteriorPointBlock21, applyInverse): "
222 ROL::Ptr<const V>
x_;
234 const PV &x_pv =
dynamic_cast<const PV&
>(x);
237 xl_ = bnd.getLowerBound();
238 xu_ = bnd.getUpperBound();
244 const PV &x_pv =
dynamic_cast<const PV&
>(x);
251 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
252 const PV &v_pv =
dynamic_cast<const PV&
>(v);
255 ROL::Ptr<V> Hvzl = Hv_pv.
get(
LOWER);
256 ROL::Ptr<V> Hvzu = Hv_pv.
get(
UPPER);
259 ROL::Ptr<const V> vzl = v_pv.
get(
LOWER);
260 ROL::Ptr<const V> vzu = v_pv.
get(
UPPER);
263 Hvzl->axpy(-1.0,*
xl_);
264 Hvzl->applyBinary(
mult_,*vzl);
267 Hvzu->axpy(-1.0,*
x_);
268 Hvzu->applyBinary(
mult_,*vzu);
276 PV &Hv_pv =
dynamic_cast<PV&
>(Hv);
277 const PV &v_pv =
dynamic_cast<const PV&
>(v);
280 ROL::Ptr<V> Hvzl = Hv_pv.
get(
LOWER);
281 ROL::Ptr<V> Hvzu = Hv_pv.
get(
UPPER);
284 ROL::Ptr<const V> vzl = v_pv.
get(
LOWER);
285 ROL::Ptr<const V> vzu = v_pv.
get(
UPPER);
288 Hvzl->axpy(-1.0,*
xl_);
289 Hvzl->applyBinary(
divinv_,*vzl);
292 Hvzu->axpy(-1.0,*
x_);
293 Hvzu->applyBinary(
divinv_,*vzu);
303 #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