PETScSNESSolver¶
-
class
dolfin.cpp.la.
PETScSNESSolver
(*args)¶ Bases:
dolfin.cpp.la.PETScObject
This class implements methods for solving nonlinear systems via PETSc’s SNES interface. It includes line search and trust region techniques for globalising the convergence of the nonlinear iteration.
Overloaded versions
PETScSNESSolver(comm)
Create SNES solver
PETScSNESSolver(nls_type=”default”)
Create SNES solver for a particular method
-
static
default_parameters
()¶ Default parameter values
-
get_options_prefix
()¶ Returns the prefix used by PETSc when searching the PETSc options database
-
init
()¶ Set up the SNES object, but don’t do anything yet, in case the user wants to access the SNES object directly
-
static
methods
()¶ Return a list of available solver methods
-
mpi_comm
()¶ Return the MPI communicator
-
parameters
¶
-
set_from_options
()¶ Set options from the PETSc options database
-
set_options_prefix
()¶ Sets the prefix used by PETSc when searching the PETSc options database
-
snes
()¶ Return petsc4py representation of PETSc SNES solver
-
solve
()¶ Overloaded versions
solve(nonlinear_problem, x, lb, ub)
Solve a nonlinear variational inequality with bound constraints
- Arguments
- nonlinear_function (
NonlinearProblem
) The nonlinear problem.
- x (
GenericVector
) The vector.
- lb (
GenericVector
) The lower bound.
- ub (
GenericVector
) The upper bound.
- nonlinear_function (
- Returns
- (int, bool)
Pair of number of Newton iterations, and whether iteration converged)
solve(nonlinear_function, x)
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.
- nonlinear_function (
- Returns
- (int, bool)
Pair of number of Newton iterations, and whether iteration converged)
-
thisown
¶ The membership flag