Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'scientific visualization + memory overuse' topicStudent Support Forum > General > Archives > "scientific visualization + memory overuse"

Help | Reply To Topic
Author Comment/Response
Dave
05/28/10 3:50pm

Hello everyone,

I'm having a problem with memory during large reads on Mathematica 7. Specifically, I call a routine that iteratively reads two files (x- and z-component velocity) line-by-line and exports the associated vector field. After about two iterations, Mathematica says that it's out of memory and quits. It would be convenient if this didn't happen.

I'm using Read[] to extract the data. Each line contains 1000*2000 real space-delimited values. After input, the lines are partitioned to conform to a 1000-by-2000 matrix whose elements are ordered pairs of ordered pairs (i.e., {{x,y},{px, py}}), in order to be fed into ListVectorPlot. The resulting image is exported.

If anyone has comments or suggestions on how this might be done efficiently, I'd love to hear them. I've been using Mathematica for just about everything--it would be great to get it to do one more trick.

I'm attaching the pared-down version of my code for completeness. I would be happy to provide clarification for anyone interested.

Thanks.


Attachment: outputeg.nb, URL: ,
Help | Reply To Topic