File:NewtonHook.f90: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 11: | Line 11: | ||
== The code == | == The code == | ||
To download, click the link above. | |||
<tt>new_x(:)</tt> and <tt>new_fx(:)</tt> need to be allocated the dimension $n$, and <tt>new_x(:)</tt> assigned the initial guess, prior to calling the subroutine <tt>newtonhook(...)</tt>. The vector <tt>new_x(:)</tt> is updated with improved vectors (smaller <tt>new_f(:)</tt>) as the calculation proceeds. | <tt>new_x(:)</tt> and <tt>new_fx(:)</tt> need to be allocated the dimension $n$, and <tt>new_x(:)</tt> assigned the initial guess, prior to calling the subroutine <tt>newtonhook(...)</tt>. The vector <tt>new_x(:)</tt> is updated with improved vectors (smaller <tt>new_f(:)</tt>) as the calculation proceeds. |
Revision as of 05:46, 13 December 2016
$ \renewcommand{\vec}[1]{ {\bf #1} } \newcommand{\bnabla}{ \vec{\nabla} } \newcommand{\Rey}{Re} \def\vechat#1{ \hat{ \vec{#1} } } \def\mat#1{#1} $
The method
Implements the Newton-Raphson method for solving \[\vec{F}(\vec{x})=\vec{0}\] with a Hookstep-Trust-region approach.
For each iteration, $\vec{x}_{i+1} = \vec{x}_i + \vec{\delta x}$, the linear problem \[\left.\frac{\vec{dF}}{\vec{dx}}\right|_{\vec{x}_i}\vec{\delta x}=-\vec{x}_i \] is solved for the step $\vec{\delta x}$ subject to the condition that it be smaller than some magnitude $\delta$ - the trust region.
In the Newton-Krylov method, solution for $\vec{\delta x}$ is calculated using the Krylov-subspace method, GMRES(m) File:GMRESm.f90.
The code
To download, click the link above.
new_x(:) and new_fx(:) need to be allocated the dimension $n$, and new_x(:) assigned the initial guess, prior to calling the subroutine newtonhook(...). The vector new_x(:) is updated with improved vectors (smaller new_f(:)) as the calculation proceeds.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Dimensions | User | Comment | |
---|---|---|---|---|
current | 04:50, 26 June 2019 | (6 KB) | Apwillis (talk | contribs) | Minor edits in comments only. |
05:32, 13 December 2016 | (6 KB) | Apwillis (talk | contribs) | == The method == Implements the Newton-Raphson method for solving \[\vec{F}(\vec{x})=\vec{0}\] with a Hookstep-Trust-region approach. At each iteration, the linear problem for the step in $\vec{x}$ is solved subject to the condition that the step be ... |
You cannot overwrite this file.
File usage
The following 4 pages use this file: