0
$\begingroup$

I'm no expert on the different types of algorithms to compute eigenvalues and vectors for a real, symmetric matrix (coming from linear mass and stiffness matrices for a frame FEA model). I am looking for a good blend of computational efficiency and ease of coding for a system of ~300 DoFs where I only need the first N (N between 1 and 10) eigenvalues and vectors. I will be programming it in VBA, so the less bundled algorithms (e.g. decompositions and things) that I need to program are a factor, too.

I was figuring on inverse power iterations with shifting, but am concerned about stability or skipping an eigenvalue if I shift too much or too little. Is this a realistic concern?

$\endgroup$
2
  • $\begingroup$ 300 is tiny, just compute them all? Unless you plan on repeating this operation hundreds or thousands of times. $\endgroup$
    – user20857
    Commented Aug 16, 2016 at 21:46
  • $\begingroup$ I want a runtime on the order of a few seconds. Can I compute them all that quickly with something like general Jacobi method? My question was about what algorithm to use, so any suggestion is helpful. $\endgroup$
    – M. LeVett
    Commented Aug 17, 2016 at 13:18

1 Answer 1

3
$\begingroup$

A couple of options:

  1. A matrix of size 300 is very small, and computing this many eigenvalues and vectors shouldn't take more than a couple seconds on any modern computer. Usually the QR algorithm is used when computing all eigenvalues. It is advisable to use LAPACK routines for this, they have great documentation and are widely used. Implementing this should be very easy and quick.

  2. If (1.) doesn't cut it, you can indeed find just the smallest eigenvalues and vectors you need (which should be quicker if you can provide the inverse operator). There are many options; power iteration and the Arnoldi method are often used. The Arnoldi method can be implemented using ARPACK and a whole suite of other methods are included in SLEPc (which gives you some flexibility).

$\endgroup$
3
  • $\begingroup$ I'm trying to stray away from external libraries and program everything myself in VBA. It has at least an included inverse operator, so I am thinking power iteration. Cheers, thanks for the input. $\endgroup$
    – M. LeVett
    Commented Aug 17, 2016 at 18:22
  • 2
    $\begingroup$ I believe LAPACK has add-ins for VBA. There's no merit badge for coding everything yourself when experts have already done it for you! $\endgroup$
    – user20857
    Commented Aug 17, 2016 at 19:22
  • $\begingroup$ "There's no merit badge for coding everything yourself when experts have already done it for you!" -- Word! $\endgroup$ Commented Aug 18, 2016 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.