pysolver_view.roots.backends.custom module#
Connect packaged root drivers to NonlinearSystemSolver observations and callbacks.
- class pysolver_view.roots.backends.custom.RootRunContext(residual: Callable, jacobian: Callable | None, method: str, requested_method: str, options: StepControlOptions | NewtonOptions, update_on: str, active: bool, evaluation: object, iteration_history: list, record: Callable, set_iteration: Callable, callback: Callable | None)[source]#
Bases:
objectThe model, counters and event sinks required by one custom root run.
- active: bool#
- callback: Callable | None#
- evaluation: object#
- classmethod from_solver(solver)[source]#
Bind the public interface once, keeping it out of numerical adaptation.
- iteration_history: list#
- jacobian: Callable | None#
- method: str#
- options: StepControlOptions | NewtonOptions#
- record: Callable#
- requested_method: str#
- residual: Callable#
- set_iteration: Callable#
- update_on: str#
- class pysolver_view.roots.backends.custom.RootSolverAdapter(context)[source]#
Bases:
objectTranslate numerical observations without evaluating the model or derivatives.
- pysolver_view.roots.backends.custom.resolve_root_options(method, options, tolerance, max_iterations, derivative_method, derivative_abs_step)[source]#
Resolve custom options, giving explicit dictionary/dataclass values precedence.
Constructor tolerance/max_iterations fill missing residual/trial settings. Numerical derivatives belong to the numerical core. Explicit finite_diff_step uses scaled probes; otherwise the constructor’s physical absolute step applies.