OptiPack  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Related Functions | List of all members
OptiPack::NonlinearCG< Scalar > Class Template Reference

Concrete class implementing several nonlinear CG algorithms. More...

#include <OptiPack_NonlinearCG_decl.hpp>

Inheritance diagram for OptiPack::NonlinearCG< Scalar >:
Inheritance graph
[legend]

Public Types

typedef ScalarTraits< Scalar >
::magnitudeType 
ScalarMag
 

Related Functions

(Note that these are not member functions.)

template<typename Scalar >
const RCP< NonlinearCG< Scalar > > nonlinearCG ()
 Nonmember constructor. More...
 
template<typename Scalar >
const RCP< NonlinearCG< Scalar > > nonlinearCG (const RCP< const Thyra::ModelEvaluator< Scalar > > &model, const int paramIndex, const int responseIndex, const RCP< GlobiPack::LineSearchBase< Scalar > > &linesearch)
 Nonmember constructor. More...
 

Constructor/Initializers/Accessors

 NonlinearCG ()
 Construct with default parameters. More...
 
void initialize (const RCP< const Thyra::ModelEvaluator< Scalar > > &model, const int paramIndex, const int responseIndex, const RCP< GlobiPack::LineSearchBase< Scalar > > &linesearch)
 Initialize. More...
 
NonlinearCGUtils::ESolverTypes get_solverType () const
 
ScalarMag get_alpha_init () const
 
bool get_alpha_reinit () const
 
bool get_and_conv_tests () const
 
int get_minIters () const
 
int get_maxIters () const
 
ScalarMag get_g_reduct_tol () const
 
ScalarMag get_g_grad_tol () const
 
ScalarMag get_g_mag () const
 

Overridden from ParameterListAcceptor (simple forwarding functions)

void setParameterList (RCP< ParameterList > const &paramList)
 
RCP< const ParameterListgetValidParameters () const
 

Solve.

NonlinearCGUtils::ESolveReturn doSolve (const Ptr< Thyra::VectorBase< Scalar > > &p, const Ptr< ScalarMag > &g_opt, const Ptr< const ScalarMag > &g_reduct_tol=Teuchos::null, const Ptr< const ScalarMag > &g_grad_tol=Teuchos::null, const Ptr< const ScalarMag > &alpha_init=Teuchos::null, const Ptr< int > &numIters=Teuchos::null)
 Perform a solve. More...
 

Detailed Description

template<typename Scalar>
class OptiPack::NonlinearCG< Scalar >

Concrete class implementing several nonlinear CG algorithms.

ToDo: Finish Documentation!

Definition at line 88 of file OptiPack_NonlinearCG_decl.hpp.

Member Typedef Documentation

template<typename Scalar>
typedef ScalarTraits<Scalar>::magnitudeType OptiPack::NonlinearCG< Scalar >::ScalarMag

Definition at line 96 of file OptiPack_NonlinearCG_decl.hpp.

Constructor & Destructor Documentation

template<typename Scalar >
OptiPack::NonlinearCG< Scalar >::NonlinearCG ( )

Construct with default parameters.

Definition at line 70 of file OptiPack_NonlinearCG_def.hpp.

Member Function Documentation

template<typename Scalar>
void OptiPack::NonlinearCG< Scalar >::initialize ( const RCP< const Thyra::ModelEvaluator< Scalar > > &  model,
const int  paramIndex,
const int  responseIndex,
const RCP< GlobiPack::LineSearchBase< Scalar > > &  linesearch 
)

Initialize.

Definition at line 87 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar >
NonlinearCGUtils::ESolverTypes OptiPack::NonlinearCG< Scalar >::get_solverType ( ) const

Definition at line 103 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar >
NonlinearCG< Scalar >::ScalarMag OptiPack::NonlinearCG< Scalar >::get_alpha_init ( ) const

Definition at line 111 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar >
bool OptiPack::NonlinearCG< Scalar >::get_alpha_reinit ( ) const

Definition at line 118 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar >
bool OptiPack::NonlinearCG< Scalar >::get_and_conv_tests ( ) const

Definition at line 125 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar >
int OptiPack::NonlinearCG< Scalar >::get_minIters ( ) const

Definition at line 132 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar >
int OptiPack::NonlinearCG< Scalar >::get_maxIters ( ) const

Definition at line 139 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar >
NonlinearCG< Scalar >::ScalarMag OptiPack::NonlinearCG< Scalar >::get_g_reduct_tol ( ) const

Definition at line 147 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar >
NonlinearCG< Scalar >::ScalarMag OptiPack::NonlinearCG< Scalar >::get_g_grad_tol ( ) const

Definition at line 155 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar >
NonlinearCG< Scalar >::ScalarMag OptiPack::NonlinearCG< Scalar >::get_g_mag ( ) const

Definition at line 163 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar >
void OptiPack::NonlinearCG< Scalar >::setParameterList ( RCP< ParameterList > const &  paramList)
virtual

Implements Teuchos::ParameterListAcceptor.

Definition at line 173 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar >
RCP< const ParameterList > OptiPack::NonlinearCG< Scalar >::getValidParameters ( ) const
virtual

Reimplemented from Teuchos::ParameterListAcceptor.

Definition at line 203 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar>
NonlinearCGUtils::ESolveReturn OptiPack::NonlinearCG< Scalar >::doSolve ( const Ptr< Thyra::VectorBase< Scalar > > &  p,
const Ptr< ScalarMag > &  g_opt,
const Ptr< const ScalarMag > &  g_reduct_tol = Teuchos::null,
const Ptr< const ScalarMag > &  g_grad_tol = Teuchos::null,
const Ptr< const ScalarMag > &  alpha_init = Teuchos::null,
const Ptr< int > &  numIters = Teuchos::null 
)

Perform a solve.

Parameters
p[in/out] On input p is the initial guess for the solution. On output, will be the final estimate for the solution.
g_opt[out] On output, *g_opt will be set to the final value of the objective function.
tol[in] If !is_null(tol), then *tol will be the tolerance used to determine the convergence of the algorithm by comparing to norm(g_grad) (where norm(...) is the natural norm defined by the vector spaces scalar product). If is_null(tol), then the tolerance will be determined in some other way.
alpha_init[in] If !is_null(alpha_init), then *alpha_init will be the initial line search step length on the very first nonlinear CG iteration. If is_null(alpha_init), the initial step length will be determined automatically.
numIters[out] If nonnull(numIters), then on output *numIters gives the number of iterations taken by the algorithm.
Returns
Returns true if the solution was found. Returns false if a line search failure is encountered.

Definition at line 257 of file OptiPack_NonlinearCG_def.hpp.

Friends And Related Function Documentation

template<typename Scalar >
const RCP< NonlinearCG< Scalar > > nonlinearCG ( )
related

Nonmember constructor.

Definition at line 218 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar >
const RCP< NonlinearCG< Scalar > > nonlinearCG ( const RCP< const Thyra::ModelEvaluator< Scalar > > &  model,
const int  paramIndex,
const int  responseIndex,
const RCP< GlobiPack::LineSearchBase< Scalar > > &  linesearch 
)
related

Nonmember constructor.

Definition at line 230 of file OptiPack_NonlinearCG_decl.hpp.


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