[CIG-LONG] Does Gale still output the .dat files?

Bill Broadley bill at cse.ucdavis.edu
Wed Aug 19 17:45:28 PDT 2009


>Mark Fleharty <mark.fleharty at gmail.com> wrote:
>> Several versions ago Gale used to output .dat files.  These files are
>> what are read in the Matlab scripts.
>
>Gale still outputs .dat files, you just have to turn on checkpointing.
>Gale no longer outputs .txt files.  The Matlab scripts used to use the
>.txt files to get yielding information, so scripts that read the vtu
>files would be most welcome.
>
>> If Gale doesn't support this anymore it is not a problem for me, I
>> have an XML parser to read the vts files which contain the same
>> information (I'll be willing to share as soon as it is a bit more
>> complete).  I just wanted to check to see if I wasn't missing
>> something.

>I would love to see your scripts, whatever their condition.


I ran into the same thing and emailed Mark asking about his scripts which
sounded pretty close.  I had started with the XML parsing and had stalled out.

Well after emailing Mark I decided to finish my script.  One of my users
wanted just X, Y, Z, Viscosity, Density, and Material_Index.  Ideally in a
spreadsheet friendly format.  The produced result (after some debugging):
0.000128 0.000655 0.000431 1.100000 2600.000000 0
0.000116 0.000655 0.000437 1.100000 2600.000000 0
0.000138 0.000637 0.000427 1.000000 2700.000000 2
0.000141 0.000647 0.000436 1.000000 2700.000000 2
0.000121 0.000656 0.000445 1.100000 2600.000000 0
0.000127 0.000634 0.000444 1.000000 2700.000000 2
0.000118 0.000650 0.000436 1.100000 2600.000000 0
0.000132 0.000643 0.000448 1.000000 2700.000000 2
0.000133 0.000633 0.000427 1.100000 2600.000000 0

In parsing the particle files I noticed that the X, Y, and Z section has no
name, ideally a name would be added.  Something like:
<DataArray type="Float64" NumberOfComponents="3" name="position" format="ascii">

The code's a bit rough, but should parse anything XML like and allow people to
pull the fields they want.  The code is at:
http://cse.ucdavis.edu/bill/decode2.py

Be warned that it stores all the relevant data in ram at the same time (to
convert the large XML blobs into columns).  I could write each one to a file
then do a file merge, but at least so far our particle files easily fit into
memory.


More information about the CIG-LONG mailing list