SLEPcEigenSolver

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

Bases: dolfin.cpp.common.Variable, dolfin.cpp.la.PETScObject

This class provides an eigenvalue solver for PETSc matrices. It is a wrapper for the SLEPc eigenvalue solver.

The following parameters may be specified to control the solver.

  1. “spectrum”

This parameter controls which part of the spectrum to compute. Possible values are

“largest magnitude” (eigenvalues with largest magnitude) “smallest magnitude” (eigenvalues with smallest magnitude) “largest real” (eigenvalues with largest double part) “smallest real” (eigenvalues with smallest double part) “largest imaginary” (eigenvalues with largest imaginary part) “smallest imaginary” (eigenvalues with smallest imaginary part)

For SLEPc versions >= 3.1 , the following values are also possible

“target magnitude” (eigenvalues closest to target in magnitude) “target real” (eigenvalues closest to target in real part) “target imaginary” (eigenvalues closest to target in imaginary part)

The default is “largest magnitude”

  1. “solver”

This parameter controls which algorithm is used by SLEPc. Possible values are

“power” (power iteration) “subspace” (subspace iteration) “arnoldi” (Arnoldi) “lanczos” (Lanczos) “krylov-schur” (Krylov-Schur) “lapack” (LAPACK, all values, direct, small systems only) “arpack” (ARPACK)

The default is “krylov-schur”

  1. “tolerance”

This parameter controls the tolerance used by SLEPc. Possible values are positive double numbers.

The default is 1e-15;

  1. “maximum_iterations”

This parameter controls the maximum number of iterations used by SLEPc. Possible values are positive integers.

Note that both the tolerance and the number of iterations must be specified if either one is specified.

  1. “problem_type”

This parameter can be used to give extra information about the type of the eigenvalue problem. Some solver types require this extra piece of information. Possible values are:

“hermitian” (Hermitian) “non_hermitian” (Non-Hermitian) “gen_hermitian” (Generalized Hermitian) “gen_non_hermitian” (Generalized Non-Hermitian) “pos_gen_non_hermitian” (Generalized Non-Hermitian with positive semidefinite B)
  1. “spectral_transform”

This parameter controls the application of a spectral transform. A spectral transform can be used to enhance the convergence of the eigensolver and in particular to only compute eigenvalues in the interior of the spectrum. Possible values are:

“shift-and-invert” (A shift-and-invert transform)

Note that if a spectral transform is given, then also a non-zero spectral shift parameter has to be provided.

The default is no spectral transform.

  1. “spectral_shift”

This parameter controls the spectral shift used by the spectral transform and must be provided if a spectral transform is given. The possible values are real numbers.

Overloaded versions

  • SLEPcEigenSolver(A)

    Create eigenvalue solver for Ax = lambda x

  • SLEPcEigenSolver(A, B)

    Create eigenvalue solver Ax = lambda Bx

  • SLEPcEigenSolver(A)

    Create eigenvalue solver for Ax = lambda x

  • SLEPcEigenSolver(A, B)

    Create eigenvalue solver for Ax = lambda x

static default_parameters()

Default parameter values

get_eigenpair(i=0, r_vec=None, c_vec=None)

Gets the i-th solution of the eigenproblem

get_eigenvalue(i=0)

Gets the i-th eigenvalue of the eigenproblem

get_iteration_number()
get_number_converged()
set_deflation_space()
solve()

Overloaded versions

  • solve()

    Compute all eigenpairs of the matrix A (solve Ax = lambda x)

  • solve(n)

    Compute the n first eigenpairs of the matrix A (solve Ax = lambda x)

thisown

The membership flag