PlayaNewtonArmijoSolverDecl.hpp
Go to the documentation of this file.
00001 /* @HEADER@ */
00002 //   
00003 /* @HEADER@ */
00004 
00005 #ifndef PLAYA_NEWTON_ARMIJO_SOLVER_DECL_HPP
00006 #define PLAYA_NEWTON_ARMIJO_SOLVER_DECL_HPP
00007 
00008 #include "PlayaDefs.hpp"
00009 #include "PlayaNonlinearSolverBase.hpp"
00010 #include "PlayaLinearSolverDecl.hpp"
00011 #include "Teuchos_ScalarTraits.hpp"
00012 
00013 namespace Playa
00014 {
00015 using namespace Teuchos;
00016 
00017 /**
00018  * Playa implementation of Newton's method with Armijo line search.
00019  *
00020  * The solver's behavior is controlled by parameters in a ParameterList.
00021  * <ul>
00022  * <li> Scalar "Tau Relative" tolerance for relative error. Default value: 10 times machine epsilon
00023  * <li> Scalar "Tau Absolute" tolerance for absolute error. Default value 10 times machine epsilon
00024  * <li> Scalar "Alpha" constant in Armijo sufficient decrease condition. Default value 1.0e-4
00025  * <li> double "Step Reduction" factor by which to reduce step during line search. Default value: 0.5 
00026  * <li> int "Max Iterations" number of iterations to allow before failure. Default value 20.
00027  * <li> int "Max Backtracks" number of step reductions to allow before failure. Default value 20.
00028  * <li> int "Verbosity" amount of diagnostic output. Default value 0.
00029  * </ul>
00030  */
00031 template <class Scalar>
00032 class NewtonArmijoSolver : public NonlinearSolverBase<Scalar> 
00033 {
00034 public:
00035   /** */
00036   typedef typename Teuchos::ScalarTraits<Scalar>::magnitudeType ScalarMag;
00037 
00038   /** */
00039   NewtonArmijoSolver(const ParameterList& params, 
00040     const LinearSolver<Scalar>& linSolver);
00041 
00042   /** */
00043   virtual ~NewtonArmijoSolver(){;}
00044 
00045   /** */
00046   SolverState<Scalar> solve(const NonlinearOperator<Scalar>& F,
00047     Vector<Scalar>& soln) const ;
00048 
00049   /* */
00050   GET_RCP(NonlinearSolverBase<Scalar>);
00051 
00052 private:
00053   LinearSolver<Scalar> linSolver_;
00054   ScalarMag tauR_;
00055   ScalarMag tauA_;
00056   ScalarMag alpha_;
00057   ScalarMag stepReduction_;
00058   int maxIters_;
00059   int maxLineSearch_;
00060   int verb_;
00061     
00062 };
00063 
00064   
00065 }
00066 
00067 #endif

Site Contact