SOME OF MY SOFTWARE
|
Sparse Matrices ·
mat2csr.m: Convert
sparse matrix from MATLAB format to CSR format. Optionally save sparsity pattern to file. Usefull
to represent graphs. |
|
Iterative Methods ·
reorth_arnoldi.m: Compute Arnoldi
decomposition ·
scalar_epsilon: Scalar epsilon, sequence acceleration
algorithm |
|
Pseudospectra Transfer Functions ·
trfomgrid.m : Transfer Functions, combined with
GRID and Restarted FOM
(requires reorth_arnoldi.m).
Here is an example call: A
= gallery('kahan',100); [OUT,nrm] = trfomgrid(A, -2+1.5*i, 1.5-1.5*i, 40, 40, 20, 20,
50, 1e-14, rand(100,1), 0); x=linspace(-2,1.5,40); y=
linspace(-1.5,1.5,40); [c,q]=contour(x,y,log10(OUT),[-1:-1:-7]); clabel(c,q); title('kahan(100). Pseudospectra
contours for log10(\epsilon)=-1:-1:-7'); figure(2); pcolor(x,y,log10(nrm)); colorbar; title('Norms
of residuals of restarted FOM for kahan(100)'); This
takes less than 2 secs on a P4 @ 3.2 Mhz. The domain of interest is: [-2, 1.5] x [1.5,-1.5].
We use a 40x40 mesh, Transfer Krylov dimension
m=20, Restarted FOM Kyrlov dimension d=20, maximum
number of restarts equal to 50, FOM conv. tol equal to 1e-14, and a random input vector. Set flag
to 0. An
example with a larger matrix from Matrix Market: tols4000 (n=4000). The
matrix is scaled for display reasons. [OUT,nrm] = trfomgrid(1e-3*A,
-2+5*i, 1.5-5*i, 40, 40,
20, 20, 50, 1e-14, rand(4000,1), 0); This
took 42 secs. Here (tols1.jpg and tols2.jpg) are
pictures of the outcome (contours and FOM norms respectively). |
The views and opinions expressed in this page are strictly those of the page author.
The contents of this page have not been reviewed or approved by the University of Minnesota.