OptiPack Package Browser (Single Doxygen Collection) Version of the Day
Public Types | Private Attributes | Static Private Attributes | Related Functions
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]

List of all members.

Public Types

typedef ScalarTraits< Scalar >
::magnitudeType 
ScalarMag
 

Private Attributes

RCP< const
Thyra::ModelEvaluator< Scalar > > 
model_
int paramIndex_
int responseIndex_
RCP< GlobiPack::LineSearchBase
< Scalar > > 
linesearch_
NonlinearCGUtils::ESolverTypes solverType_
ScalarMag alpha_init_
bool alpha_reinit_
bool and_conv_tests_
int minIters_
int maxIters_
ScalarMag g_reduct_tol_
ScalarMag g_grad_tol_
ScalarMag g_mag_
int numIters_

Static Private Attributes

static RCP
< Teuchos::ParameterEntryValidator
solverType_validator_ = Teuchos::null

Related Functions

(Note that these are not member functions.)

template<typename Scalar >
const RCP< NonlinearCG< Scalar > > nonlinearCG ()
 Nonmember constructor.
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.

Constructor/Initializers/Accessors

 NonlinearCG ()
 Construct with default parameters.
void initialize (const RCP< const Thyra::ModelEvaluator< Scalar > > &model, const int paramIndex, const int responseIndex, const RCP< GlobiPack::LineSearchBase< Scalar > > &linesearch)
 Initialize.
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.

Detailed Description

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

Concrete class implementing several nonlinear CG algorithms.

ToDo: Finish Documentation!

Definition at line 75 of file OptiPack_NonlinearCG_decl.hpp.


Member Typedef Documentation

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

Definition at line 83 of file OptiPack_NonlinearCG_decl.hpp.


Constructor & Destructor Documentation

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

Construct with default parameters.

Definition at line 57 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 74 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 90 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 98 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 105 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 112 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 119 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 126 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 134 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 142 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 150 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 160 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 190 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 244 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 205 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 217 of file OptiPack_NonlinearCG_decl.hpp.


Member Data Documentation

template<typename Scalar>
RCP<const Thyra::ModelEvaluator<Scalar> > OptiPack::NonlinearCG< Scalar >::model_ [private]

Definition at line 176 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
int OptiPack::NonlinearCG< Scalar >::paramIndex_ [private]

Definition at line 177 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
int OptiPack::NonlinearCG< Scalar >::responseIndex_ [private]

Definition at line 178 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
RCP<GlobiPack::LineSearchBase<Scalar> > OptiPack::NonlinearCG< Scalar >::linesearch_ [private]

Definition at line 179 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
NonlinearCGUtils::ESolverTypes OptiPack::NonlinearCG< Scalar >::solverType_ [private]

Definition at line 181 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
ScalarMag OptiPack::NonlinearCG< Scalar >::alpha_init_ [private]

Definition at line 182 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
bool OptiPack::NonlinearCG< Scalar >::alpha_reinit_ [private]

Definition at line 183 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
bool OptiPack::NonlinearCG< Scalar >::and_conv_tests_ [private]

Definition at line 184 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
int OptiPack::NonlinearCG< Scalar >::minIters_ [private]

Definition at line 185 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
int OptiPack::NonlinearCG< Scalar >::maxIters_ [private]

Definition at line 186 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
ScalarMag OptiPack::NonlinearCG< Scalar >::g_reduct_tol_ [private]

Definition at line 187 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
ScalarMag OptiPack::NonlinearCG< Scalar >::g_grad_tol_ [private]

Definition at line 188 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
ScalarMag OptiPack::NonlinearCG< Scalar >::g_mag_ [private]

Definition at line 189 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
int OptiPack::NonlinearCG< Scalar >::numIters_ [mutable, private]

Definition at line 191 of file OptiPack_NonlinearCG_decl.hpp.

template<typename Scalar>
RCP< Teuchos::ParameterEntryValidator > OptiPack::NonlinearCG< Scalar >::solverType_validator_ = Teuchos::null [static, private]

Definition at line 194 of file OptiPack_NonlinearCG_decl.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends