jdqz computes a partial generalized Schur decomposition (or QZ decomposition) of a pair of square matrices or operators.
Lambda = jdqz(A,B) and jdqz(A,B) return k eigenvalues
of the matrix pair (A,B), where k = min(5,n) and n =
size(A,1) if k has not been specified.
[X,Jordan] = jdqz(A,B) returns the eigenvectors Xx and the
Jordan structure Jordan: AX = BXJordan. The
diagonal of Jordan contains the eigenvalues: Lambda =
diag(Jordan). Jordan is an k by k matrix with the
eigenvalues on the diagonal and zero or one on the first upper diagonal
elements. The other entries are zero.
[X,Jordan,history] = jdqz(A,B) returns also the convergence history.
[X,Jordan,Q,Z,S,T,history] = jdqz(A,B)
If between four and seven
output arguments are required then Q and Z are n by
k orthonormal, S and T are k by k upper
triangular such that they form a partial generalized Schur
decomposition: AQ = ZS and BQ = ZT.
Then Lambda = diag(S)./diag(T) and X = QY with Y
the eigenvectors of the pair (S,T): SY =
TYJordan (see also Options.Schur).
jdqz(A,B)
jdqz('Afun','Bfun')
The first input argument is either a square matrix (which can be full or
sparse, symmetric or nonsymmetric, real or complex), or a string
containing the name of an M-file which applies a linear operator to the
columns of a given matrix. In the latter case, the M-file, say Afun.m,
must return the dimension N of the problem with n =
Afun([ ],'dimension'). For example, jdqz('fft',...) is much faster
than jdqz(F,...), where F is the explicit FFT matrix.
If another input argument is a square n by n matrix or the
name of an M-file, then B is this argument (regardless whether A is an M-file or a matrix). If B has not been specified, then
B is assumed to be the identity unless A is an M-file with
two output vectors of dimension n with [Av,Bv] = Afun(v), or
with Av = Afun(v,'A') and Bv = Afun(v,'B').
The remaining input arguments are optional and can be given in
practically any order:
[X,Jordan,Q,Z,S,T,history] = jdqz(A,B,k,Sigma,Options)
where
k | an integer, the number of desired eigenvalues. | |
Sigma | a scalar shift or a two letter string. | |
Options | a structure containing additional parameters. |
If, in addition, there are other input arguments, then
they are passed
to 'Afun' and to 'Bfun' as input arguments.
If k is not specified, then k = min(n,5) eigenvalues are
computed.
If Sigma is not specified, then the kth eigenvalues largest
in magnitude are computed. If Sigma is a real or complex scalar,
then the kth eigenvalues nearest Sigma are computed. If Sigma is column vector of size (m,1), then the jth
eigenvalue nearest to Sigma(min(j,m)) is computed for j =
1:k. Sigma is the ``target'' for the desired eigenvalues. If Sigma is one of the following strings, then it specifies the desired
eigenvalues.
Sigma | Specified eigenvalues | |
'LM' | Largest Magnitude | |
'SM' | Smallest Magnitude (same as Sigma = 0) | |
'LR' | Largest Real part | |
'SR' | Smallest Real part | |
'BE' | Both Ends. Computes k/2 eigenvalues from each end of the spectrum (one more from the high end if k is odd.) |
If 'TestSpace' is 'Harmonic'
(see Options), then Sigma = 0 is the default, otherwise Sigma = 'LM' is the default.
The Options structure specifies certain parameters in the
algorithm.
Field name | Parameter | Default | ||||
Options.Tol | Convergence tolerance:
norm(r) tol/sqrt(k) |
1e-8 | ||||
Options.jmin | Minimum dimension search subspace V | k+5 | ||||
Options.jmax | Maximum dimension search subspace V | jmin+5 | ||||
Options.MaxIt | Maximum number of iterations. | 100 | ||||
Options.v0 | Starting space | ones+0.1rand | ||||
Options.Schur | Gives schur decomposition
If 'yes', then X and Jordan are not computed and [Q,Z,S,T,history] is the list of output arguments. |
'no' | ||||
Options.TestSpace | Defines the test subspace W
W = V is justified if B is positive definite. |
'Harmonic' | ||||
Options.Disp | Shows size of intermediate residuals and the convergence history | 'no' | ||||
Options.LSolver | Linear solver | 'GMRES' | ||||
Options.LSTol | Residual reduction linear solver | 1,0.7,0.7 2,... | ||||
Options.LSMaxIt | Maximum number it. linear solver | 5 | ||||
Options.LSell | ell for BiCGstab(ell) | 4 | ||||
Options.Precond | Preconditioner | identity. |
For instance,
Options = struct('Tol',1.0e-8,'LSolver','BiCGstab','LSell',4,'Precond',M);
changes the convergence tolerance to 1.0e-8, takes BiCGstab as linear solver, and takes M as preconditioner (for ways of defining M, see below).
There are a few other Options that can be specified. They are listed here.
jdqz without input arguments returns the options and its defaults.