Thyra Version of the Day
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Thyra::DampenedNewtonNonlinearSolver< Scalar > Class Template Reference

Simple dampended Newton solver using a Armijo line search :-) More...

#include <Thyra_DampenedNewtonNonlinearSolver.hpp>

Inheritance diagram for Thyra::DampenedNewtonNonlinearSolver< Scalar >:
Inheritance graph
[legend]

Public Types

typedef Teuchos::ScalarTraits< Scalar > ST
 
typedef ST::magnitudeType ScalarMag
 
typedef Teuchos::ScalarTraits< ScalarMagSMT
 

Public Member Functions

 STANDARD_MEMBER_COMPOSITION_MEMBERS (ScalarMag, defaultTol)
 The default solution tolerance.
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (int, defaultMaxNewtonIterations)
 The default maximum number of iterations.
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (bool, useDampenedLineSearch)
 The default maximum number of iterations.
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (Scalar, armijoConstant)
 Set the armijo constant for the line search.
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (int, maxLineSearchIterations)
 Set the maximum number of backtracking line search iterations to take.
 
 DampenedNewtonNonlinearSolver (const ScalarMag defaultTol=1e-2, const int defaultMaxNewtonIterations=1000, const bool useDampenedLineSearch=true, const Scalar armijoConstant=1e-4, const int maxLineSearchIterations=20)
 
- Public Member Functions inherited from Thyra::NonlinearSolverBase< Scalar >
virtual bool supportsCloning () const
 Return if this solver object supports cloning or not.
 
virtual RCP< NonlinearSolverBase< Scalar > > cloneNonlinearSolver () const
 Clone the solver algorithm if supported.
 

Static Public Member Functions

static RCP< const Teuchos::ParameterListgetValidSolveCriteriaExtraParameters ()
 

Overridden from NonlinearSolverBase

void setModel (const RCP< const ModelEvaluator< Scalar > > &model)
 
RCP< const ModelEvaluator< Scalar > > getModel () const
 
SolveStatus< Scalar > solve (VectorBase< Scalar > *x, const SolveCriteria< Scalar > *solveCriteria, VectorBase< Scalar > *delta)
 
RCP< const VectorBase< Scalar > > get_current_x () const
 
bool is_W_current () const
 
RCP< LinearOpWithSolveBase< Scalar > > get_nonconst_W (const bool forceUpToDate)
 
RCP< const LinearOpWithSolveBase< Scalar > > get_W () const
 
void set_W_is_current (bool W_is_current)
 

Overridden from ParameterListAcceptor

void setParameterList (RCP< Teuchos::ParameterList > const &paramList)
 
RCP< Teuchos::ParameterListgetNonconstParameterList ()
 
RCP< Teuchos::ParameterListunsetParameterList ()
 
RCP< const Teuchos::ParameterListgetParameterList () const
 
RCP< const Teuchos::ParameterListgetValidParameters () const
 

Additional Inherited Members

Detailed Description

template<class Scalar>
class Thyra::DampenedNewtonNonlinearSolver< Scalar >

Simple dampended Newton solver using a Armijo line search :-)

This class derives from Teuchos::VerboseObject and therefore will send output to *this->getOStream() if !Teuchos::isNull(this->getOStream()). The amount of output sent to *this->getOStream() depends on the verbosity level returned by this->getVerbLevel():

ToDo: Finish documentation.

Definition at line 80 of file Thyra_DampenedNewtonNonlinearSolver.hpp.

Member Typedef Documentation

◆ ST

template<class Scalar >
typedef Teuchos::ScalarTraits<Scalar> Thyra::DampenedNewtonNonlinearSolver< Scalar >::ST

Definition at line 84 of file Thyra_DampenedNewtonNonlinearSolver.hpp.

◆ ScalarMag

template<class Scalar >
typedef ST::magnitudeType Thyra::DampenedNewtonNonlinearSolver< Scalar >::ScalarMag

Definition at line 86 of file Thyra_DampenedNewtonNonlinearSolver.hpp.

◆ SMT

template<class Scalar >
typedef Teuchos::ScalarTraits<ScalarMag> Thyra::DampenedNewtonNonlinearSolver< Scalar >::SMT

Definition at line 88 of file Thyra_DampenedNewtonNonlinearSolver.hpp.

Constructor & Destructor Documentation

◆ DampenedNewtonNonlinearSolver()

template<class Scalar >
Thyra::DampenedNewtonNonlinearSolver< Scalar >::DampenedNewtonNonlinearSolver ( const ScalarMag defaultTol = 1e-2,
const int defaultMaxNewtonIterations = 1000,
const bool useDampenedLineSearch = true,
const Scalar armijoConstant = 1e-4,
const int maxLineSearchIterations = 20 )

Definition at line 176 of file Thyra_DampenedNewtonNonlinearSolver.hpp.

Member Function Documentation

◆ STANDARD_MEMBER_COMPOSITION_MEMBERS() [1/5]

template<class Scalar >
Thyra::DampenedNewtonNonlinearSolver< Scalar >::STANDARD_MEMBER_COMPOSITION_MEMBERS ( ScalarMag ,
defaultTol  )

The default solution tolerance.

◆ STANDARD_MEMBER_COMPOSITION_MEMBERS() [2/5]

template<class Scalar >
Thyra::DampenedNewtonNonlinearSolver< Scalar >::STANDARD_MEMBER_COMPOSITION_MEMBERS ( int ,
defaultMaxNewtonIterations  )

The default maximum number of iterations.

◆ STANDARD_MEMBER_COMPOSITION_MEMBERS() [3/5]

template<class Scalar >
Thyra::DampenedNewtonNonlinearSolver< Scalar >::STANDARD_MEMBER_COMPOSITION_MEMBERS ( bool ,
useDampenedLineSearch  )

The default maximum number of iterations.

◆ STANDARD_MEMBER_COMPOSITION_MEMBERS() [4/5]

template<class Scalar >
Thyra::DampenedNewtonNonlinearSolver< Scalar >::STANDARD_MEMBER_COMPOSITION_MEMBERS ( Scalar ,
armijoConstant  )

Set the armijo constant for the line search.

◆ STANDARD_MEMBER_COMPOSITION_MEMBERS() [5/5]

template<class Scalar >
Thyra::DampenedNewtonNonlinearSolver< Scalar >::STANDARD_MEMBER_COMPOSITION_MEMBERS ( int ,
maxLineSearchIterations  )

Set the maximum number of backtracking line search iterations to take.

◆ getValidSolveCriteriaExtraParameters()

template<class Scalar >
RCP< const Teuchos::ParameterList > Thyra::DampenedNewtonNonlinearSolver< Scalar >::getValidSolveCriteriaExtraParameters ( )
static

Definition at line 193 of file Thyra_DampenedNewtonNonlinearSolver.hpp.

◆ setParameterList()

template<class Scalar >
void Thyra::DampenedNewtonNonlinearSolver< Scalar >::setParameterList ( RCP< Teuchos::ParameterList > const & paramList)
virtual

◆ getNonconstParameterList()

template<class Scalar >
RCP< Teuchos::ParameterList > Thyra::DampenedNewtonNonlinearSolver< Scalar >::getNonconstParameterList ( )
virtual

◆ unsetParameterList()

template<class Scalar >
RCP< Teuchos::ParameterList > Thyra::DampenedNewtonNonlinearSolver< Scalar >::unsetParameterList ( )
virtual

◆ getParameterList()

template<class Scalar >
RCP< const Teuchos::ParameterList > Thyra::DampenedNewtonNonlinearSolver< Scalar >::getParameterList ( ) const
virtual

Reimplemented from Teuchos::ParameterListAcceptor.

Definition at line 241 of file Thyra_DampenedNewtonNonlinearSolver.hpp.

◆ getValidParameters()

template<class Scalar >
RCP< const Teuchos::ParameterList > Thyra::DampenedNewtonNonlinearSolver< Scalar >::getValidParameters ( ) const
virtual

Reimplemented from Teuchos::ParameterListAcceptor.

Definition at line 248 of file Thyra_DampenedNewtonNonlinearSolver.hpp.

◆ setModel()

template<class Scalar >
void Thyra::DampenedNewtonNonlinearSolver< Scalar >::setModel ( const RCP< const ModelEvaluator< Scalar > > & model)
virtual

◆ getModel()

template<class Scalar >
RCP< const ModelEvaluator< Scalar > > Thyra::DampenedNewtonNonlinearSolver< Scalar >::getModel ( ) const
virtual

◆ solve()

template<class Scalar >
SolveStatus< Scalar > Thyra::DampenedNewtonNonlinearSolver< Scalar >::solve ( VectorBase< Scalar > * x,
const SolveCriteria< Scalar > * solveCriteria,
VectorBase< Scalar > * delta )
virtual

◆ get_current_x()

template<class Scalar >
RCP< const VectorBase< Scalar > > Thyra::DampenedNewtonNonlinearSolver< Scalar >::get_current_x ( ) const
virtual

Reimplemented from Thyra::NonlinearSolverBase< Scalar >.

Definition at line 490 of file Thyra_DampenedNewtonNonlinearSolver.hpp.

◆ is_W_current()

template<class Scalar >
bool Thyra::DampenedNewtonNonlinearSolver< Scalar >::is_W_current ( ) const
virtual

Reimplemented from Thyra::NonlinearSolverBase< Scalar >.

Definition at line 496 of file Thyra_DampenedNewtonNonlinearSolver.hpp.

◆ get_nonconst_W()

template<class Scalar >
RCP< LinearOpWithSolveBase< Scalar > > Thyra::DampenedNewtonNonlinearSolver< Scalar >::get_nonconst_W ( const bool forceUpToDate)
virtual

Reimplemented from Thyra::NonlinearSolverBase< Scalar >.

Definition at line 503 of file Thyra_DampenedNewtonNonlinearSolver.hpp.

◆ get_W()

template<class Scalar >
RCP< const LinearOpWithSolveBase< Scalar > > Thyra::DampenedNewtonNonlinearSolver< Scalar >::get_W ( ) const
virtual

Reimplemented from Thyra::NonlinearSolverBase< Scalar >.

Definition at line 513 of file Thyra_DampenedNewtonNonlinearSolver.hpp.

◆ set_W_is_current()

template<class Scalar >
void Thyra::DampenedNewtonNonlinearSolver< Scalar >::set_W_is_current ( bool W_is_current)
virtual

Reimplemented from Thyra::NonlinearSolverBase< Scalar >.

Definition at line 519 of file Thyra_DampenedNewtonNonlinearSolver.hpp.


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