#include <NewtonSolver.hpp>
Inheritance diagram for NewtonSolver< T >:


Public Member Functions | |
| virtual void | PrintParam () |
| Prints the name and parameters of the solver. | |
| virtual void | Run (NonLinSys< T > &p, GridVec< T > &u) |
| Solves a given non-linear system. | |
| NewtonSolver (unsigned the_disp_type, double the_reduction, unsigned the_max_iter, double the_abs_prec, SysMatrix< T > &the_Jac, LinSolver< T > &the_lin_solver, NewtonLineSearch< T > *the_line_search=NULL, T the_damp=1) | |
| For hard-coded paramters. | |
| NewtonSolver (SGParam *list, SysMatrix< T > &the_Jac, LinSolver< T > &the_lin_solver, NewtonLineSearch< T > *the_line_search=NULL) | |
| Constructor for reading the halting criteria from SG parameters. | |
This class implements the Newton method and similar iterations (like the fixed-point iteration or the Quasi-Newton methods). Which iteration it is, depends on the approximation of the Jacobian computed by the object of the NonLinSys<T> class representing the non-linear system.
For non-linear system
, the iteration computes guesses
using the recurrence
, where
is the approximation of the Jacobian for the guess
and
is the damping factor chosen by the line-searche strategy. If no line-search strategy is specifyed,
.
Note that in general, the Newton method is not convergent. You need also a line-search strategy. Nevertheless, specification of a line-search strategy is optional.
The templates depend on a type T. This type should satisfy the conditions listed in 'small_matrix.hpp' for small matrices.
Additionally we check whether the damping factor (of type 'T') is equal to '1'. This is done for the efficiency only and it is OK if this condition is always false. But it should be allowed by the syntax. Besides, 1 is the default value of the 'damp' parameter of the Newton solver class.
| NewtonSolver< T >::NewtonSolver | ( | unsigned | the_disp_type, | |
| double | the_reduction, | |||
| unsigned | the_max_iter, | |||
| double | the_abs_prec, | |||
| SysMatrix< T > & | the_Jac, | |||
| LinSolver< T > & | the_lin_solver, | |||
| NewtonLineSearch< T > * | the_line_search = NULL, |
|||
| T | the_damp = 1 | |||
| ) | [inline] |
For hard-coded paramters.
| [in] | the_disp_type | The display type |
| [in] | the_reduction | The desired reduction (0 to do 'max_iter' iter.) |
| [in] | the_max_iter | The maximum number of iterations |
| [in] | the_abs_prec | The minimum norm of the residual |
| [in] | the_Jac | Matrix hierarchy for the Jacobian |
| [in] | the_lin_solver | The linear solver for the Jacobian |
| [in] | the_line_search | The line search strategy |
| [in] | the_damp | The initial damping factor |
| NewtonSolver< T >::NewtonSolver | ( | SGParam * | list, | |
| SysMatrix< T > & | the_Jac, | |||
| LinSolver< T > & | the_lin_solver, | |||
| NewtonLineSearch< T > * | the_line_search = NULL | |||
| ) | [inline] |
Constructor for reading the halting criteria from SG parameters.
The parameter names are:
| [in] | list | The list of the parameters |
| [in] | the_Jac | Matrix hierarchy for the Jacobian |
| [in] | the_lin_solver | The linear solver for the Jacobian |
| [in] | the_line_search | The line search strategy |
| void NewtonSolver< T >::PrintParam | ( | ) | [inline, virtual] |
| void NewtonSolver< T >::Run | ( | NonLinSys< T > & | p, | |
| GridVec< T > & | u | |||
| ) | [inline, virtual] |
Solves a given non-linear system.
| [in] | p | The non-linear system to solve |
| [in] | u | The initial guess and the solution |
Implements NonLinSolver< T >.
1.5.2