ROL
Toggle main menu visibility
Loading...
Searching...
No Matches
src
algorithm
TypeU
ROL_TypeU_LineSearchAlgorithm.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_TYPEU_LINESEARCHALGORITHM_H
11
#define ROL_TYPEU_LINESEARCHALGORITHM_H
12
13
#include "
ROL_TypeU_Algorithm.hpp
"
14
#include "
ROL_LineSearch_U_Types.hpp
"
15
#include "
ROL_DescentDirection_U.hpp
"
16
#include "
ROL_LineSearch_U.hpp
"
17
#include "
ROL_Secant.hpp
"
18
62
63
namespace
ROL
{
64
namespace
TypeU
{
65
66
template
<
class
Real>
67
class
LineSearchAlgorithm
:
public
Algorithm
<Real> {
68
private
:
69
70
Ptr<DescentDirection_U<Real>>
desc_
;
71
Ptr<LineSearch_U<Real>>
lineSearch_
;
72
73
EDescentU
edesc_
;
74
ELineSearchU
els_
;
75
ECurvatureConditionU
econd_
;
76
77
bool
acceptLastAlpha_
;
78
79
bool
usePreviousAlpha_
;
80
81
int
verbosity_
;
82
bool
printHeader_
;
83
int
ls_nfval_
,
ls_ngrad_
;
84
int
SPflag_
,
SPiter_
;
85
86
std::string
lineSearchName_
,
descentName_
;
87
88
using
Algorithm
<Real>
::state_
;
89
using
Algorithm
<Real>
::status_
;
90
using
Algorithm
<Real>
::initialize
;
91
92
public
:
104
LineSearchAlgorithm
( ParameterList &parlist,
105
const
Ptr<
Secant<Real>
> &secant = nullPtr,
106
const
Ptr<
DescentDirection_U<Real>
> &descent = nullPtr,
107
const
Ptr<
LineSearch_U<Real>
> &lineSearch = nullPtr );
108
109
void
initialize
(
const
Vector<Real>
&x,
const
Vector<Real>
&g,
110
Objective<Real>
&obj, std::ostream &outStream = std::cout);
111
112
using
TypeU::Algorithm
<Real>
::run
;
113
void
run
(
Vector<Real>
&x,
114
const
Vector<Real>
&g,
115
Objective<Real>
&obj,
116
std::ostream &outStream = std::cout)
override
;
117
118
void
writeHeader
( std::ostream& os )
const override
;
119
120
void
writeName
( std::ostream& os )
const override
;
121
122
void
writeOutput
( std::ostream& os,
const
bool
print_header =
false
)
const override
;
123
124
};
// class ROL::TypeU::LineSearchAlgorithm
125
126
}
// namespace TypeU
127
}
// namespace ROL
128
129
#include "
ROL_TypeU_LineSearchAlgorithm_Def.hpp
"
130
131
#endif
ROL_DescentDirection_U.hpp
ROL_LineSearch_U.hpp
ROL_LineSearch_U_Types.hpp
ROL_Secant.hpp
ROL_TypeU_Algorithm.hpp
ROL_TypeU_LineSearchAlgorithm_Def.hpp
ROL::DescentDirection_U
Provides the interface to compute unconstrained optimization steps for line search.
Definition
ROL_DescentDirection_U.hpp:24
ROL::LineSearch_U
Provides interface for and implements line searches.
Definition
ROL_LineSearch_U.hpp:27
ROL::Objective
Provides the interface to evaluate objective functions.
Definition
ROL_Objective.hpp:44
ROL::ROL::TypeU::Algorithm::Algorithm
Algorithm()
Constructor, given a step and a status test.
Definition
ROL_Constraint_SerialSimOpt.hpp:21
ROL::ROL::TypeU::Algorithm::status_
const Ptr< CombinedStatusTest< Real > > status_
Definition
ROL_Constraint_SerialSimOpt.hpp:51
ROL::ROL::TypeU::Algorithm::state_
const Ptr< AlgorithmState< Real > > state_
Definition
ROL_Constraint_SerialSimOpt.hpp:52
ROL::Secant
Provides interface for and implements limited-memory secant operators.
Definition
ROL_Secant.hpp:45
ROL::TypeU::Algorithm
Provides an interface to run unconstrained optimization algorithms.
Definition
ROL_TypeU_Algorithm.hpp:49
ROL::TypeU::LineSearchAlgorithm::desc_
Ptr< DescentDirection_U< Real > > desc_
Unglobalized step object.
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:70
ROL::TypeU::LineSearchAlgorithm::LineSearchAlgorithm
LineSearchAlgorithm(ParameterList &parlist, const Ptr< Secant< Real > > &secant=nullPtr, const Ptr< DescentDirection_U< Real > > &descent=nullPtr, const Ptr< LineSearch_U< Real > > &lineSearch=nullPtr)
Constructor.
Definition
ROL_TypeU_LineSearchAlgorithm_Def.hpp:20
ROL::TypeU::LineSearchAlgorithm::acceptLastAlpha_
bool acceptLastAlpha_
For backwards compatibility. When max function evaluations are reached take last step.
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:77
ROL::TypeU::LineSearchAlgorithm::writeHeader
void writeHeader(std::ostream &os) const override
Print iterate header.
Definition
ROL_TypeU_LineSearchAlgorithm_Def.hpp:139
ROL::TypeU::LineSearchAlgorithm::usePreviousAlpha_
bool usePreviousAlpha_
If true, use the previously accepted step length (if any) as the new initial step length.
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:79
ROL::TypeU::LineSearchAlgorithm::lineSearch_
Ptr< LineSearch_U< Real > > lineSearch_
Line-search object.
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:71
ROL::TypeU::LineSearchAlgorithm::writeName
void writeName(std::ostream &os) const override
Print step name.
Definition
ROL_TypeU_LineSearchAlgorithm_Def.hpp:180
ROL::TypeU::LineSearchAlgorithm::ls_ngrad_
int ls_ngrad_
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:83
ROL::TypeU::LineSearchAlgorithm::verbosity_
int verbosity_
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:81
ROL::TypeU::LineSearchAlgorithm::edesc_
EDescentU edesc_
enum determines type of descent direction
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:73
ROL::TypeU::LineSearchAlgorithm::printHeader_
bool printHeader_
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:82
ROL::TypeU::LineSearchAlgorithm::run
void run(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, std::ostream &outStream=std::cout) override
Definition
ROL_TypeU_LineSearchAlgorithm_Def.hpp:80
ROL::TypeU::LineSearchAlgorithm::lineSearchName_
std::string lineSearchName_
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:86
ROL::TypeU::LineSearchAlgorithm::els_
ELineSearchU els_
enum determines type of line search
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:74
ROL::TypeU::LineSearchAlgorithm::ls_nfval_
int ls_nfval_
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:83
ROL::TypeU::LineSearchAlgorithm::initialize
void initialize(const Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, std::ostream &outStream=std::cout)
Definition
ROL_TypeU_LineSearchAlgorithm_Def.hpp:60
ROL::TypeU::LineSearchAlgorithm::descentName_
std::string descentName_
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:86
ROL::TypeU::LineSearchAlgorithm::SPflag_
int SPflag_
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:84
ROL::TypeU::LineSearchAlgorithm::writeOutput
void writeOutput(std::ostream &os, const bool print_header=false) const override
Print iterate status.
Definition
ROL_TypeU_LineSearchAlgorithm_Def.hpp:190
ROL::TypeU::LineSearchAlgorithm::SPiter_
int SPiter_
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:84
ROL::TypeU::LineSearchAlgorithm::econd_
ECurvatureConditionU econd_
enum determines type of curvature condition
Definition
ROL_TypeU_LineSearchAlgorithm.hpp:75
ROL::Vector
Defines the linear algebra or vector space interface.
Definition
ROL_Vector.hpp:51
ROL::TypeU
Definition
ROL_TypeU_Algorithm.hpp:23
ROL
Definition
ROL_ElementwiseVector.hpp:27
ROL::EDescentU
EDescentU
Definition
ROL_LineSearch_U_Types.hpp:30
ROL::ECurvatureConditionU
ECurvatureConditionU
Definition
ROL_LineSearch_U_Types.hpp:193
ROL::ELineSearchU
ELineSearchU
Definition
ROL_LineSearch_U_Types.hpp:110
Generated by
1.17.0