# dolfinx.cpp.nls.petsc

PETSc-specific nonlinear solvers

Classes

`NewtonSolver`(self, comm) |

class dolfinx.cpp.nls.petsc.NewtonSolver(self, comm: MPICommWrapper)

  Bases: `object`

  property atol

    Absolute tolerance

  property convergence_criterion

    Convergence criterion, either ‘residual’ (default) or ‘incremental’

  property error_on_nonconvergence

    (self) -> bool

  property krylov_solver

    (self) -> object

  property max_it

    Maximum number of iterations

  property relaxation_parameter

    Relaxation parameter

  property report

    (self) -> bool

  property rtol

    Relative tolerance

  setF(self, F: collections.abc.Callable[[vec, vec], None], b: vec) → None
  setJ(self, J: collections.abc.Callable[[vec, mat], None], Jmat: mat) → None
  setP(self, P: collections.abc.Callable[[vec, mat], None], Pmat: mat) → None
  set_convergence_check(self, convergence_check: collections.abc.Callable[[dolfinx.cpp.nls.petsc.NewtonSolver, vec], tuple[float, bool]]) → None
  set_form(self, form: collections.abc.Callable[[vec], None]) → None
  set_update(self, update: collections.abc.Callable[[dolfinx.cpp.nls.petsc.NewtonSolver, vec, vec], None]) → None
  solve(self, x: vec) → tuple[int, bool]