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)

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

Overloaded versions

  • set_operator(A)

    Set operator (matrix)

  • set_operator(A)

    Set operator (matrix)

set_operators()

Overloaded versions

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

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

  • solve(A, x, b)

    Solve linear system Ax = b and return number of iterations

thisown

The membership flag