NewtonSolver

class dolfin.cpp.la.NewtonSolver(*args)

Bases: dolfin.cpp.common.Variable

This class defines a Newton solver for nonlinear systems of equations of the form \(F(x) = 0\).

Overloaded versions

  • NewtonSolver()

    Create nonlinear solver

  • NewtonSolver(solver, factory)

    Create nonlinear solver using provided linear solver

    Arguments
    solver (GenericLinearSolver)

    The linear solver.

    factory (GenericLinearAlgebraFactory)

    The factory.

static default_parameters()

Default parameter values

Returns
Parameters
Parameter values.
iteration()

Return Newton iteration number

Returns
int
The iteration number.
linear_solver()

Return the linear solver

Returns
GenericLinearSolver
The linear solver.
relative_residual()

Return current relative residual

Returns
float
Current relative residual.
residual()

Return current residual

Returns
float
Current residual.
solve()

Solve abstract nonlinear problem \(F(x) = 0\) for given \(F\) and Jacobian \(\dfrac{\partial F}{\partial x}\).

Arguments
nonlinear_function (NonlinearProblem)
The nonlinear problem.
x (GenericVector)
The vector.
Returns
(int, bool)
Pair of number of Newton iterations, and whether iteration converged)
thisown

The membership flag