ROL
Toggle main menu visibility
Loading...
Searching...
No Matches
src
function
polyproj
ROL_BrentsProjection.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_BRENTSPROJECTION_H
11
#define ROL_BRENTSPROJECTION_H
12
13
#include "
ROL_PolyhedralProjection.hpp
"
14
#include "ROL_ParameterList.hpp"
15
16
namespace
ROL
{
17
18
template
<
typename
Real>
19
class
BrentsProjection
:
public
PolyhedralProjection
<Real> {
20
private
:
21
int
dim_
;
22
Ptr<Vector<Real>>
xnew_
,
Px_
;
23
Real
b_
,
mul1_
,
dlam1_
,
cdot_
;
24
25
Real
DEFAULT_atol_
,
DEFAULT_rtol_
,
DEFAULT_ltol_
;
26
int
DEFAULT_maxit_
,
DEFAULT_verbosity_
;
27
28
Real
atol_
,
rtol_
,
ltol_
;
29
int
maxit_
,
verbosity_
;
30
31
Real
ctol_
;
32
33
using
PolyhedralProjection
<Real>
::bnd_
;
34
using
PolyhedralProjection
<Real>
::con_
;
35
using
PolyhedralProjection
<Real>
::xprim_
;
36
using
PolyhedralProjection
<Real>
::xdual_
;
37
using
PolyhedralProjection
<Real>
::mul_
;
38
using
PolyhedralProjection
<Real>
::res_
;
39
40
void
initialize
(
const
Vector<Real>
&xprim,
41
const
Vector<Real>
&xdual,
42
const
Ptr<
BoundConstraint<Real>
> &bnd,
43
const
Ptr<
Constraint<Real>
> &con,
44
const
Vector<Real>
&mul,
45
const
Vector<Real>
&res);
46
47
public
:
48
49
BrentsProjection
(
const
Vector<Real>
&xprim,
50
const
Vector<Real>
&xdual,
51
const
Ptr<
BoundConstraint<Real>
> &bnd,
52
const
Ptr<
Constraint<Real>
> &con,
53
const
Vector<Real>
&mul,
54
const
Vector<Real>
&res);
55
56
BrentsProjection
(
const
Vector<Real>
&xprim,
57
const
Vector<Real>
&xdual,
58
const
Ptr<
BoundConstraint<Real>
> &bnd,
59
const
Ptr<
Constraint<Real>
> &con,
60
const
Vector<Real>
&mul,
61
const
Vector<Real>
&res,
62
ParameterList &list);
63
64
void
project
(
Vector<Real>
&x, std::ostream &stream = std::cout)
override
;
65
66
private
:
67
68
Real
residual
(
const
Vector<Real>
&x)
const
;
69
70
void
update_primal
(
Vector<Real>
&y,
const
Vector<Real>
&x,
const
Real lam)
const
;
71
72
void
project_df
(
Vector<Real>
&x, Real &lam, Real &dlam, std::ostream &stream = std::cout)
const
;
73
74
};
// class RiddersProjection
75
76
}
// namespace ROL
77
78
#include "
ROL_BrentsProjection_Def.hpp
"
79
80
#endif
ROL_BrentsProjection_Def.hpp
ROL_PolyhedralProjection.hpp
ROL::BoundConstraint
Provides the interface to apply upper and lower bound constraints.
Definition
ROL_BoundConstraint.hpp:39
ROL::BrentsProjection::DEFAULT_verbosity_
int DEFAULT_verbosity_
Definition
ROL_BrentsProjection.hpp:26
ROL::BrentsProjection::ctol_
Real ctol_
Definition
ROL_BrentsProjection.hpp:31
ROL::BrentsProjection::b_
Real b_
Definition
ROL_BrentsProjection.hpp:23
ROL::BrentsProjection::project_df
void project_df(Vector< Real > &x, Real &lam, Real &dlam, std::ostream &stream=std::cout) const
Definition
ROL_BrentsProjection_Def.hpp:127
ROL::BrentsProjection::Px_
Ptr< Vector< Real > > Px_
Definition
ROL_BrentsProjection.hpp:22
ROL::BrentsProjection::project
void project(Vector< Real > &x, std::ostream &stream=std::cout) override
Definition
ROL_BrentsProjection_Def.hpp:100
ROL::BrentsProjection::DEFAULT_atol_
Real DEFAULT_atol_
Definition
ROL_BrentsProjection.hpp:25
ROL::BrentsProjection::maxit_
int maxit_
Definition
ROL_BrentsProjection.hpp:29
ROL::BrentsProjection::verbosity_
int verbosity_
Definition
ROL_BrentsProjection.hpp:29
ROL::BrentsProjection::DEFAULT_rtol_
Real DEFAULT_rtol_
Definition
ROL_BrentsProjection.hpp:25
ROL::BrentsProjection::initialize
void initialize(const Vector< Real > &xprim, const Vector< Real > &xdual, const Ptr< BoundConstraint< Real > > &bnd, const Ptr< Constraint< Real > > &con, const Vector< Real > &mul, const Vector< Real > &res)
Definition
ROL_BrentsProjection_Def.hpp:64
ROL::BrentsProjection::atol_
Real atol_
Definition
ROL_BrentsProjection.hpp:28
ROL::BrentsProjection::cdot_
Real cdot_
Definition
ROL_BrentsProjection.hpp:23
ROL::BrentsProjection::ltol_
Real ltol_
Definition
ROL_BrentsProjection.hpp:28
ROL::BrentsProjection::update_primal
void update_primal(Vector< Real > &y, const Vector< Real > &x, const Real lam) const
Definition
ROL_BrentsProjection_Def.hpp:120
ROL::BrentsProjection::DEFAULT_maxit_
int DEFAULT_maxit_
Definition
ROL_BrentsProjection.hpp:26
ROL::BrentsProjection::residual
Real residual(const Vector< Real > &x) const
Definition
ROL_BrentsProjection_Def.hpp:115
ROL::BrentsProjection::rtol_
Real rtol_
Definition
ROL_BrentsProjection.hpp:28
ROL::BrentsProjection::BrentsProjection
BrentsProjection(const Vector< Real > &xprim, const Vector< Real > &xdual, const Ptr< BoundConstraint< Real > > &bnd, const Ptr< Constraint< Real > > &con, const Vector< Real > &mul, const Vector< Real > &res)
Definition
ROL_BrentsProjection_Def.hpp:16
ROL::BrentsProjection::xnew_
Ptr< Vector< Real > > xnew_
Definition
ROL_BrentsProjection.hpp:22
ROL::BrentsProjection::mul1_
Real mul1_
Definition
ROL_BrentsProjection.hpp:23
ROL::BrentsProjection::DEFAULT_ltol_
Real DEFAULT_ltol_
Definition
ROL_BrentsProjection.hpp:25
ROL::BrentsProjection::dlam1_
Real dlam1_
Definition
ROL_BrentsProjection.hpp:23
ROL::BrentsProjection::dim_
int dim_
Definition
ROL_BrentsProjection.hpp:21
ROL::Constraint
Defines the general constraint operator interface.
Definition
ROL_Constraint.hpp:52
ROL::PolyhedralProjection::con_
const Ptr< Constraint< Real > > con_
Definition
ROL_PolyhedralProjection.hpp:23
ROL::PolyhedralProjection::xprim_
Ptr< Vector< Real > > xprim_
Definition
ROL_PolyhedralProjection.hpp:24
ROL::PolyhedralProjection::bnd_
const Ptr< BoundConstraint< Real > > bnd_
Definition
ROL_PolyhedralProjection.hpp:22
ROL::PolyhedralProjection::mul_
Ptr< Vector< Real > > mul_
Definition
ROL_PolyhedralProjection.hpp:24
ROL::PolyhedralProjection::xdual_
Ptr< Vector< Real > > xdual_
Definition
ROL_PolyhedralProjection.hpp:24
ROL::PolyhedralProjection::res_
Ptr< Vector< Real > > res_
Definition
ROL_PolyhedralProjection.hpp:24
ROL::PolyhedralProjection::PolyhedralProjection
PolyhedralProjection(const Ptr< BoundConstraint< Real > > &bnd)
Definition
ROL_PolyhedralProjection_Def.hpp:16
ROL::Vector
Defines the linear algebra or vector space interface.
Definition
ROL_Vector.hpp:51
ROL
Definition
ROL_ElementwiseVector.hpp:27
Generated by
1.17.0