conatus.expert.NewtonSolver¶
- class conatus.expert.NewtonSolver(problem, *, tol=REQUIRED, damping=1.0, max_iterations=50, ncc=None, params=None, ncc_cutoff=None, ncc_tail_tol=1e-08)[source]¶
Bases:
objectNewton for an NLBVP. The tolerance
tolis required; damping and iteration budget have declared defaults.ncc/data: fixed coefficient fields of the problem (e.g. the coordinate r used as a weight), passed asFieldDataor callables of the grids, exactly as fordiscretize.- Parameters:
problem (NLBVP)
tol (float)
damping (float)
max_iterations (int)
ncc (Mapping[E.Field, Any] | None)
params (Mapping[str, Any] | None)
ncc_cutoff (float | None)
ncc_tail_tol (float)
- discrete_system(coeffs, params=None, *, check=True)[source]¶
Newton system at the iterate
coeffs: per Fourier group (g, A, b, x) with F_h(x) = A x - b the discrete residual and A = F’(U) the Jacobian (used by continuation).paramsoverrides parameter values (e.g. the continuation parameter).check=Falseskips the rank report of A: only for callers that solve a bordered system which stays regular where A is singular (folds in continuation), and that say so.- Parameters:
coeffs (Mapping[str, ndarray])
params (Mapping[str, Any] | None)
check (bool)
- Return type:
tuple[Plan, list]
- initial_coeffs(guess)[source]¶
Coefficient arrays of an initial guess (linear-only unknowns start at 0).
- Parameters:
guess (Mapping[Field, Any])
- Return type:
dict[str, ndarray]