naginterfaces.library.sparseig.real_​symm_​band_​solve

naginterfaces.library.sparseig.real_symm_band_solve(kl, ku, ab, mb, sigma, resid, comm, io_manager=None)[source]

real_symm_band_solve is the main solver function in a suite of functions which includes real_symm_option() and real_symm_band_init(). real_symm_band_solve must be called following an initial call to real_symm_band_init() and following any calls to real_symm_option().

real_symm_band_solve returns approximations to selected eigenvalues, and (optionally) the corresponding eigenvectors, of a standard or generalized eigenvalue problem defined by real banded symmetric matrices. The banded matrix must be stored using the LAPACK storage format for real banded nonsymmetric matrices.

For full information please refer to the NAG Library document for f12fg

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f12/f12fgf.html

Parameters
klint

The number of subdiagonals of the matrices and .

kuint

The number of superdiagonals of the matrices and . Since and are symmetric, the normal case is .

abfloat, array-like, shape

Must contain the matrix in LAPACK banded storage format for nonsymmetric matrices (see the F07 Introduction).

mbfloat, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : if : ; otherwise: ; otherwise: .

Must contain the matrix in LAPACK banded storage format for nonsymmetric matrices (see the F07 Introduction).

sigmafloat

If one of the ‘Shifted Inverse’ (see real_symm_option()) modes has been selected then contains the real shift used; otherwise is not referenced.

residfloat, array-like, shape

Need not be set unless the option ‘Initial Residual’ has been set in a prior call to real_symm_option() in which case must contain an initial residual vector.

commdict, communication object, modified in place

Communication structure.

This argument must have been initialized by a prior call to real_symm_option().

io_managerFileObjManager, optional

Manager for I/O in this routine.

Returns
nconvint

The number of converged eigenvalues.

dfloat, ndarray, shape

The first locations of the array contain the converged approximate eigenvalues.

zfloat, ndarray, shape

If the default option (see real_symm_option()) has been selected then contains the final set of eigenvectors corresponding to the eigenvalues held in . The real eigenvector associated with eigenvalue , for , is stored in the th column of .

residfloat, ndarray, shape

Contains the final residual vector.

vfloat, ndarray, shape

If the option or (see real_symm_option()) and a separate array has been passed then the first elements of will contain approximate Schur vectors that span the desired invariant subspace.

The th Schur vector is stored in the th column of .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, , .

Constraint: .

(errno )

The maximum number of iterations , the option ‘Iteration Limit’ has been set to .

(errno )

The options ‘Generalized’ and ‘Regular’ are incompatible.

(errno )

Eigenvalues from both ends of the spectrum were requested, but the number of eigenvalues ( in real_symm_band_init()) requested is one.

(errno )

The option ‘Initial Residual’ was selected but the starting vector held in is zero.

(errno )

On entry, , but this is not yet implemented.

(errno )

The number of eigenvalues found to sufficient accuracy is zero.

(errno )

Could not build a Lanczos factorization. The size of the current Lanczos factorization .

(errno )

Error in internal call to compute eigenvalues and corresponding error bounds of the current upper Hessenberg matrix. Please contact NAG.

(errno )

During calculation of a tridiagonal form, there was a failure to compute eigenvalues in a total of iterations.

(errno )

Failure during internal factorization of banded matrix. Please contact NAG.

(errno )

Failure during internal solution of banded system. Please contact NAG.

(errno )

No shifts could be applied during a cycle of the implicitly restarted Lanczos iteration.

(errno )

Either an initial call to the setup function has not been made or the communication arrays have become corrupted.

(errno )

On entry, , .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

The maximum number of iterations has been reached: there have been iterations. There are converged eigenvalues.

Notes

The suite of functions is designed to calculate some of the eigenvalues, , (and optionally the corresponding eigenvectors, ) of a standard eigenvalue problem , or of a generalized eigenvalue problem of order , where is large and the coefficient matrices and are banded, real and symmetric.

Following a call to the initialization function real_symm_band_init(), real_symm_band_solve returns the converged approximations to eigenvalues and (optionally) the corresponding approximate eigenvectors and/or an orthonormal basis for the associated approximate invariant subspace. The eigenvalues (and eigenvectors) are selected from those of a standard or generalized eigenvalue problem defined by real banded symmetric matrices. There is negligible additional computational cost to obtain eigenvectors; an orthonormal basis is always computed, but there is an additional storage cost if both are requested.

The banded matrices and must be stored using the LAPACK storage format for banded nonsymmetric matrices; please refer to the F07 Introduction for details on this storage format.

real_symm_band_solve is based on the banded driver functions dsbdr1 to dsbdr6 from the ARPACK package, which uses the Implicitly Restarted Lanczos iteration method. The method is described in Lehoucq and Sorensen (1996) and Lehoucq (2001) while its use within the ARPACK software is described in great detail in Lehoucq et al. (1998). This suite of functions offers the same functionality as the ARPACK banded driver software for real symmetric problems, but the interface design is quite different in order to make the option setting clearer and to combine the different drivers into a general purpose function.

real_symm_band_solve, is a general purpose direct communication function that must be called following initialization by real_symm_band_init(). real_symm_band_solve uses options, set either by default or explicitly by calling real_symm_option(), to return the converged approximations to selected eigenvalues and (optionally):

  • the corresponding approximate eigenvectors;

  • an orthonormal basis for the associated approximate invariant subspace;

  • both.

References

Lehoucq, R B, 2001, Implicitly restarted Arnoldi methods and subspace iteration, SIAM Journal on Matrix Analysis and Applications (23), 551–562

Lehoucq, R B and Scott, J A, 1996, An evaluation of software for computing eigenvalues of sparse nonsymmetric matrices, Preprint MCS-P547-1195, Argonne National Laboratory

Lehoucq, R B and Sorensen, D C, 1996, Deflation techniques for an implicitly restarted Arnoldi iteration, SIAM Journal on Matrix Analysis and Applications (17), 789–821

Lehoucq, R B, Sorensen, D C and Yang, C, 1998, ARPACK Users’ Guide: Solution of Large-scale Eigenvalue Problems with Implicitly Restarted Arnoldi Methods, SIAM, Philadelphia