Nonlinear solvers.
Solves a nonlinear system f(x) = 0 using the Newton method with backtracking line-search, starting with an initial guess x^0.
Kind: ‘nls.newton’
For common configuration parameters, see Solver.
Specific configuration parameters:
Parameters: | i_max : int (default: 1)
eps_a : float (default: 1e-10)
eps_r : float (default: 1.0)
eps_mode : ‘and’ or ‘or’ (default: ‘and’)
macheps : float (default: 2.2204460492503131e-16)
lin_red : float (default: 1.0)
lin_precision : float or None
ls_on : float (default: 0.99999)
ls_red : 0.0 < float < 1.0 (default: 0.1)
ls_red_warp : 0.0 < float < 1.0 (default: 0.001)
ls_min : 0.0 < float < 1.0 (default: 1e-05)
give_up_warp : bool (default: False)
check : 0, 1 or 2 (default: 0)
delta : float (default: 1e-06)
log : dict or None
is_linear : bool (default: False)
|
---|
Nonlinear system solver call.
Solves a nonlinear system f(x) = 0 using the Newton method with backtracking line-search, starting with an initial guess x^0.
Parameters: | vec_x0 : array
conf : Struct instance, optional
fun : function, optional
fun_grad : function, optional
lin_solver : LinearSolver instance, optional
iter_hook : function, optional
status : dict-like, optional
|
---|
Notes
alias of SolverMeta
Interface to PETSc SNES (Scalable Nonlinear Equations Solvers).
The solver supports parallel use with a given MPI communicator (see comm argument of PETScNonlinearSolver.__init__()). Returns a (global) PETSc solution vector instead of a (local) numpy array, when given a PETSc initial guess vector.
For parallel use, the fun and fun_grad callbacks should be provided by PETScParallelEvaluator.
Kind: ‘nls.petsc’
For common configuration parameters, see Solver.
Specific configuration parameters:
Parameters: | method : str (default: ‘newtonls’)
i_max : int (default: 10)
if_max : int (default: 100)
eps_a : float (default: 1e-10)
eps_r : float (default: 1.0)
eps_s : float (default: 0.0)
|
---|
alias of SolverMeta
Interface to Broyden and Anderson solvers from scipy.optimize.
Kind: ‘nls.scipy_broyden_like’
For common configuration parameters, see Solver.
Specific configuration parameters:
Parameters: | method : str (default: ‘anderson’)
i_max : int (default: 10)
alpha : float (default: 0.9)
M : float (default: 5)
f_tol : float (default: 1e-06)
w0 : float (default: 0.1)
|
---|
alias of SolverMeta
Verify the correctness of the tangent matrix as computed by fun_grad() by comparing it with its finite difference approximation evaluated by repeatedly calling fun() with vec_x0 items perturbed by a small delta.
Nonlinear solver convergence test.
Parameters: | conf : Struct instance
it : int
err : float
err0 : float
|
---|---|
Returns: | status : int
|