[FLASH-USERS] FLASH and Octave

Nathan Hearn nhearn at ucar.edu
Fri Jan 28 05:46:14 EST 2011


Hi Aaron (and any other interested parties),

    I made a quick attempt to build some Octave bindings for
QuickFlash, similar to the Python ones that are included.  (SWIG makes
this stuff so easy...)  I produced a branch in the QuickFlash
Subversion repository,

https://quickflash.svn.sourceforge.net/svnroot/quickflash/branches/octave-swig

which is based on the original QuickFlash 1.0.0 release (not the
current trunk), and can be downloaded via the command

svn co https://quickflash.svn.sourceforge.net/svnroot/quickflash/branches/octave-swig
quickflash-octave

to produce the local directory quickflash-octave.

    This the code in this branch is built the same way as in the 1.0.0
release, but with the additional build.py option "--enable-octave".
By default, the build system will assume that SWIG can be run by the
name "swig", and that the Octave compiler is run via "mkoctfile".  If
these programs are not in your $PATH list, you can set them directly
in your machines.cfg setup via

SWIG /path/to/swig
OCTAVE_MKOCTFILE /path/to/mkoctfile

After successful completion of the build process, there will be a file
named quickflash.oct in the octave directory in QuickFlash, which you
can move elsewhere, if you wish.  I don't know much about using
external modules in Octave, but if you run Octave in the same
directory as quickflash.oct and provide the command "quickflash", the
module should load.  Typing "quickflash" again gives a list of all of
the functions available.  (These are currently limited to the same
capabilities found in the Python bindings, which is a subset of the
C++ library; if anything you need is missing, let me know.)  They
should give you direct access to files, simulation information,
blocks, particles, tree traversal routines, etc.

    I have confirmed that quickflash.oct can be built on Mac OS 10.5
(Intel) using GCC 4.3.3, Octave 3.0.3, and SWIG versions 1.3.38 and
2.0.0.  (All of which are pretty dated by now, but newer versions
should work just as well.)

    Unfortunately, it is late, and I haven't had a chance to test the
Octave routines on actual Flash data files, but please feel free to
give them a try.  Please let me know if you have any questions.


- Nathan


On Wed, Jan 26, 2011 at 14:15, Aaron  Froese
<aaron.froese at generalfusion.com> wrote:
> Hi all,
>
> In order to analyze FLASH results with Octave, I am currently extracting the HDF5 plot files with Quickflash and loading them into Octave as a formatted text file.  Is there a more elegant method of doing this?
>
> Aaron



More information about the flash-users mailing list