# naginterfaces.library.sparseig.feast_​complex_​symm_​solve¶

naginterfaces.library.sparseig.feast_complex_symm_solve(handle, irevcm, ze, x, y, m0, d, z, eps, itera, resid, io_manager=None)[source]

feast_complex_symm_solve is an iterative solver used to find some of the eigenvalues and the corresponding eigenvectors of a standard or generalized eigenvalue problem defined by complex symmetric matrices. This is part of a suite of functions that also includes feast_init(), feast_option(), feast_gen_contour() and feast_custom_contour().

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

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

Parameters
handleHandle

The handle to the internal data structure used by the NAG FEAST suite. It needs to be initialized by feast_init(). It must not be changed between calls to the NAG FEAST suite.

irevcmint

On initial entry: , otherwise an error condition will be raised.

On intermediate entry: must be unchanged from its previous exit value. Changing to any other value between calls will result in an error.

Note: the matrices , and referred to in this section are all of size and are stored in the arrays , and , respectively.

zecomplex

On initial entry: need not be set.

xcomplex, ndarray, shape , modified in place

On initial entry: need not be set.

On intermediate exit:

if , the calling program must compute , storing the result in prior to re-entry.

If , the calling program must compute , storing the result in prior to re-entry.

Note: the matrices and are stored in the first columns of the arrays and , respectively.

ycomplex, ndarray, shape , modified in place

On initial entry: need not be set.

On intermediate exit:

if , the calling program must compute the solution to the linear system , overwriting with the result , prior to re-entry. The linear system has right-hand sides.

m0int

On initial entry: the size of the search subspace used to find the eigenvalues. This should exceed the number of eigenvalues within the search contour. See Further Comments for further details.

On intermediate entry: must remain unchanged.

dcomplex, ndarray, shape , modified in place

On initial entry: if the option was set using the option setting function feast_option(), then should contain an initial guess at the eigenvalues lying within the eigenvector search subspace (this subspace should be specified by ), otherwise need not be set.

On final exit: the first entries in contain the eigenvalues.

Note: if the option was set using the option setting function feast_option(), then on final exit contains an estimate of the eigenvalues after a single contour integral.

zcomplex, ndarray, shape , modified in place

On initial entry: if the option was set using the option setting function feast_option(), then should contain an initial guess at the eigenvector search subspace, otherwise need not be set.

On intermediate exit: must not be changed.

On final exit: the first columns of contain the eigenvectors corresponding to the eigenvalues found within the contour.

Note: if the option was set using the option setting function feast_option(), then on final exit columns of contain the current search subspace after one contour integral.

epsfloat

On initial entry: need not be set.

iteraint

On initial entry: need not be set.

residfloat, ndarray, shape , modified in place

On initial entry: need not be set.

On final exit: for , contains the relative residual, in the -norm, of the th eigenpair found, that is , where is the centre of mass of the contour and is the radius of the circle, centred at which just encloses the contour.

io_managerFileObjManager, optional

Manager for I/O in this routine.

Returns
irevcmint

On intermediate exit: has the following meanings.

The calling program must compute a factorization of the matrix suitable for solving a linear system, for example using lapacklin.zsytrf which computes the Bunch–Kaufman factorization. All arguments to the routine must remain unchanged.

Note: the factorization can be computed in single precision.

The calling program must compute the solution to the linear system , overwriting with the result . The matrix has previously been factorized (when was returned) and this factorization can be reused here.

Note: the solve can be performed in single precision.

The calling program must compute , storing the result in .

The calling program must compute , storing the result in . If a standard eigenproblem is being solved (so that ) then the calling program should set .

On final exit: : feast_complex_symm_solve has completed its tasks. The value of determines whether the iteration has been successfully completed, or whether errors have been detected.

Note: the matrices , and referred to in this section are all of size and are stored in the arrays , and , respectively.

zecomplex

On intermediate exit: contains the current point on the contour.

If , then this must be used by the calling program to form a factorization of the matrix .

m0int

If the initial search subspace was found by feast_complex_symm_solve to be too large, then a new smaller suitable choice is returned.

nconvint

The number of eigenvalues found within the search contour.

Note: if the option was set in the option setting function feast_option(), then contains a stochastic estimate of the number of eigenvalues within the search contour.

epsfloat

The relative error on the trace. At iteration , is given by the expression , where is the sum of the eigenvalues found at the th iteration, is the centre of mass of the contour and is the radius of the circle, centred at which just encloses the contour.

iteraint

The number of subspace iterations performed.

Raises
NagValueError
(errno )

Either the contour setting function feast_symm_contour() has not been called prior to the first call of this function or the supplied has become corrupted.

(errno )

An internal error occurred in the reduced eigenvalue solver. A possible cause is that the matrix is not positive definite.

(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On initial entry, .

Constraint: .

(errno )

On intermediate entry, .

Constraint: , , or .

(errno )

The function converged but the eigenvector subspace is not orthonormal.

(errno )

The option was set using the option setting function feast_option() but no nonzero elements were found in the supplied subspace.

Warns
NagAlgorithmicWarning
(errno )

No eigenvalues were found within the search contour.

(errno )

The function did not converge after the maximum number of iterations.

(errno )

The size of the eigenvector search subspace, , is too small.

(errno )

The option was set using feast_option(). Columns of contain the search subspace after one contour integral and contains an estimate of the eigenvalues.

(errno )

The option was set using feast_option() so only a stochastic estimate of the number of eigenvalues within the contour has been returned.

Notes

The suite of functions is designed to calculate some of the eigenvalues, , and the corresponding eigenvectors, , of a standard eigenvalue problem , or of a generalized eigenvalue problem , where the coefficient matrices and are sparse, complex and symmetric. The suite can also be used to find selected eigenvalues/eigenvectors of smaller scale, dense, symmetric problems.

feast_complex_symm_solve is a reverse communication function, based on the FEAST eigensolver, described in Polizzi (2009), which finds eigenvalues using contour integration. Prior to calling feast_complex_symm_solve, one of the contour definition functions feast_gen_contour() or feast_custom_contour() must be used to define nodes and weights for a contour around a region in the complex plane within which eigenvalues will be sought.

The setup function feast_init() and the contour definition function feast_gen_contour() or feast_custom_contour() must be called before feast_complex_symm_solve. Between the calls to feast_init() and feast_gen_contour() or feast_custom_contour(), options may be set by calls to the option setting function feast_option().

feast_complex_symm_solve uses reverse communication, i.e., it returns repeatedly to the calling program with the argument (see Parameters) set to specified values which require the calling program to carry out one of the following tasks:

• compute a factorization of the matrix , where is a point on the search contour;

• solve a linear system involving , using the factorization above;

• compute the matrix product ;

• compute the matrix product ;

• notify the completion of the computation.

The number of contour points, the number of iterations, and other options can all be set using the option setting function feast_option() (see Other Parameters for feast_option for details on setting options and of the default settings). The search contour itself is defined by a call to feast_gen_contour() or feast_custom_contour().

References

Polizzi, E, 2009, Density-Matrix-Based Algorithms for Solving Eigenvalue Problems, Phys. Rev. B. (79), 115112