|
NOX Development
|
Use NonlinearCG linesearch. More...
#include <NOX_LineSearch_NonlinearCG.H>


Public Member Functions | |
| NonlinearCG (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList ¶ms) | |
| Constructor. | |
| ~NonlinearCG () | |
| Destructor. | |
| bool | reset (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList ¶ms) |
| bool | compute (NOX::Abstract::Group &newgrp, double &step, const NOX::Abstract::Vector &dir, const NOX::Solver::Generic &s) |
| Perform a line search. | |
Public Member Functions inherited from NOX::LineSearch::Generic | |
| Generic () | |
| Default constructor. | |
| virtual | ~Generic () |
| Destructor. | |
Use NonlinearCG linesearch.
This is a simple linesearch intended to be used with NOX::Direction::NonlinearCG, which provides search direction 



![\[
\lambda = - \frac{F(x_{old})^T d}{d^T J(x_{old})d}
\]](form_126.png)
where 


![\[
J(x_{old})d \approx \frac{F(x_{old} + \delta d) - F(x_{old})}{\delta}
\]](form_129.png)
where 
Derivation / Theory:
This linesearch is derived by attempting to achieve in a single step, the following minimization:
![\[
\min_\lambda \phi(\lambda)\equiv\phi (x_{old}+ \lambda d)
\]](form_131.png)
where 

![\[
\phi ' (\lambda) = \nabla\phi (x_{old}+ \lambda d)^T d =
F(x_{old}+ \lambda d)^T d = 0~~.
\]](form_134.png)
An approximate solution to this equation can be obtained from a second-order expansion of
![\[ \phi(\lambda) \]](form_135.png)
,
![\[
\phi(\lambda)\approx\phi (0) + \phi ' (0)\lambda + \phi '' (0)
\frac{\lambda^2}{2}
\]](form_136.png)
from which it immediately follows
![\[
\%lambda_{min} \approx - \frac{\phi ' (0)}{\phi '' (0)} =
- \frac{F(x_{old})^T d}{d^T J(x_{old})d}
\]](form_137.png)
Input Parameters
The NonlinearCG linesearch is selected using:
"Line Search"
"Method" = "%NonlinearCG" [required]
Currently, no adjustable parameters exist for this linesarch.
References
linesearch is adapted from ideas presented in Section 14.2 of:
|
virtual |
Perform a line search.
On input:
| grp | The initial solution vector, |
| dir | A vector of directions to be used in the line search, |
| s | The nonlinear solver. |
On output:
| step | The distance the direction was scaled, |
| grp | The grp is updated with a new solution, |
![\[
x_{\rm new} = x_{\rm old} + \lambda d.
\]](form_110.png)
Ideally, 
Note that the dir object is a std::vector. For typical line searches as described in the above equation, this vector is of size one. We have used a std::vector to allow for special cases of multi-directional line searches such as the Bader/Schnabel curvillinear line search.
Return value is true for a successful line search computation.
Implements NOX::LineSearch::Generic.
References NOX::Abstract::Group::computeF(), NOX::Abstract::Group::computeX(), NOX::Utils::fill(), NOX::Abstract::Group::getF(), NOX::Solver::Generic::getPreviousSolutionGroup(), NOX::Utils::InnerIteration, and NOX::Abstract::Vector::innerProduct().