# PETScKrylovSolver¶

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

This class implements Krylov methods for linear systems of the form Ax = b. It is a wrapper for the Krylov solvers of PETSc.

• PETScKrylovSolver(“default”, “default”)

Create Krylov solver for a particular method and names preconditioner

• PETScKrylovSolver(method, preconditioner)

Create Krylov solver for a particular method and PETScPreconditioner

• PETScKrylovSolver(method, preconditioner)

Create Krylov solver for a particular method and PETScPreconditioner (shared_ptr version)

• PETScKrylovSolver(method, preconditioner)

Create Krylov solver for a particular method and PETScPreconditioner

• PETScKrylovSolver(method, preconditioner)

Create Krylov solver for a particular method and PETScPreconditioner (shared_ptr version)

• PETScKrylovSolver(ksp)

Create solver wrapper of a PETSc KSP object

static default_parameters()

Default parameter values

get_operator()

Get operator (matrix)

ksp()

Return petsc4py representation of PETSc KSP solver

static methods()

Return a list of available solver methods

static preconditioners()

Return a list of available preconditioners

set_operator()

• set_operator(A)

Set operator (matrix)

• set_operator(A)

Set operator (matrix)

set_operators()

• set_operators(A, P)

Set operator (matrix) and preconditioner matrix

• set_operators(A, P)

Set operator (matrix) and preconditioner matrix

set_options_prefix()

Set options prefix

solve()

• solve(x, b)

Solve linear system Ax = b and return number of iterations

• solve(x, b)

Solve linear system Ax = b and return number of iterations

• solve(A, x, b)

Solve linear system Ax = b and return number of iterations

• solve(A, x, b)

Solve linear system Ax = b and return number of iterations

thisown

The membership flag