MATLAB Answers

Solving for ALL the eigenvectors of a sparse matrix

조회 수: 9(최근 30일)
Joseph Feser
Joseph Feser 2021년 1월 18일
댓글: Christine Tobler 2021년 1월 22일
I'm trying to solve for all the eigenmodes of a large sparse matrix (symmetric and real too as it turns out) . 'eigs' can't do this, and 'eig' doesn't seem to take advantage of the fact that matrix is sparse (it actually goes faster when I make the same matrix 'full'). Are there any algorithms out there that quickly solve for all the modes, and can take advantage of sparsity to speed up the calculation?
  댓글 수: 2
Joseph Feser
Joseph Feser 2021년 1월 22일
I’m solving for the “phonon spectrum” of an extremely large unit cell with disorder (think of it as a giant system of vibrating masses and springs), and trying to classify the vibrational modes as propagons, diffusons, or locons. Suffice it to say I really do need ALL the modes.

댓글을 달려면 로그인하십시오.

답변(1개)

Christine Tobler
Christine Tobler 2021년 1월 19일
There isn't really an algorithm like this, unless you have a very specific structure (tridiagonal or banded matrix mostly).
The matrix of all eigenvectors of a large sparse matrix is going to be dense in nearly all cases - so since the output is going to be dense, it makes sense to just pass in a dense matrix on input.
A lot of sparse-specific algorithms like EIGS are mostly focused on cases where only the sparse matrix can be stored, because making it dense would not fit in memory. So in that case, you can't usually afford to compute all eigenvectors since they wouldn't fit in memory.
  댓글 수: 2
Christine Tobler
Christine Tobler 2021년 1월 22일
That's probably too large a band to see any significant improvement from using a banded algorithm for EIG instead of just passing in a dense matrix directly.
You can give this a try by comparing performance of EIG with one output for your matrix when you pass it in as sparse matrix vs. a dense one. EIG is able to compute eigenvalues but not eigenvectors of a sparse real and symmetric matrix. This doesn't help you, but it can give some indication of how much could be gained from using a banded solver vs. the standard solver for a dense matrix.
Is the band densely filled? If not, you could try to apply symamd in the hope that this will reduce the bandwidth of your matrix.

댓글을 달려면 로그인하십시오.

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by