17 #include "ROL_ParameterList.hpp"
73 const Real snorm,
const int iter ) {
87 if (sy > ROL_EPSILON<Real>()*snorm*snorm) {
102 state_->product.push_back(sy);
141 void test(std::ostream &stream = std::cout )
const {
143 Ptr<Vector<Real>> v =
state_->iterate->clone();
144 Ptr<Vector<Real>> Hv =
state_->iterate->clone();
145 Ptr<Vector<Real>> Bv =
state_->iterate->dual().clone();
149 v->randomize(-one,one);
153 stream <<
" ||BHv-v|| = " << v->norm() << std::endl;
156 v->randomize(-one,one);
160 stream <<
" ||HBv-v|| = " << v->norm() << std::endl;
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
virtual void scale(const Real alpha)=0
Compute where .
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual Real apply(const Vector< Real > &x) const
Apply to a dual vector. This is equivalent to the call .
SecantState(int M, ESecantMode sm)
void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
Contains definitions of custom data types in ROL.
virtual void applyH(Vector< Real > &Hv, const Vector< Real > &v) const =0
Defines the linear algebra or vector space interface.
Ptr< Vector< Real > > iterate
std::vector< Ptr< Vector< Real > > > iterDiff
virtual void applyB0(Vector< Real > &Bv, const Vector< Real > &v) const
Provides interface for and implements limited-memory secant operators.
virtual void updateStorage(const Vector< Real > &x, const Vector< Real > &grad, const Vector< Real > &gp, const Vector< Real > &s, const Real snorm, const int iter)
std::vector< Real > product2
const Ptr< SecantState< Real > > & get_state() const
virtual void applyB(Vector< Real > &Bv, const Vector< Real > &v) const =0
Provides the interface to apply a linear operator.
const Ptr< SecantState< Real > > state_
virtual void applyH0(Vector< Real > &Hv, const Vector< Real > &v) const
std::vector< Ptr< Vector< Real > > > gradDiff
void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
virtual void set(const Vector &x)
Set where .
Ptr< SecantState< Real > > & get_state()
std::vector< Real > product
void test(std::ostream &stream=std::cout) const