CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Sparse matrices

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2007, 21:10
Default Sparse matrices
  #1
rne
Guest
 
Posts: n/a
I was looking for a formal definition to "sparse matrices" but I only found definitions too general. Ok, I know that a sparse matrix has a bunch of null terms and just a few non zero terms scattered, but, how many zero terms? Is there a relationship to define it?

Regards

rne
  Reply With Quote

Old   November 8, 2007, 10:13
Default Re: Sparse matrices
  #2
Jonas Holdeman
Guest
 
Posts: n/a
You are trying to look at shades of gray and call them black or white. The best definition would be a functional one. At what level of sparcity and size is it more economical to use sparse-matrix techniques?

Full-matrix techniques ignore the fact that elements of the matrix might be zero, and store a lot of zeros and do a lot of multiplication by zero and additions of zero. For large matricies this easily gets out of hand, both in computational time and memory storage.

Sparse matrix techniques recognize that many matrix elements are zero and skip storing them and multiplying them and adding them. Sparse matrix techniques may have additional overhead in storage and programming, but this overhead does not grow very fast with matrix size compared with full matrix techniques, and for very large matricies becomes a negligible part of the computation.
  Reply With Quote

Old   November 8, 2007, 10:45
Default Re: Sparse matrices
  #3
rne
Guest
 
Posts: n/a
It was just curiosity since all definition seems to vague for me. A large number of zeroes does not say anything (at least for me). Regarding the sparse techniques involved you're completely right and I agree with you.

As an expression widely used in scientific computing there should be a precise relationship to define a sparse matrix. Something as simple as (number of zeroes/number of non-zeroes) > ??? %, voila! You've just got a sparse matrix.

>> At what level of sparcity and size is it more economical to use sparse-matrix techniques?

I will never know it since I can't define sparsity. I could say that even for a matrix with 5% or 10% of zeroes the use of sparse matrix techniques would pay the costs (indirect addressing by less memory storage and more flops), who knows?

There must be some studies about it (comparisons of the costs associated with dense and sparse techniques)
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FV matrices in terms of typical FE 'load vectors' diaw (formerly Des Aubery) Main CFD Forum 3 February 5, 2005 20:36
Manipulation on sparse data structure Takuya Tsuji Main CFD Forum 0 June 26, 2001 23:48
L-U decomposition of block matrices!! radhakrishnan Main CFD Forum 0 March 8, 2001 06:52
Solvers for Sparse Matrices Morvan Dominique Main CFD Forum 3 November 2, 1999 04:37
Wavefront's in sparse matrices J Roued Main CFD Forum 0 April 6, 1999 03:05


All times are GMT -4. The time now is 02:47.