Public Member Functions | |
def | __init__ |
def | reset |
def | getStatus |
def | step |
def | solve |
def | getSolutionGroup |
def | getPreviousSolutionGroup |
def | getNumIterations |
def | getList |
def | __init__ |
def | reset |
def | getStatus |
def | step |
def | solve |
def | getSolutionGroup |
def | getPreviousSolutionGroup |
def | getNumIterations |
def | getList |
Public Attributes | |
this |
Newton-like solver using a trust region. Our goal is to solve: $ F(x) = 0, $ where $ F:\\Re^n \\rightarrow \\Re^n $. Alternatively, we might say that we wish to solve $ \\min f(x) \\equiv \\frac{1}{2} \\|F(x)\\|^2_2. $ The trust region subproblem (TRSP) at iteration $k$ is given by $ \\min \\; m_k(s) \\equiv f_k + g_k^T d + \\frac{1}{2} d^T B_k d, \\mbox{ s.t. } \\|d\\| \\leq \\Delta_k \\quad \\mbox{(TRSP)} $ where $ f_k = f(x_k) = \\frac{1}{2} \\|F(x_k)\\|^2_2 $, $ g_k = \\nabla f(x_k) = J(x_k)^T F(x_k) $, $ B_k = J(x_k)^T J(x_k) \\approx \\nabla^2 f(x_k) $, $ J(x_k)$ is the Jacobian of $F$ at $x_k$, and $ \\Delta_k $ is the trust region radius. The "improvement ratio" for a given step $ s $ is defined as $ \\rho = \\displaystyle\\frac{ f(x_k) - f(x_k + d) } { m_k(0) - m_k(d) } $ An iteration consists of the following steps. Compute Newton-like direction: $n$ Compute Cauchy-like direction: $c$ If this is the first iteration, initialize $\\Delta$ as follows: If $\\|n\\|_2 < \\Delta_{\\min}$, then $\\Delta = 2 \\Delta_{\\min}$; else, $\\Delta = \\|n\\|_2$. Initialize $\\rho = -1$ While $\\rho < \\rho_{\\min}$ and $\\Delta > \\Delta_{\\min}$, do the following. Compute the direction $d$ as follows: If $\\|n\\|_2 < \\Delta$, then take a Newton step by setting $d = n$ Otherwise if $\\|c\\|_2 > \\Delta$, then take a Cauchy step by setting $d = \\displaystyle\\frac{\\Delta}{\\|c\\|_2} c$ Otherwise, take a Dog Leg step by setting $ d = (1-\\gamma) c + \\gamma n $ where $ \\gamma = \\displaystyle\\frac {-c^T a + \\sqrt{ (c^Ta)^2 - (c^Tc - \\Delta^2) a^Ta}}{a^Ta} $ with $a = n-c$. Set $x_{\\rm new} = x + d$ and calculate $f_{\\rm new}$ If $f_{\\rm new} \\geq f$, then $\\rho = -1$ Otherwise $ \\rho = \\displaystyle \\frac {f - f_{\\rm new}} {| d^T J F + \\frac{1}{2} (J d)^T (J d)|} $ Update the solution: $x = x_{\\rm new}$ Update trust region: If $\\rho < \\rho_{\\rm s}$ and $\\|n\\|_2 < \\Delta$, then shrink the trust region to the size of the Newton step: $\\Delta = \\|n\\|_2$. Otherwise if $\\rho < \\rho_{\\rm s}$, then shrink the trust region: $\\Delta = \\max \\{ \\beta_{\\rm s} \\Delta, \\Delta_{\\min} \\} $. Otherwise if $\\rho > \\rho_{\\rm e}$ and $\\|d\\|_2 = \\Delta$, then expand the trust region: $\\Delta = \\min \\{ \\beta_{\\rm e} \\Delta, \\Delta_{\\rm max} \\} $. Input Paramters The following parameters should be specified in the "Trust Region" sublist based to the solver. "Inner Iteration Method" - Choice of trust region algorithm to use. Choices are: "Standard Trust Region" "Inexact Trust Region" "Direction" - Sublist of the direction parameters for the Newton point, passed to the NOX::Direction::Manager constructor. If this sublist does not exist, it is created by default. Furthermore, if "Method" is not specified in this sublist, it is added with a value of "Newton". "Cauchy %Direction" - Sublist of the direction parameters for the Cauchy point, passed to the NOX::Direction::Manager constructor. If this sublist does not exist, it is created by default. Furthermore, if "Method" is not specified in this sublist, it is added with a value of "Steepest Descent" Finally, if the sub-sublist "Steepest Descent" does not exist, it is created and the parameter "Scaling Type" is added and set to "Quadratic Min Model". "Minimum Trust Region Radius" ( $\\Delta_{\\min}$) - Minimum allowable trust region radius. Defaults to 1.0e-6. "Maximum Trust Region Radius" ( $\\Delta_{\\max}$) - Minimum allowable trust region radius. Defaults to 1.0e+10. "Minimum Improvement Ratio" ( $\\rho_{\\min}$) - Minimum improvement ratio to accept the step. Defaults to 1.0e-4. "Contraction Trigger Ratio" ( $\\rho_{\\rm s}$) - If the improvement ratio is less than this value, then the trust region is contracted by the amount specified by the "Contraction Factor". Must be larger than "Minimum Improvement Ratio". Defaults to 0.1. "Contraction Factor" ( $\\beta_{\\rm s}$) - See above. Defaults to 0.25. "Expansion Trigger Ratio" ( $\\rho_{\\rm e}$) - If the improvement ratio is greater than this value, then the trust region is contracted by the amount specified by the "Expansion Factor". Defaults to 0.75. "Expansion Factor" ( $\\beta_{\\rm e}$) - See above. Defaults to 4.0. "Recovery Step" - Defaults to 1.0. "Use Ared/Pred Ratio Calculation" (boolean) - Defaults to false. If set to true, this option replaces the algorithm used to compute the improvement ratio, $ \\rho $, as described above. The improvement ratio is replaced by an "Ared/Pred" sufficient decrease criteria similar to that used in line search algorithms (see Eisenstat and Walker, SIAM Journal on Optimization V4 no. 2 (1994) pp 393-422): $\\rho = \\frac{\\|F(x) \\| - \\| F(x + d) \\| } {\\| F(x) \\| - \\| F(x) + Jd \\| } $ "Use Cauchy in Newton Direction" - Boolean. Used only by the "Inexact Trust Region" algorithm. If set to true, the initial guess for the Newton direction computation will use the Cauchy direction as the initial guess. Defaults to false. "Use Dogleg Segment Minimization" - Boolean. Used only by the "Inexact Trust Region" algorithm. If set to true, the $ \\tau $ parameter is minimized over the dogleg line segments instead of being computed at the trust regioin radius. Used only by the "Inexact Trust Region" algorithm. Defaults to false. "Use Counters" - Boolean. If set to true, solver statistics will be stored. Defaults to true. "Write Output Parameters" - Boolean. If set to true, the solver statistics will be written to the relevant "Output" sublists (see Output Parameters). Defaults to true. "Solver Options" - Sublist of general solver options. "User Defined Pre/Post Operator" is supported. See NOX::Parameter::PrePostOperator for more details. Output Paramters A sublist called "Output" will be created at the top level of the parameter list and contain the following general solver parameters: "Nonlinear Iterations" - Number of nonlinear iterations "2-Norm or Residual" - Two-norm of final residual A sublist called "Output" will be created in the "Trust Region" sublist and contain the following trust region specific output parameters: "Number of Cauchy Steps" - Number of cauchy steps taken during the solve. "Number of Newton Steps" - Number of Newton steps taken during the solve. "Number of Dogleg Steps" - Number of Dogleg steps taken during the solve. "Number of Trust Region Inner Iterations" - Number of inner iterations required to adjust the trust region radius. "Dogleg Steps: Average Fraction of Newton Step Length" - Average value of the fraction a dogleg step took compared to the full Newton step. The fractional value is computed as $ \\mbox{frac} = \\frac{\\| d \\|}{\\| n\\|} $. "Dogleg Steps: Average Fraction Between Cauchy and Newton Direction" - Average value of the fraction a dogleg step took between the Cauchy and Newton directions. This is the $ \\gamma $ variable in the standard dogleg algorithm and the $ \\tau $ parameter in the inexact dogleg algorithm. A value of 0.0 is a full step in the Cauchy direction and a value of 1.0 is a full step in the Newton direction. Tammy Kolda (SNL 8950), Roger Pawlowski (SNL 9233) C++ includes: NOX_Solver_InexactTrustRegionBased.H
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::__init__ | ( | self, | ||
args | ||||
) |
__init__(self, Teuchos::RCP<(NOX::Abstract::Group)> grp, Teuchos::RCP<(NOX::StatusTest::Generic)> tests, Teuchos::RCP<(Teuchos::ParameterList)> params) -> InexactTrustRegionBased NOX::Solver::InexactTrustRegionBased::InexactTrustRegionBased(const Teuchos::RCP< NOX::Abstract::Group > &grp, const Teuchos::RCP< NOX::StatusTest::Generic > &tests, const Teuchos::RCP< Teuchos::ParameterList > ¶ms) Constructor. See reset() for description.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::__init__ | ( | self, | ||
args | ||||
) |
__init__(self, Teuchos::RCP<(NOX::Abstract::Group)> grp, Teuchos::RCP<(NOX::StatusTest::Generic)> tests, Teuchos::RCP<(Teuchos::ParameterList)> params) -> InexactTrustRegionBased NOX::Solver::InexactTrustRegionBased::InexactTrustRegionBased(const Teuchos::RCP< NOX::Abstract::Group > &grp, const Teuchos::RCP< NOX::StatusTest::Generic > &tests, const Teuchos::RCP< Teuchos::ParameterList > ¶ms) Constructor. See reset() for description.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::getList | ( | self, | ||
args | ||||
) |
getList(self) -> ParameterList const Teuchos::ParameterList & NOX::Solver::InexactTrustRegionBased::getList() const Return a refernece to the solver parameters.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::getList | ( | self, | ||
args | ||||
) |
getList(self) -> ParameterList const Teuchos::ParameterList & NOX::Solver::InexactTrustRegionBased::getList() const Return a refernece to the solver parameters.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::getNumIterations | ( | self, | ||
args | ||||
) |
getNumIterations(self) -> int int NOX::Solver::InexactTrustRegionBased::getNumIterations() const Get number of iterations.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::getNumIterations | ( | self, | ||
args | ||||
) |
getNumIterations(self) -> int int NOX::Solver::InexactTrustRegionBased::getNumIterations() const Get number of iterations.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::getPreviousSolutionGroup | ( | self, | ||
args | ||||
) |
getPreviousSolutionGroup(self) -> Group const Abstract::Group & NOX::Solver::InexactTrustRegionBased::getPreviousSolutionGroup() const Return a reference to the previous solution group.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::getPreviousSolutionGroup | ( | self, | ||
args | ||||
) |
getPreviousSolutionGroup(self) -> Group const Abstract::Group & NOX::Solver::InexactTrustRegionBased::getPreviousSolutionGroup() const Return a reference to the previous solution group.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::getSolutionGroup | ( | self, | ||
args | ||||
) |
getSolutionGroup(self) -> Group const Abstract::Group & NOX::Solver::InexactTrustRegionBased::getSolutionGroup() const Return a reference to the current solution group.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::getSolutionGroup | ( | self, | ||
args | ||||
) |
getSolutionGroup(self) -> Group const Abstract::Group & NOX::Solver::InexactTrustRegionBased::getSolutionGroup() const Return a reference to the current solution group.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::getStatus | ( | self, | ||
args | ||||
) |
getStatus(self) -> StatusType NOX::StatusTest::StatusType NOX::Solver::InexactTrustRegionBased::getStatus() Check current convergence and failure status.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::getStatus | ( | self, | ||
args | ||||
) |
getStatus(self) -> StatusType NOX::StatusTest::StatusType NOX::Solver::InexactTrustRegionBased::getStatus() Check current convergence and failure status.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::reset | ( | self, | ||
args | ||||
) |
reset(self, Vector initialGuess, Teuchos::RCP<(NOX::StatusTest::Generic)> tests) reset(self, Vector initialGuess) void NOX::Solver::InexactTrustRegionBased::reset(const NOX::Abstract::Vector &initialGuess) Resets the solver and sets a new initial guess.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::reset | ( | self, | ||
args | ||||
) |
reset(self, Vector initialGuess, Teuchos::RCP<(NOX::StatusTest::Generic)> tests) reset(self, Vector initialGuess) void NOX::Solver::InexactTrustRegionBased::reset(const NOX::Abstract::Vector &initialGuess) Resets the solver and sets a new initial guess.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::solve | ( | self, | ||
args | ||||
) |
solve(self) -> StatusType NOX::StatusTest::StatusType NOX::Solver::InexactTrustRegionBased::solve() Solve the nonlinear problem and return final status. By "solve", we call iterate() until the NOX::StatusTest value is either NOX::StatusTest::Converged or NOX::StatusTest::Failed.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::solve | ( | self, | ||
args | ||||
) |
solve(self) -> StatusType NOX::StatusTest::StatusType NOX::Solver::InexactTrustRegionBased::solve() Solve the nonlinear problem and return final status. By "solve", we call iterate() until the NOX::StatusTest value is either NOX::StatusTest::Converged or NOX::StatusTest::Failed.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::step | ( | self, | ||
args | ||||
) |
step(self) -> StatusType NOX::StatusTest::StatusType NOX::Solver::InexactTrustRegionBased::step() Do one nonlinear step in the iteration sequence and return status.
Reimplemented from PyTrilinos::NOX::Solver::Generic.
def PyTrilinos::NOX::Solver::InexactTrustRegionBased::step | ( | self, | ||
args | ||||
) |
step(self) -> StatusType NOX::StatusTest::StatusType NOX::Solver::InexactTrustRegionBased::step() Do one nonlinear step in the iteration sequence and return status.
Reimplemented from PyTrilinos::NOX::Solver::Generic.