67 std::vector<Real> alpha(state->current+1,zero);
68 for (
int i = state->current; i>=0; i--) {
69 alpha[i] = state->iterDiff[i]->dot(Hv);
70 alpha[i] /= state->product[i];
71 Hv.
axpy(-alpha[i],(state->gradDiff[i])->dual());
75 ROL::Ptr<Vector<Real> > tmp = Hv.
clone();
80 for (
int i = 0; i <= state->current; i++) {
81 beta = Hv.
dot((state->gradDiff[i])->dual());
82 beta /= state->product[i];
83 Hv.
axpy((alpha[i]-beta),*(state->iterDiff[i]));
96 std::vector<ROL::Ptr<Vector<Real> > > a(state->current+1);
97 std::vector<ROL::Ptr<Vector<Real> > > b(state->current+1);
98 Real bv(0), av(0), bs(0), as(0);
99 for (
int i = 0; i <= state->current; i++) {
101 b[i]->set(*(state->gradDiff[i]));
102 b[i]->scale(one/sqrt(state->product[i]));
103 bv = v.
dot(b[i]->dual());
109 for (
int j = 0; j < i; j++) {
110 bs = (state->iterDiff[i])->dot(b[j]->dual());
111 a[i]->axpy(bs,*b[j]);
112 as = (state->iterDiff[i])->dot(a[j]->dual());
113 a[i]->axpy(-as,*a[j]);
115 as = (state->iterDiff[i])->dot(a[i]->dual());
116 a[i]->scale(one/sqrt(as));
117 av = v.
dot(a[i]->dual());
void applyB(Vector< Real > &Bv, const Vector< Real > &v) const
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
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 .
void applyH(Vector< Real > &Hv, const Vector< Real > &v) const
Provides definitions for limited-memory BFGS operators.
Defines the linear algebra or vector space interface.
virtual Real dot(const Vector &x) const =0
Compute where .
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
ROL::Ptr< SecantState< Real > > & get_state()
virtual void applyB0(Vector< Real > &Bv, const Vector< Real > &v) const
Provides interface for and implements limited-memory secant operators.
virtual void applyH0(Vector< Real > &Hv, const Vector< Real > &v) const
virtual void set(const Vector &x)
Set where .