10#ifndef ROL_FLETCHEROBJECTIVEEDEF_H
11#define ROL_FLETCHEROBJECTIVEEDEF_H
15template<
typename Real>
22 ROL::ParameterList &parlist)
35template<
typename Real>
39 bool isComputed =
fPhi_->get(val,key);
62template<
typename Real>
65 bool isComputed =
gPhi_->get(g,key);
77 bool refine = isComputed;
86 g.
axpy(
static_cast<Real
>(-1), *
Tv_ );
91 con_->applyAdjointJacobian( *
Tv_, *
cprim_, x, tol2 ); tol2 = origTol;
98template<
typename Real>
104 bool isComputed =
y_->get(*
cdual_,key);
114 obj_->hessVec( hv, v, x, tol2 ); tol2 = origTol;
115 con_->applyAdjointHessian( *
Tv_, *
cdual_, v, x, tol2 ); tol2 = origTol;
116 hv.
axpy(
static_cast<Real
>(-1), *
Tv_ );
120 hv.
scale(
static_cast<Real
>(-1) );
133 hv.
axpy(
static_cast<Real
>(-1), *
Tv_ );
138 con_->applyJacobian( *
b2_, v, x, tol2 ); tol2 = origTol;
139 con_->applyAdjointJacobian( *
Tv_, *
b2_, x, tol2 ); tol2 = origTol;
141 con_->applyAdjointHessian( *
Tv_, *
cprim_, v, x, tol2); tol2 = origTol;
146template<
typename Real>
155 ROL::Ptr<LinearOperator<Real>>
156 K = ROL::makePtr<AugSystem>(
con_, makePtrFromRef(x),
delta_);
157 ROL::Ptr<LinearOperator<Real>>
158 P = ROL::makePtr<AugSystemPrecond>(
con_, makePtrFromRef(x), makePtrFromRef(b1));
167 K->apply(*
bb_, *
ww_, tol); tol = origTol;
168 bb_->scale(
static_cast<Real
>(-1));
Defines the general constraint operator interface.
Ptr< Vector< Real > > gL_
Ptr< Vector< Real > > xdual_
const Ptr< Objective< Real > > obj_
Ptr< VectorController< Real, int > > gPhi_
Ptr< Vector< Real > > cdual_
Ptr< Vector< Real > > b2_
Real objValue(const Vector< Real > &x, Real &tol)
Ptr< PartitionedVector< Real > > bb_
Ptr< PartitionedVector< Real > > ww_
Ptr< ScalarController< Real, int > > fPhi_
Ptr< Vector< Real > > cprim_
Ptr< Vector< Real > > gLdual_
Ptr< PartitionedVector< Real > > vv_
Ptr< Vector< Real > > w2_
Ptr< Vector< Real > > b1_
Real quadPenaltyParameter_
Ptr< Vector< Real > > v2_
FletcherObjectiveBase(const Ptr< Objective< Real > > &obj, const Ptr< Constraint< Real > > &con, const Vector< Real > &xprim, const Vector< Real > &xdual, const Vector< Real > &cprim, const Vector< Real > &cdual, ParameterList &parlist)
void computeMultipliers(Vector< Real > &y, Vector< Real > &gL, const Vector< Real > &x, Vector< Real > &g, Vector< Real > &c, Real tol)
Ptr< Vector< Real > > v1_
Ptr< Krylov< Real > > krylov_
const Ptr< Constraint< Real > > con_
Ptr< VectorController< Real, int > > y_
Ptr< Vector< Real > > w1_
Ptr< Vector< Real > > Tv_
void solveAugmentedSystem(Vector< Real > &v1, Vector< Real > &v2, const Vector< Real > &b1, const Vector< Real > &b2, const Vector< Real > &x, Real &tol, bool refine=false) override
Ptr< Vector< Real > > xzeros_
Ptr< Vector< Real > > wdual_
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
Real value(const Vector< Real > &x, Real &tol) override
Ptr< Vector< Real > > czeros_
Ptr< Vector< Real > > vg_
Ptr< Vector< Real > > wg_
FletcherObjectiveE(const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< Constraint< Real > > &con, const Vector< Real > &xprim, const Vector< Real > &xdual, const Vector< Real > &cprim, const Vector< Real > &cdual, ROL::ParameterList &parlist)
Provides the interface to evaluate objective functions.
Defines the linear algebra or vector space interface.
virtual void set(const Vector &x)
Set where .
virtual void scale(const Real alpha)=0
Compute where .
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis,...
virtual void plus(const Vector &x)=0
Compute , where .
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual void axpy(const Real alpha, const Vector &x)
Compute where .