We’re rewarding the question askers & reputations are being recalculated! Read more.

# Tag Info

7

Unfortunately, convergence of GMRES does not have a clear dependence on the distribution of eigenvalues. It was proved by Greenbaum, Ptak and Strakos in 1996 that you can construct examples with an arbitrary spectrum and an arbitrary convergence history: that is, give me any $n$ nonzero complex numbers, and any decreasing sequence $\|r_k\|$, and I can ...

5

Estimates for GMRES convergence based on eigenvalue distribution often implicitly assume that the matrix is normal. Sometimes the convergence rate is still provable in an asymptotic sense in the non-normal case, but if the matrix is severely non-normal then the "pre-asymptotic" behavior will make such convergence rates never reachable in practice. Your ...

3

Matlab internally uses compressed sparse column (CSC) format for sparse matrices. The design and implementation of Matlab's sparse matrices are described in this document. As a consequence of using CSC format, indexing into sparse matrices can be an expensive operation. This is discussed in the help pages on sparse matrices.

3

It's almost impossible to say whether a direct solver will outperform an iterative solver or vice-versa without knowing more specific information about the sparse matrix. The key problem with direct solvers is fill-in, which happens during factorization phase and causes a lot of extra memory consumption. But not all sparse matrices will have a devastating ...

2

Your question concerning wavenumber 'replacement' is rather tricky. In general, wavenumber modification of this sort is not intended to save flops, as some have suggested here, but instead designed to respect the analytic peculiarities of, say, certain differential operators. I'm very surprised that I couldn't find a related discussion in Trefethen's ...

2

MATLAB's definition is afun = @(x,n)gallery('moler',n)*x;% returns A*x So you can pass as an argument the size n of the matrix. If you would run the code for different values of n, you simply need to declare the n and run the code, like: for n1 = 10:21 % do something b1 = afun(ones(n1,1),n1); [x1,flag1,rr1,iter1,rv1] = pcg(@(x)afun(x,n1),b1,...

2

Well, I can only propose a potential cause for why GMRES method fails for the problem you showed. I don't have enough reputation so I can't comment. Since GMRES is using Anorldi Process to generate a set of orthogonal vectors in the Krylov subspace, if the matrix itself is very large, that means the Q and H matrix produced could be very large. So if you ...

1

I think you are using a downwind- instead of an upwind finite difference. This leads to your code imposing a boundary condition where it is not allowed. The solution to your convection equation is basically (ignoring the left BC for the moment) $$C(x,t) = C_0(x - v t)$$ where $C_0$ is your initial value. Thus, if $v > 0$, it is a rightward travelling ...

Only top voted, non community-wiki answers of a minimum length are eligible