|
NEML2 2.0.0
|
The trust region subproblem introduced in
Yuan, Ya-xiang. Trust region algorithms for nonlinear equations. Hong Kong Baptist University, Department of Mathematics, 1994.
#include <TrustRegionSubProblem.h>

Public Member Functions | |
| TrustRegionSubProblem (const OptionSet &options) | |
| void | reinit (const Res< true > &r, const Jac< true > &J, const Scalar &delta) |
| Record the current state of the underlying problem. | |
| Tensor | preconditioned_direction (const Scalar &s) const |
Public Member Functions inherited from NonlinearSystem | |
| NonlinearSystem (const NonlinearSystem &)=default | |
| NonlinearSystem (NonlinearSystem &&) noexcept=default | |
| NonlinearSystem & | operator= (const NonlinearSystem &)=delete |
| NonlinearSystem & | operator= (NonlinearSystem &&)=delete |
| virtual | ~NonlinearSystem ()=default |
| NonlinearSystem (const OptionSet &options) | |
| virtual void | init_scaling (const Sol< false > &x, const bool verbose=false) |
| Compute algebraic Jacobian-based automatic scaling following https://cs.stanford.edu/people/paulliu/files/cs517-project.pdf. | |
| Res< true > | scale (const Res< false > &r) const |
| Apply scaling to the residual. | |
| Res< false > | unscale (const Res< true > &r) const |
| Remove scaling to the residual. | |
| Jac< true > | scale (const Jac< false > &J) const |
| Apply scaling to the Jacobian. | |
| Jac< false > | unscale (const Jac< true > &J) const |
| Remove scaling to the Jacobian. | |
| Sol< true > | scale (const Sol< false > &u) const |
| Apply scaling to the solution. | |
| Sol< false > | unscale (const Sol< true > &u) const |
| Remove scaling to the solution. | |
| void | set_guess (const Sol< true > &x) |
| Set the current guess. | |
| template<bool scaled> | |
| Res< scaled > | residual () |
| Assemble and return the residual. | |
| template<bool scaled> | |
| Res< scaled > | residual (const Sol< scaled > &x) |
| Convenient shortcut to set the current guess, assemble and return the residual. | |
| template<bool scaled> | |
| Jac< scaled > | Jacobian () |
| Assemble and return the Jacobian. | |
| template<bool scaled> | |
| Jac< scaled > | Jacobian (const Sol< scaled > &x) |
| Convenient shortcut to set the current guess, assemble and return the Jacobian. | |
| template<bool scaled> | |
| std::tuple< Res< scaled >, Jac< scaled > > | residual_and_Jacobian () |
| Assemble and return the residual and Jacobian. | |
| template<bool scaled> | |
| std::tuple< Res< scaled >, Jac< scaled > > | residual_and_Jacobian (const Sol< scaled > &x) |
| Convenient shortcut to set the current guess, assemble and return the residual and Jacobian. | |
Protected Member Functions | |
| void | set_guess (const Sol< false > &x) override |
| Set the unscaled current guess. | |
| void | assemble (Res< false > *residual, Jac< false > *Jacobian) override |
| Compute the unscaled residual and Jacobian. | |
| Tensor | preconditioned_solve (const Scalar &s, const Tensor &v) const |
Protected Member Functions inherited from NonlinearSystem | |
Additional Inherited Members | |
Static Public Member Functions inherited from NonlinearSystem | |
| static OptionSet | expected_options () |
| static void | disable_automatic_scaling (OptionSet &options) |
| static void | enable_automatic_scaling (OptionSet &options) |
Protected Attributes inherited from NonlinearSystem | |
| const bool | _autoscale |
| If true, do automatic scaling. | |
| const double | _autoscale_tol |
| Tolerance for convergence check of the iterative automatic scaling algorithm. | |
| const unsigned int | _autoscale_miter |
| Maximum number of iterations allowed for the iterative automatic scaling algorithm. | |
| bool | _scaling_matrices_initialized = false |
| Flag to indicate whether scaling matrices have been computed. | |
| Tensor | _row_scaling |
| Row scaling "matrix" – since it's a batched diagonal matrix, we are only storing its diagonals. | |
| Tensor | _col_scaling |
| Column scaling "matrix" – since it's a batched diagonal matrix, we are only storing its diagonals. | |
| TrustRegionSubProblem | ( | const OptionSet & | options | ) |
Compute the unscaled residual and Jacobian.
| r | Pointer to the residual vector – nullptr if not requested |
| J | Pointer to the Jacobian matrix – nullptr if not requested |
Implements NonlinearSystem.
Record the current state of the underlying problem.
|
overrideprotectedvirtual |
Set the unscaled current guess.
Implements NonlinearSystem.