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

Help--Matrix Too Large

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2000, 19:31
Default Help--Matrix Too Large
  #1
Paul Safier
Guest
 
Posts: n/a
Hello,

My problem is that the finite element code I am using generates a very large matrix. I don't have the computer memory to store it. The matrix is, however, very sparse. I want to store only the non-zero elements, but I can't identify a specific form. Can anyone suggest a way to identify, then store the non-zero elements and ulimately invert this matrix?

Any suggestions would be appreciated...

Thank you. Paul Safier
  Reply With Quote

Old   November 6, 2000, 23:59
Default Re: Help--Matrix Too Large
  #2
Tareq Al-shaalan
Guest
 
Posts: n/a
You can use Conjecate Gradient methods
  Reply With Quote

Old   November 7, 2000, 01:48
Default Re: Help--Matrix Too Large
  #3
Nishikawa
Guest
 
Posts: n/a
If the matrix has a certain pattern, I think you can save your memory.

For example, if it is tridiagonal such as three elements in a row. Use three one-dimensional arrays, or nx3 matrix for which you can find a relation between the old and new indeces easily.
  Reply With Quote

Old   November 7, 2000, 08:25
Default Re: Help--Matrix Too Large
  #4
Sebastien Perron
Guest
 
Posts: n/a
If the mesh in not structured there will be no pattern. For such a case you will have to construct the following structures

1) a Vector ( or a vector of vectors) where the non-zero entries of the matrix will be store (type real)

2) a Vector ( or a vector of vectors) where the "pointers" (integer) will be store. These pointers will indicate what are the correspondance for your sparce matrix.

3) a Vector which contains the number of entries for each elements As an exemple: nb=[2,4,3,2]

A=[[4., 7.],[5.,8.,8.,9.],[1.,4.,6.],[3.,6]]

LI=[[1,4],[1,2,3,4],[1,2,3],[3,4]]

This will take far less storage. But, in the other hand, you will have to construct a routine to perform the matrix*vector product.

There is no easy way. But this is fearly easy in C++ or C.
  Reply With Quote

Old   November 7, 2000, 12:18
Default Re: Help--Matrix Too Large
  #5
kalyan
Guest
 
Posts: n/a
There are many ways to store a large sparse matrix. The easiest is perhaps the triad format.

You can find details on this at netlib.org. This is a link to a source code that uses sparse Gaussian elimination for solving a linear system.

www.netlib.org/toms/533

The storage of the large sparse matrix is explained here. Once you put your matrix in this format, in addition to the Gaussian elimination, you can try various methods like CG, CGS, GMRES etc. with relative ease since source codes for these methods are available in the netlib repository.

More efficient ways of storing would require either pointers and/or structured meshes with standard discretization stencils.
  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
Force can not converge colopolo CFX 13 October 4, 2011 22:03
C++ solver for Large sparse matrix! sina_mech Main CFD Forum 7 November 20, 2009 13:52
OpenFOAM version 1.6 details lakeat OpenFOAM Running, Solving & CFD 42 August 26, 2009 21:47
free C code for large sparse matrix linear solver ztdep Main CFD Forum 7 May 24, 2007 14:14
solver for linear system with large sparse matrix Yangang Bao Main CFD Forum 1 October 25, 1999 04:22


All times are GMT -4. The time now is 22:31.