ROL
ROL_LinMoreModel.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Rapid Optimization Library (ROL) Package
4//
5// Copyright 2014 NTESS and the ROL contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef ROL_LINMOREMODEL_HPP
11#define ROL_LINMOREMODEL_HPP
12
15
24namespace ROL {
25
26template<class Real>
27class LinMoreModel : public TrustRegionModel<Real> {
28private:
29 Ptr<Vector<Real>> pwa_, dwa_;
30
31public:
32
34 const Vector<Real> &x, const Vector<Real> &g,
35 const Ptr<Secant<Real>> &secant = nullPtr,
36 const bool useSecantPrecond = false, const bool useSecantHessVec = false)
37 : TrustRegionModel<Real>::TrustRegionModel(obj,bnd,x,g,secant,useSecantPrecond,useSecantHessVec) {
38 pwa_ = x.clone();
39 dwa_ = g.clone();
40 }
41
42 void applyFullHessian(Vector<Real> &hv, const Vector<Real> &v, Real &tol) {
44 }
45
46 void applyFreeHessian(Vector<Real> &hv, const Vector<Real> &v, const Vector<Real> &x, Real &tol) {
47 const Real zero(0);
48 pwa_->set(v);
50 applyFullHessian(hv,*pwa_,tol);
52 }
53
54 void applyFullPrecond(Vector<Real> &pv, const Vector<Real> &v, Real &tol) {
56 }
57
58 void applyFreePrecond(Vector<Real> &pv, const Vector<Real> &v, const Vector<Real> &x, Real &tol) {
59 const Real zero(0);
60 dwa_->set(v);
62 applyFullPrecond(pv,*dwa_,tol);
64 }
65
66};
67
68} // namespace ROL
69
70#endif
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
Provides the interface to apply upper and lower bound constraints.
Provides the interface to evaluate projected trust-region model functions from the Kelley-Sachs bound...
void applyFullHessian(Vector< Real > &hv, const Vector< Real > &v, Real &tol)
void applyFreePrecond(Vector< Real > &pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
void applyFullPrecond(Vector< Real > &pv, const Vector< Real > &v, Real &tol)
LinMoreModel(Objective< Real > &obj, BoundConstraint< Real > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Ptr< Secant< Real > > &secant=nullPtr, const bool useSecantPrecond=false, const bool useSecantHessVec=false)
void applyFreeHessian(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Ptr< Vector< Real > > pwa_
Ptr< Vector< Real > > dwa_
Provides the interface to evaluate objective functions.
Provides interface for and implements limited-memory secant operators.
Provides the interface to evaluate trust-region model functions.
void applyHessian(Vector< Real > &hv, const Vector< Real > &v, Real &tol)
void applyPrecond(Vector< Real > &Pv, const Vector< Real > &v, Real &tol)
virtual const Ptr< BoundConstraint< Real > > getBoundConstraint(void) const
Defines the linear algebra or vector space interface.
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.