ROL
ROL::Solver< Real > Class Template Reference

Provides a simplified interface for solving a wide range of optimization problems. More...

#include <ROL_Solver.hpp>

Public Member Functions

 Solver (const Ptr< Problem< Real > > &opt, ParameterList &list, const Ptr< Secant< Real > > &secant=nullPtr)
 Constructor.
int solve (const Ptr< StatusTest< Real > > &status=nullPtr, bool combineStatus=true)
 Solve optimization problem with no iteration output.
int solve (std::ostream &outStream, const Ptr< StatusTest< Real > > &status=nullPtr, bool combineStatus=true)
 Solve optimization problem.
Ptr< const AlgorithmState< Real > > getAlgorithmState () const
 Return the AlgorithmState.
void reset ()
 Reset both Algorithm and Step.

Private Attributes

const Ptr< Problem< Real > > opt_
const EProblem problemType_
Ptr< TypeU::Algorithm< Real > > algoU_
Ptr< TypeB::Algorithm< Real > > algoB_
Ptr< TypeE::Algorithm< Real > > algoE_
Ptr< TypeG::Algorithm< Real > > algoG_
Ptr< TypeP::Algorithm< Real > > algoP_

Detailed Description

template<typename Real>
class ROL::Solver< Real >

Provides a simplified interface for solving a wide range of optimization problems.

Definition at line 31 of file ROL_Solver.hpp.

Constructor & Destructor Documentation

◆ Solver()

template<typename Real>
ROL::Solver< Real >::Solver ( const Ptr< Problem< Real > > & opt,
ParameterList & list,
const Ptr< Secant< Real > > & secant = nullPtr )

Member Function Documentation

◆ solve() [1/2]

template<typename Real>
int ROL::Solver< Real >::solve ( const Ptr< StatusTest< Real > > & status = nullPtr,
bool combineStatus = true )

Solve optimization problem with no iteration output.

Parameters
[in]statusis a user-defined StatusTest
[in]combineStatusif true, the user-defined StatusTest will be combined with the default StatusTest

Definition at line 33 of file ROL_Solver_Def.hpp.

References solve().

Referenced by main().

◆ solve() [2/2]

template<typename Real>
int ROL::Solver< Real >::solve ( std::ostream & outStream,
const Ptr< StatusTest< Real > > & status = nullPtr,
bool combineStatus = true )

Solve optimization problem.

Parameters
[in]outStreamis the output stream to collect iteration history
[in]statusis a user-defined StatusTest
[in]combineStatusif true, the user-defined StatusTest will be combined with the default StatusTest

Definition at line 40 of file ROL_Solver_Def.hpp.

References algoB_, algoE_, algoG_, algoP_, algoU_, opt_, problemType_, ROL::TYPE_B, ROL::TYPE_E, ROL::TYPE_EB, ROL::TYPE_LAST, ROL::TYPE_P, and ROL::TYPE_U.

◆ getAlgorithmState()

template<typename Real>
Ptr< const AlgorithmState< Real > > ROL::Solver< Real >::getAlgorithmState ( ) const

◆ reset()

template<typename Real>
void ROL::Solver< Real >::reset ( )

Reset both Algorithm and Step.

This function will reset the AlgorithmState and reinitialize the Step. This function does not permit changing the Step specified upon construction. To change the Step, reinitialize the OptimizationSolver.


Definition at line 92 of file ROL_Solver_Def.hpp.

References algoB_, algoE_, algoG_, algoP_, algoU_, problemType_, ROL::TYPE_B, ROL::TYPE_E, ROL::TYPE_EB, ROL::TYPE_LAST, ROL::TYPE_P, and ROL::TYPE_U.

Member Data Documentation

◆ opt_

template<typename Real>
const Ptr<Problem<Real> > ROL::Solver< Real >::opt_
private

Definition at line 34 of file ROL_Solver.hpp.

Referenced by solve(), and Solver().

◆ problemType_

template<typename Real>
const EProblem ROL::Solver< Real >::problemType_
private

Definition at line 35 of file ROL_Solver.hpp.

Referenced by getAlgorithmState(), reset(), solve(), and Solver().

◆ algoU_

template<typename Real>
Ptr<TypeU::Algorithm<Real> > ROL::Solver< Real >::algoU_
private

Definition at line 37 of file ROL_Solver.hpp.

Referenced by getAlgorithmState(), reset(), solve(), and Solver().

◆ algoB_

template<typename Real>
Ptr<TypeB::Algorithm<Real> > ROL::Solver< Real >::algoB_
private

Definition at line 38 of file ROL_Solver.hpp.

Referenced by getAlgorithmState(), reset(), solve(), and Solver().

◆ algoE_

template<typename Real>
Ptr<TypeE::Algorithm<Real> > ROL::Solver< Real >::algoE_
private

Definition at line 39 of file ROL_Solver.hpp.

Referenced by getAlgorithmState(), reset(), solve(), and Solver().

◆ algoG_

template<typename Real>
Ptr<TypeG::Algorithm<Real> > ROL::Solver< Real >::algoG_
private

Definition at line 40 of file ROL_Solver.hpp.

Referenced by getAlgorithmState(), reset(), solve(), and Solver().

◆ algoP_

template<typename Real>
Ptr<TypeP::Algorithm<Real> > ROL::Solver< Real >::algoP_
private

Definition at line 41 of file ROL_Solver.hpp.

Referenced by getAlgorithmState(), reset(), solve(), and Solver().


The documentation for this class was generated from the following files: