PETScKrylovSolver

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

Bases: dolfin.cpp.la.GenericLinearSolver, dolfin.cpp.la.PETScObject

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

Overloaded versions

  • 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)

get_options_prefix()

Returns the prefix used by PETSc when searching the options database

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_options_prefix()

Sets the prefix used by PETSc when searching the options database

set_reuse_preconditioner()

Reuse preconditioner if true, otherwise do not, even if matrix operator changes (by default preconditioner is re-built if the matrix changes)

solve()

Overloaded versions

  • 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

thisown

The membership flag