ROL
Toggle main menu visibility
Loading...
Searching...
No Matches
src
step
trustregion
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
13
#include "
ROL_TrustRegionModel.hpp
"
14
#include "
ROL_BoundConstraint.hpp
"
15
23
24
namespace
ROL
{
25
26
template
<
class
Real>
27
class
LinMoreModel
:
public
TrustRegionModel
<Real> {
28
private
:
29
Ptr<Vector<Real>>
pwa_
,
dwa_
;
30
31
public
:
32
33
LinMoreModel
(
Objective<Real>
&obj,
BoundConstraint<Real>
&bnd,
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) {
43
TrustRegionModel<Real>::applyHessian
(hv,v,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);
49
TrustRegionModel<Real>::getBoundConstraint
()->pruneActive(*
pwa_
,x,
zero
);
50
applyFullHessian
(hv,*
pwa_
,tol);
51
TrustRegionModel<Real>::getBoundConstraint
()->pruneActive(hv,x,
zero
);
52
}
53
54
void
applyFullPrecond
(
Vector<Real>
&pv,
const
Vector<Real>
&v, Real &tol) {
55
TrustRegionModel<Real>::applyPrecond
(pv,v,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);
61
TrustRegionModel<Real>::getBoundConstraint
()->pruneActive(*
dwa_
,x,
zero
);
62
applyFullPrecond
(pv,*
dwa_
,tol);
63
TrustRegionModel<Real>::getBoundConstraint
()->pruneActive(pv,x,
zero
);
64
}
65
66
};
67
68
}
// namespace ROL
69
70
#endif
ROL_BoundConstraint.hpp
zero
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0 zero)()
Definition
ROL_Objective_SerialSimOpt.hpp:77
ROL_TrustRegionModel.hpp
ROL::BoundConstraint
Provides the interface to apply upper and lower bound constraints.
Definition
ROL_BoundConstraint.hpp:39
ROL::LinMoreModel::applyFullHessian
void applyFullHessian(Vector< Real > &hv, const Vector< Real > &v, Real &tol)
Definition
ROL_LinMoreModel.hpp:42
ROL::LinMoreModel::applyFreePrecond
void applyFreePrecond(Vector< Real > &pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Definition
ROL_LinMoreModel.hpp:58
ROL::LinMoreModel::applyFullPrecond
void applyFullPrecond(Vector< Real > &pv, const Vector< Real > &v, Real &tol)
Definition
ROL_LinMoreModel.hpp:54
ROL::LinMoreModel::LinMoreModel
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)
Definition
ROL_LinMoreModel.hpp:33
ROL::LinMoreModel::applyFreeHessian
void applyFreeHessian(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Definition
ROL_LinMoreModel.hpp:46
ROL::LinMoreModel::pwa_
Ptr< Vector< Real > > pwa_
Definition
ROL_LinMoreModel.hpp:29
ROL::LinMoreModel::dwa_
Ptr< Vector< Real > > dwa_
Definition
ROL_LinMoreModel.hpp:29
ROL::Objective
Provides the interface to evaluate objective functions.
Definition
ROL_Objective.hpp:44
ROL::Secant
Provides interface for and implements limited-memory secant operators.
Definition
ROL_Secant.hpp:45
ROL::TrustRegionModel::applyHessian
void applyHessian(Vector< Real > &hv, const Vector< Real > &v, Real &tol)
Definition
ROL_TrustRegionModel.hpp:57
ROL::TrustRegionModel::TrustRegionModel
TrustRegionModel(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)
Definition
ROL_TrustRegionModel.hpp:91
ROL::TrustRegionModel::applyPrecond
void applyPrecond(Vector< Real > &Pv, const Vector< Real > &v, Real &tol)
Definition
ROL_TrustRegionModel.hpp:75
ROL::TrustRegionModel::getBoundConstraint
virtual const Ptr< BoundConstraint< Real > > getBoundConstraint(void) const
Definition
ROL_TrustRegionModel.hpp:160
ROL::Vector
Defines the linear algebra or vector space interface.
Definition
ROL_Vector.hpp:51
ROL::Vector::clone
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
ROL
Definition
ROL_ElementwiseVector.hpp:27
Generated by
1.17.0