# naginterfaces.library.sparseig.complex_​band_​solve¶

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

complex_band_solve is the main solver function in a suite of functions consisting of complex_option(), complex_band_init() and complex_band_solve. It must be called following an initial call to complex_band_init() and following any calls to complex_option().

complex_band_solve returns approximations to selected eigenvalues, and (optionally) the corresponding eigenvectors, of a standard or generalized eigenvalue problem defined by complex banded non-Hermitian matrices. The banded matrix must be stored using the LAPACK storage format for complex banded non-Hermitian matrices.

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

https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/f12/f12auf.html

Parameters
klint

The number of subdiagonals of the matrices and .

kuint

The number of superdiagonals of the matrices and .

abcomplex, array-like, shape

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

mbcomplex, array-like, shape

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

sigmacomplex

If the ‘Shifted Inverse’ mode (see complex_option()) has been selected then must contain the shift used; otherwise is not referenced. the F12 Introduction describes the use of shift and invert transformations.

residcomplex, array-like, shape

Need not be set unless the option ‘Initial Residual’ has been set in a prior call to complex_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 complex_band_init().

io_managerFileObjManager, optional

Manager for I/O in this routine.

Returns
nconvint

The number of converged eigenvalues.

dcomplex, ndarray, shape

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

zNone or complex, ndarray, shape

If the default option (see complex_option()) has been selected then contains the final set of eigenvectors corresponding to the eigenvalues held in , otherwise is not referenced. The complex eigenvector associated with an eigenvalue is stored in the corresponding array section of , namely , for , for .

residcomplex, ndarray, shape

Contains the final residual vector. This can be used as the starting residual to improve convergence on the solution of a closely related eigenproblem. This has no relation to the error residual or .

vcomplex, ndarray, shape

If the option or (see complex_option()) has been set and a separate array has been passed (i.e., does not equal ), then the first columns 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 )

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

(errno )

Either the initialization function has not been called prior to the first call of this function or a communication array has become corrupted.

(errno )

On entry, , but this is not yet implemented.

(errno )

The number of eigenvalues found to sufficient accuracy is zero.

(errno )

Could not build an Arnoldi factorization. The size of the current Arnoldi 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 Schur form, there was a failure to compute a number of eigenvalues Please contact NAG.

(errno )

(errno )

(errno )

(errno )

(errno )

(errno )

(errno )

The maximum number of iterations has been reached. The maximum number of . The number of converged eigenvalues .

(errno )

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

(errno )

Overflow occurred during transformation of Ritz values to those of the original problem.

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, complex and non-Hermitian.

Following a call to the initialization function complex_band_init(), complex_band_solve returns the converged approximations to eigenvalues and (optionally) the corresponding approximate eigenvectors and/or a unitary basis for the associated approximate invariant subspace. The eigenvalues (and eigenvectors) are selected from those of a standard or generalized eigenvalue problem defined by complex banded non-Hermitian matrices. There is negligible additional computational cost to obtain eigenvectors; a unitary 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 column ordered storage format for banded non-Hermitian matrices; please refer to the F07 Introduction for details on this storage format.

complex_band_solve is based on the banded driver functions znbdr1 to znbdr4 from the ARPACK package, which uses the Implicitly Restarted Arnoldi 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). An evaluation of software for computing eigenvalues of sparse non-Hermitian matrices is provided in Lehoucq and Scott (1996). This suite of functions offers the same functionality as the ARPACK banded driver software for complex non-Hermitian 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.

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

• the corresponding approximate eigenvectors;

• a unitary 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