naginterfaces.library.sparseig.real_proc¶
- naginterfaces.library.sparseig.real_proc(sigmar, sigmai, resid, v, comm, io_manager=None)[source]¶
real_proc
is a post-processing function in a suite of functions consisting ofreal_init()
,real_option()
andreal_monit()
. It must be called following a final exit fromreal_iter()
.For full information please refer to the NAG Library document for f12ac
https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/f12/f12acf.html
- Parameters
- sigmarfloat
If one of the ‘Shifted Inverse Real’ modes have been selected then contains the real part of the shift used; otherwise is not referenced.
- sigmaifloat
If one of the ‘Shifted Inverse Real’ modes have been selected then contains the imaginary part of the shift used; otherwise is not referenced.
- residfloat, array-like, shape
Must not be modified following a call to
real_iter()
since it contains data required byreal_proc
.- vfloat, array-like, shape
The columns of contain the Arnoldi basis vectors for as constructed by
real_iter()
.- commdict, communication object, modified in place
Communication structure.
This argument must have been initialized by a prior call to
real_init()
.- io_managerFileObjManager, optional
Manager for I/O in this routine.
- Returns
- nconvint
The number of converged eigenvalues as found by
real_iter()
.- drfloat, ndarray, shape
The first locations of the array contain the real parts of the converged approximate eigenvalues.
- difloat, ndarray, shape
The first locations of the array contain the imaginary parts of the converged approximate eigenvalues.
- zfloat, ndarray, shape
If the default option (see
real_option()
) has been selected then contains the final set of eigenvectors corresponding to the eigenvalues held in and . The complex eigenvector associated with the eigenvalue with positive imaginary part is stored in two consecutive columns. The first column holds the real part of the eigenvector and the second column holds the imaginary part. The eigenvector associated with the eigenvalue with negative imaginary part is simply the complex conjugate of the eigenvector associated with the positive imaginary part.- vfloat, ndarray, shape
If the option has been set, or the 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.
- Raises
- NagValueError
- (errno )
The number of eigenvalues found to sufficient accuracy, as communicated through the argument [‘icomm’], is zero. See the function document for further details.
- (errno )
Got a different count of the number of converged Ritz values than the value passed to it through the argument [‘icomm’]: number counted , number expected .
- (errno )
During calculation of a real Schur form, there was a failure to compute eigenvalues in a total of iterations.
- (errno )
The computed Schur form could not be reordered by an internal call. This function returned with . Please contact NAG.
- (errno )
In calculating eigenvectors, an internal call returned with an error. Please contact NAG.
- (errno )
Either the solver function has not been called prior to the call of this function or a communication array has become corrupted.
- Warns
- NagAlgorithmicWarning
- (errno )
On entry, , but this is not yet implemented.
- 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 sparse, real and nonsymmetric. The suite can also be used to find selected eigenvalues/eigenvectors of smaller scale dense, real and nonsymmetric problems.
Following a call to
real_iter()
,real_proc
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 nonsymmetric matrices. There is negligible additional cost to obtain eigenvectors; an orthonormal basis is always computed, but there is an additional storage cost if both are requested.real_proc
is based on the function dneupd 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 nonsymmetric matrices is provided in Lehoucq and Scott (1996). This suite of functions offers the same functionality as the ARPACK software for real nonsymmetric problems, but the interface design is quite different in order to make the option setting clearer and to simplify some of the interfaces.real_proc
is a post-processing function that must be called following a successful final exit fromreal_iter()
.real_proc
uses data returned fromreal_iter()
and options, set either by default or explicitly by callingreal_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