ROL
Toggle main menu visibility
Loading...
Searching...
No Matches
src
algorithm
TypeU
linesearch
descent
ROL_DescentDirection_U_Factory.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_DESCENTDIRECTION_U_FACTORY_H
11
#define ROL_DESCENTDIRECTION_U_FACTORY_H
12
13
#include "
ROL_Gradient_U.hpp
"
14
#include "
ROL_QuasiNewton_U.hpp
"
15
#include "
ROL_NonlinearCG_U.hpp
"
16
#include "
ROL_Newton_U.hpp
"
17
#include "
ROL_NewtonKrylov_U.hpp
"
18
#include "
ROL_LineSearch_U_Types.hpp
"
19
20
namespace
ROL
{
21
template
<
typename
Real>
22
inline
Ptr<DescentDirection_U<Real>>
DescentDirectionUFactory
(ParameterList &parlist,
const
Ptr<
Secant<Real>
> &secant = nullPtr) {
23
EDescentU
edesc =
StringToEDescentU
(
24
parlist.sublist(
"Step"
).sublist(
"Line Search"
).sublist(
"Descent Method"
).get(
"Type"
,
"Quasi-Newton Method"
));
25
switch
(edesc) {
26
case
DESCENT_U_STEEPEST
:
return
makePtr<Gradient_U<Real>>();
27
case
DESCENT_U_NONLINEARCG
:
return
makePtr<NonlinearCG_U<Real>>(parlist);
28
case
DESCENT_U_SECANT
:
return
makePtr<QuasiNewton_U<Real>>(parlist, secant);
29
case
DESCENT_U_NEWTON
:
return
makePtr<Newton_U<Real>>();
30
case
DESCENT_U_NEWTONKRYLOV
:
31
{
32
Ptr<Krylov<Real>> krylov = nullPtr;
33
return
makePtr<NewtonKrylov_U<Real>>(parlist,krylov,secant);
34
}
35
default
:
return
nullPtr;
36
}
37
}
38
}
// namespace ROL
39
40
#endif
ROL_Gradient_U.hpp
ROL_LineSearch_U_Types.hpp
ROL_NewtonKrylov_U.hpp
ROL_Newton_U.hpp
ROL_NonlinearCG_U.hpp
ROL_QuasiNewton_U.hpp
ROL::Secant
Provides interface for and implements limited-memory secant operators.
Definition
ROL_Secant.hpp:45
ROL
Definition
ROL_ElementwiseVector.hpp:27
ROL::EDescentU
EDescentU
Definition
ROL_LineSearch_U_Types.hpp:30
ROL::DESCENT_U_NONLINEARCG
@ DESCENT_U_NONLINEARCG
Definition
ROL_LineSearch_U_Types.hpp:32
ROL::DESCENT_U_NEWTON
@ DESCENT_U_NEWTON
Definition
ROL_LineSearch_U_Types.hpp:34
ROL::DESCENT_U_SECANT
@ DESCENT_U_SECANT
Definition
ROL_LineSearch_U_Types.hpp:33
ROL::DESCENT_U_STEEPEST
@ DESCENT_U_STEEPEST
Definition
ROL_LineSearch_U_Types.hpp:31
ROL::DESCENT_U_NEWTONKRYLOV
@ DESCENT_U_NEWTONKRYLOV
Definition
ROL_LineSearch_U_Types.hpp:35
ROL::StringToEDescentU
EDescentU StringToEDescentU(std::string s)
Definition
ROL_LineSearch_U_Types.hpp:90
ROL::DescentDirectionUFactory
Ptr< DescentDirection_U< Real > > DescentDirectionUFactory(ParameterList &parlist, const Ptr< Secant< Real > > &secant=nullPtr)
Definition
ROL_DescentDirection_U_Factory.hpp:22
Generated by
1.17.0