views:

177

answers:

1

Without using VisIt's python library visit-writer.py, how can I import my data into VisIt? I'm aware of many alternative file formats but I can't find a simple library that takes my arrays of data and just writes it as a file. Specifically, my data consists of adaptive mesh boxes (really, voxels) and so I figure is best represented by an unstructured data grid. For each voxel, I have to attach various scalar or vector variables.

+1  A: 

From skimming the VisIt manual on "Getting Data Into VisIt", it seems like there are three basic ways to create VisIt-compatible data files:

  1. For scalar data on a uniform grid, it is probably easiest to format your data for VisIt's BOV ("brick-of-values") database reader plugin. This consists of a binary data file which is essentially a dump of the data array to disk, and a text-format header file which provides, among other things, the dimensions of the data, the type of the data, and the endian representation.
  2. For simulation code written in C(++) or Fortran, the Silo library (also developed at LLNL) can be used to create VisIt-compatible data files. "Getting Data Into VisIt" provides C and Fortran code examples for writing rectangular, curvilinear, point, and unstructured meshes using Silo.
  3. For simulation code written in C(++) or Python, the visit_writer library can be used to save the data in VTK (Visualization Toolkit) format.

The short answer is that, even though you wanted to avoid using visit_writer, it is probably the easiest way for Python to save your data in a VisIt-compatible format.

las3rjock
Yeah, I figured that I would end up with visit-writer, alas. It's just that it requires a full-blown installation of VisIt, and that's been painful to setup. Thanks though.
Chris