sfepy.solvers.eigen module

class sfepy.solvers.eigen.LOBPCGEigenvalueSolver(conf, **kwargs)[source]

SciPy-based LOBPCG solver for sparse symmetric problems.

Kind: ‘eig.scipy_lobpcg’

For common configuration parameters, see Solver.

Specific configuration parameters:

Parameters
i_maxint (default: 20)

The maximum number of iterations.

eps_afloat

The absolute tolerance for the convergence.

largestbool (default: True)

If True, solve for the largest eigenvalues, otherwise the smallest.

precond{dense matrix, sparse matrix, LinearOperator}

The preconditioner.

name = 'eig.scipy_lobpcg'
class sfepy.solvers.eigen.PysparseEigenvalueSolver(conf, **kwargs)[source]

Pysparse-based eigenvalue solver for sparse symmetric problems.

Kind: ‘eig.pysparse’

For common configuration parameters, see Solver.

Specific configuration parameters:

Parameters
i_maxint (default: 100)

The maximum number of iterations.

eps_afloat (default: 1e-05)

The absolute tolerance for the convergence.

taufloat (default: 0.0)

The target value.

method{‘cgs’, ‘qmrs’} (default: ‘qmrs’)

The linear iterative solver supported by pysparse.

verbosityint (default: 0)

The pysparse verbosity level.

strategy{0, 1} (default: 1)

The shifting and sorting strategy of JDSYM: strategy=0 enables the default JDSYM algorithm, strategy=1 enables JDSYM to avoid convergence to eigenvalues smaller than tau.

**

Additional parameters supported by the solver.

name = 'eig.pysparse'
class sfepy.solvers.eigen.SLEPcEigenvalueSolver(conf, comm=None, context=None, **kwargs)[source]

General SLEPc eigenvalue problem solver.

Kind: ‘eig.slepc’

For common configuration parameters, see Solver.

Specific configuration parameters:

Parameters
methodstr (default: ‘krylovschur’)

The actual solver to use.

problemstr (default: ‘gnhep’)

The problem type: Hermitian (hep), non-Hermitian (nhep), generalized Hermitian (ghep), generalized non-Hermitian (gnhep), generalized non-Hermitian with positive semi-definite B (pgnhep), and generalized Hermitian-indefinite (ghiep).

i_maxint (default: 20)

The maximum number of iterations.

epsfloat

The convergence tolerance.

conv_test{“abs”, “rel”, “norm”, “user”}, (default: ‘abs’)

The type of convergence test.

which{‘largest_magnitude’, ‘smallest_magnitude’,

‘largest_real’, ‘smallest_real’, ‘largest_imaginary’, ‘smallest_imaginary’, ‘target_magnitude’, ‘target_real’, ‘target_imaginary’, ‘all’, ‘which_user’} (default: ‘largest_magnitude’) Which eigenvectors and eigenvalues to find.

**

Additional parameters supported by the method.

create_eps(self, options=None, comm=None)[source]
create_petsc_matrix(self, mtx, comm=None)[source]
name = 'eig.slepc'
class sfepy.solvers.eigen.ScipyEigenvalueSolver(conf, **kwargs)[source]

SciPy-based solver for both dense and sparse problems.

The problem is consirered sparse if n_eigs argument is not None.

Kind: ‘eig.scipy’

For common configuration parameters, see Solver.

Specific configuration parameters:

Parameters
method{‘eig’, ‘eigh’, ‘eigs’, ‘eigsh’} (default: ‘eigs’)

The method for solving general or symmetric eigenvalue problems: for dense problems eig() or eigh() can be used, for sparse problems eigs() or eigsh() should be used.

which‘LM’ | ‘SM’ | ‘LR’ | ‘SR’ | ‘LI’ | ‘SI’ (default: ‘SM’)

Which eigenvectors and eigenvalues to find, see scipy.sparse.linalg.eigs() or scipy.sparse.linalg.eigsh(). For dense problmes, only ‘LM’ and ‘SM’ can be used

**

Additional parameters supported by the method.

name = 'eig.scipy'
class sfepy.solvers.eigen.ScipySGEigenvalueSolver(conf, **kwargs)[source]

SciPy-based solver for dense symmetric problems.

Kind: ‘eig.sgscipy’

For common configuration parameters, see Solver.

Specific configuration parameters:

name = 'eig.sgscipy'
sfepy.solvers.eigen.eig(mtx_a, mtx_b=None, n_eigs=None, eigenvectors=True, return_time=None, method='eig.scipy', **ckwargs)[source]

Utility function that constructs an eigenvalue solver given by method, calls it and returns solution.

sfepy.solvers.eigen.init_slepc_args()[source]
sfepy.solvers.eigen.standard_call(call)[source]

Decorator handling argument preparation and timing for eigensolvers.