ROL
src
step
trustregion
ROL_TrustRegionFactory.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_TRUSTREGIONFACTORY_H
11
#define ROL_TRUSTREGIONFACTORY_H
12
13
#include "
ROL_Types.hpp
"
14
15
#include "ROL_ParameterList.hpp"
16
#include "ROL_Ptr.hpp"
17
18
#include "
ROL_TrustRegion.hpp
"
19
#include "
ROL_CauchyPoint.hpp
"
20
#include "
ROL_DogLeg.hpp
"
21
#include "
ROL_DoubleDogLeg.hpp
"
22
#include "
ROL_TruncatedCG.hpp
"
23
#include "
ROL_LinMore.hpp
"
24
25
namespace
ROL
{
26
template
<
class
Real>
27
inline
ROL::Ptr<TrustRegion<Real> >
TrustRegionFactory
(ROL::ParameterList &parlist) {
28
ETrustRegion
etr =
StringToETrustRegion
(
29
parlist.sublist(
"Step"
).sublist(
"Trust Region"
).get(
"Subproblem Solver"
,
"Dogleg"
));
30
switch
(etr) {
31
case
TRUSTREGION_CAUCHYPOINT
:
return
ROL::makePtr<CauchyPoint<Real>>(parlist);
32
case
TRUSTREGION_DOGLEG
:
return
ROL::makePtr<DogLeg<Real>>(parlist);
33
case
TRUSTREGION_DOUBLEDOGLEG
:
return
ROL::makePtr<DoubleDogLeg<Real>>(parlist);
34
case
TRUSTREGION_TRUNCATEDCG
:
return
ROL::makePtr<TruncatedCG<Real>>(parlist);
35
case
TRUSTREGION_LINMORE
:
return
ROL::makePtr<LinMore<Real>>(parlist);
36
default
:
return
ROL::nullPtr;
37
}
38
}
39
}
40
41
#endif
ROL_CauchyPoint.hpp
ROL_DogLeg.hpp
ROL_DoubleDogLeg.hpp
ROL_LinMore.hpp
ROL_TruncatedCG.hpp
ROL_TrustRegion.hpp
ROL_Types.hpp
Contains definitions of custom data types in ROL.
ROL
Definition
ROL_ElementwiseVector.hpp:27
ROL::StringToETrustRegion
ETrustRegion StringToETrustRegion(std::string s)
Definition
ROL_TrustRegionTypes.hpp:87
ROL::ETrustRegion
ETrustRegion
Definition
ROL_TrustRegionTypes.hpp:30
ROL::TRUSTREGION_DOGLEG
@ TRUSTREGION_DOGLEG
Definition
ROL_TrustRegionTypes.hpp:33
ROL::TRUSTREGION_LINMORE
@ TRUSTREGION_LINMORE
Definition
ROL_TrustRegionTypes.hpp:35
ROL::TRUSTREGION_DOUBLEDOGLEG
@ TRUSTREGION_DOUBLEDOGLEG
Definition
ROL_TrustRegionTypes.hpp:34
ROL::TRUSTREGION_CAUCHYPOINT
@ TRUSTREGION_CAUCHYPOINT
Definition
ROL_TrustRegionTypes.hpp:31
ROL::TRUSTREGION_TRUNCATEDCG
@ TRUSTREGION_TRUNCATEDCG
Definition
ROL_TrustRegionTypes.hpp:32
ROL::TrustRegionFactory
ROL::Ptr< TrustRegion< Real > > TrustRegionFactory(ROL::ParameterList &parlist)
Definition
ROL_TrustRegionFactory.hpp:27
Generated by
1.9.8