×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Matrix inversion and eigenvalue time depends on row ordering?

Matrix inversion and eigenvalue time depends on row ordering?

Matrix inversion and eigenvalue time depends on row ordering?

(OP)
In the book "Rotating Equipment Vibration" by Mauric Adams, he gives an algorithm for generating  M, K, C matrices for a rotor which is very straightforward (each rotor station gets 4 variables) until the point that he adds a mass below a bearing support.  To do this he inserts rows into the middle of the matrix which complicates the relationship between the indeces and the physical problem significantly, but preserves the pattern that the non-diagonal elements are concentrated along the diagonal and elements adjacent to the diagonal.   From the discussion I gather he did this intentionally because he believes it aids efficiency of the computer algorithm for eigenvalues although he doesn't mention Matlab.

Does anyone know if this is true for Matlab? For example is it easier/faster to compute eigenvalue for matrix with nonzero values concentrated along the diagonal:
X X 0 0 0 0
0 X X 0 0 0
0 0 X X 0 0
0 0 0 X X 0
0 0 0 0 X X

... (is it easier...)... than if we have the same matrix with two rows swapped (for more logical indexing) such as:
X X 0 0 0 0
0 0 X X 0 0
0 0 0 X X 0
0 0 0 0 X X
0 X X 0 0 0

Note the actual matrix could be somewhere in the range 50x50 or 100x100.   

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: Matrix inversion and eigenvalue time depends on row ordering?

http://en.wikipedia.org/wiki/Band_matrix

It's probably got more to do with storage efficiency than number of computations as such, but the first step in solving FEA models used to be to reorder the rows to get a near diagonal matrix, in fact that was my first ever piece of production code.

My guess is that people have put a lot of effort over the years into optimising the code for near diagonal matrices, so even  if there is no intrinsic advantage there is still a practical one.

Cheers

Greg Locock

SIG:Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.

RE: Matrix inversion and eigenvalue time depends on row ordering?

Oh, I was wrong, the total cpu time was related to the rms of the average bandwidth, so there is a computational advantage in using a near diagonal matrix.

OTOH, cpu time is cheap these days and it sounds like your matrix is small, if a non diagonal matrix is easier to debug I'd use that.

Cheers

Greg Locock

SIG:Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.

RE: Matrix inversion and eigenvalue time depends on row ordering?

(OP)
Thanks.  I guess he wasn't off his rocker after all.

As you say, in this case might as well program it the way that seems most straightforward without worrying about efficiency.  

btw, my example X's and O's tried to make it simple but wasn't completely right... the extra pieces are inserted as boths rows/columns in the middle of the matrix.   But I think you got the idea anyway.

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: Matrix inversion and eigenvalue time depends on row ordering?

Try posting this question on the com.soft-sys.matlab USENET newsgroup.  There are some seriously good linear algebra gurus there, including the chap who wrote the sparse matrix solvers.

- Steve

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now