sfepy.solvers.semismooth_newton module

class sfepy.solvers.semismooth_newton.SemismoothNewton(conf, **kwargs)[source]

The semi-smooth Newton method for solving problems of the following structure:

\begin{split}
  & F(y) = 0 \\
  & A(y) \ge 0 \;,\ B(y) \ge 0 \;,\ \langle A(y), B(y) \rangle = 0
\end{split}

The function F(y) represents the smooth part of the problem.

Regular step: y \leftarrow y - J(y)^{-1} \Phi(y)

Steepest descent step: y \leftarrow y - \beta J(y) \Phi(y)

Notes

Although fun_smooth_grad() computes the gradient of the smooth part only, it should return the global matrix, where the non-smooth part is uninitialized, but pre-allocated.

compute_jacobian(vec_x, fun_smooth_grad, fun_a_grad, fun_b_grad, vec_smooth_r, vec_a_r, vec_b_r)[source]
name = 'nls.semismooth_newton'
static process_conf(conf, kwargs)[source]

Missing items are set to default values.

Example configuration, all items:

solver_1 = {
    'name' : 'semismooth_newton',
    'kind' : 'nls.semismooth_newton',

    'semismooth' : True,

    'i_max'      : 10,
    'eps_a'      : 1e-8,
    'eps_r'      : 1e-2,
    'macheps'   : 1e-16,
    'lin_red'    : 1e-2, # Linear system error < (eps_a * lin_red).
    'ls_red_reg' : 0.1,
    'ls_red_alt' : 0.01,
    'ls_red_warp' : 0.001,
    'ls_on'      : 0.9,
    'ls_min'     : 1e-10,
    'log'        : {'plot' : 'convergence.png'},
}