39 bool isComputed = fPhi_->get(val,key);
40 if( isComputed && multSolverError_*cnorm_ <= tol) {
41 tol = multSolverError_*cnorm_;
49 multSolverError_ = origTol / (
static_cast<Real
>(2) * std::max(
static_cast<Real
>(1), cnorm_));
51 tol = multSolverError_*cnorm_;
53 val = fval - cprim_->apply(*cdual_);
54 if( quadPenaltyParameter_ >
static_cast<Real
>(0) )
55 val +=
static_cast<Real
>(0.5)*quadPenaltyParameter_*(cprim_->dot(*cprim_));
65 bool isComputed = gPhi_->get(g,key);
66 if( isComputed && gradSolveError_ <= tol) {
67 tol = gradSolveError_;
74 gradSolveError_ = origTol /
static_cast<Real
>(2);
76 gL_->set(gLdual_->dual());
77 bool refine = isComputed;
79 solveAugmentedSystem( *wdual_, *vg_, *xzeros_, *cprim_, x, gradSolveError_, refine );
80 gradSolveError_ += multSolverError_;
81 tol = gradSolveError_;
82 wg_->set(wdual_->dual());
83 con_->applyAdjointHessian( g, *cdual_, *wdual_, x, tol2 ); tol2 = origTol;
84 g.
axpy( sigma_, *wg_ );
85 obj_->hessVec( *Tv_, *wdual_, x, tol2 ); tol2 = origTol;
86 g.
axpy(
static_cast<Real
>(-1), *Tv_ );
87 con_->applyAdjointHessian( *Tv_, *vg_, *gLdual_, x, tol2 ); tol2 = origTol;
90 if( quadPenaltyParameter_ >
static_cast<Real
>(0) ) {
91 con_->applyAdjointJacobian( *Tv_, *cprim_, x, tol2 ); tol2 = origTol;
92 g.
axpy( quadPenaltyParameter_, *Tv_ );
104 bool isComputed = y_->get(*cdual_,key);
105 if( !isComputed || !useInexact_) {
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_ );
119 solveAugmentedSystem( *w_, *v_, hv, *czeros_, x, tol2 ); tol2 = origTol;
120 hv.
scale(
static_cast<Real
>(-1) );
125 solveAugmentedSystem( *w_, *v_, *Tv_, *czeros_, x, tol2 ); tol2 = origTol;
126 hv.
axpy(
static_cast<Real
>(-2)*sigma_, *w_);
128 wdual_->set(w_->dual());
130 obj_->hessVec( *Tv_, *wdual_, x, tol2 ); tol2 = origTol;
132 con_->applyAdjointHessian( *Tv_, *cdual_, *wdual_, x, tol2 ); tol2 = origTol;
133 hv.
axpy(
static_cast<Real
>(-1), *Tv_ );
135 hv.
axpy(
static_cast<Real
>(2)*sigma_, v );
137 if( quadPenaltyParameter_ >
static_cast<Real
>(0) ) {
138 con_->applyJacobian( *b2_, v, x, tol2 ); tol2 = origTol;
139 con_->applyAdjointJacobian( *Tv_, *b2_, x, tol2 ); tol2 = origTol;
140 hv.
axpy( quadPenaltyParameter_, *Tv_ );
141 con_->applyAdjointHessian( *Tv_, *cprim_, v, x, tol2); tol2 = origTol;
142 hv.
axpy( -quadPenaltyParameter_, *Tv_ );
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));
174 if( useInexact_ ) krylov_->resetAbsoluteTolerance(tol);
178 tol = krylov_->run(*vv_,*K,*bb_,*P,iterKrylov_,flagKrylov_);
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
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)
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis,...