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
 

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 (  )  [inline]

Construct with default parameters.

Definition at line 49 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 
) [inline]

Initialize.

Definition at line 66 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 82 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 90 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 97 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 104 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 111 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 118 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 126 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 134 of file OptiPack_NonlinearCG_def.hpp.

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

Definition at line 142 of file OptiPack_NonlinearCG_def.hpp.

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

Implements Teuchos::ParameterListAcceptor.

Definition at line 152 of file OptiPack_NonlinearCG_def.hpp.

template<typename Scalar >
RCP< const ParameterList > OptiPack::NonlinearCG< Scalar >::getValidParameters (  )  const [inline, virtual]

Reimplemented from Teuchos::ParameterListAcceptor.

Definition at line 182 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 
) [inline]

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 236 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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
Generated on Wed Apr 13 10:19:12 2011 for OptiPack by  doxygen 1.6.3