Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: create large sparse FEM matrix --> out of memory
Date: Mon, 10 Aug 2009 18:25:20 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <h5pomg$acs$1@fred.mathworks.com>
References: <h5pbe7$nc2$1@fred.mathworks.com> <h5pf1k$qit$1@fred.mathworks.com> <h5pm76$ou1$1@fred.mathworks.com> <h5pn7m$3po$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1249928720 10652 172.30.248.38 (10 Aug 2009 18:25:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 10 Aug 2009 18:25:20 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1337510
Xref: news.mathworks.com comp.soft-sys.matlab:562209


> I see, but many of them must have the same indices. You don't need to list them all and build the stiffness matrix. I bet the final matrix has much less than 80 millions non-zero elements.
> 
> You might be able to allocate the matrix and fill it progressively (or by chunk). Might be loop differently when assembling would help.

it's true that many nodes will share the same index and therefore the final matrix has much less than 80million non-zero elements. however then the assembly and preallocation gets more difficult...

i guess, i'll have to figure out another way to know the final number of non-zero elements and then write the assemble the matrix.

> > as far as i know, some commercial FE packages write to the disk to temporarly store data and also the price of the license depends on how many nodes it can handle. however i dont know how to write such a code that transfers data to the hard disk and i also think it's very hard to make it efficient. however, i'm not sure wether that's really the way it works. just heard it somewhere...
> 
> Yes, this is absolutely needed 10 years ago where RAM is limited. For modern computer running on 64-bits OS, I believe writing on disk is no-longer required.
> 
> I bet your matrix can be stored entirely in the memory.

i want it to also work on "older" 32bit systems. also, i'm a little confused why commercial packages can handle 1 million nodes, while i can only handle ~100 000nodes. i think they still must have some tricks.

> Take a look at this FEX, it might help to assemble matrix by chunk. http://www.mathworks.com/matlabcentral/fileexchange/23488

thanks for the link, i'll have a look at it and hope that it can solve my problems