ROL
src
algorithm
TypeU
trustregion
ROL_TrustRegion_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
15
#ifndef ROL_TRUSTREGION_U_FACTORY_HPP
16
#define ROL_TRUSTREGION_U_FACTORY_HPP
17
18
#include "
ROL_TrustRegion_U_Types.hpp
"
19
#include "
ROL_CauchyPoint_U.hpp
"
20
#include "
ROL_DogLeg_U.hpp
"
21
#include "
ROL_DoubleDogLeg_U.hpp
"
22
#include "
ROL_TruncatedCG_U.hpp
"
23
#include "
ROL_SPGTrustRegion_U.hpp
"
24
25
namespace
ROL
{
26
template
<
typename
Real>
27
inline
Ptr<TrustRegion_U<Real>>
TrustRegionUFactory
(ParameterList &list) {
28
ETrustRegionU
etr =
StringToETrustRegionU
(
29
list.sublist(
"Step"
).sublist(
"Trust Region"
).get(
"Subproblem Solver"
,
"Dogleg"
));
30
switch
(etr) {
31
case
TRUSTREGION_U_CAUCHYPOINT
:
return
makePtr<CauchyPoint_U<Real>>();
32
case
TRUSTREGION_U_DOGLEG
:
return
makePtr<DogLeg_U<Real>>();
33
case
TRUSTREGION_U_DOUBLEDOGLEG
:
return
makePtr<DoubleDogLeg_U<Real>>();
34
case
TRUSTREGION_U_TRUNCATEDCG
:
return
makePtr<TruncatedCG_U<Real>>(list);
35
case
TRUSTREGION_U_SPG
:
return
makePtr<SPGTrustRegion_U<Real>>(list);
36
default
:
return
nullPtr;
37
}
38
}
39
}
// ROL
40
41
#endif
ROL_CauchyPoint_U.hpp
ROL_DogLeg_U.hpp
ROL_DoubleDogLeg_U.hpp
ROL_SPGTrustRegion_U.hpp
ROL_TruncatedCG_U.hpp
ROL_TrustRegion_U_Types.hpp
Contains definitions of enums for trust region algorithms.
ROL
Definition
ROL_ElementwiseVector.hpp:27
ROL::ETrustRegionU
ETrustRegionU
Definition
ROL_TrustRegion_U_Types.hpp:29
ROL::TRUSTREGION_U_TRUNCATEDCG
@ TRUSTREGION_U_TRUNCATEDCG
Definition
ROL_TrustRegion_U_Types.hpp:31
ROL::TRUSTREGION_U_DOUBLEDOGLEG
@ TRUSTREGION_U_DOUBLEDOGLEG
Definition
ROL_TrustRegion_U_Types.hpp:34
ROL::TRUSTREGION_U_DOGLEG
@ TRUSTREGION_U_DOGLEG
Definition
ROL_TrustRegion_U_Types.hpp:33
ROL::TRUSTREGION_U_SPG
@ TRUSTREGION_U_SPG
Definition
ROL_TrustRegion_U_Types.hpp:32
ROL::TRUSTREGION_U_CAUCHYPOINT
@ TRUSTREGION_U_CAUCHYPOINT
Definition
ROL_TrustRegion_U_Types.hpp:30
ROL::StringToETrustRegionU
ETrustRegionU StringToETrustRegionU(std::string s)
Definition
ROL_TrustRegion_U_Types.hpp:86
ROL::TrustRegionUFactory
Ptr< TrustRegion_U< Real > > TrustRegionUFactory(ParameterList &list)
Definition
ROL_TrustRegion_U_Factory.hpp:27
Generated by
1.9.8