pysolver_view.roots.solvers.solver module

Contents

pysolver_view.roots.solvers.solver module#

Public root-solver dispatch, method aliases, and configuration re-exports.

pysolver_view.roots.solvers.solver.solve_root(fun, x0, jac=None, *, method='levenberg_marquardt', options=None, callback=None, observer=None)[source]#

Solve a root problem using an experimental method and explicit step policy.

levenberg_marquardt and powell_hybrid use StepControlOptions and trust regions; lm and hybr remain accepted aliases. newton_raphson and gauss_newton use NewtonOptions, with newton and gn as their aliases; backtracking is enabled by default and explicit backtracking=None selects full valid steps, including residual increases. Newton requires a square numerically full-rank Jacobian; the other methods allow m >= n.

Dictionaries and matching option dataclasses are accepted. Numerical derivatives, residual budgets, copied callbacks, history levels and residual-based root success are consistent across drivers. Callbacks receive full detached initial/committed records and stop on an exact False return. Results preserve the last committed point and separately report attempted steps, model calls, canonical method, and requested spelling. Undefined initial points or derivative probes terminate; programming errors propagate.