On Fri, 2002-07-12 at 12:50, Gregory D Abram wrote: > > When you create the array you specifiy the "shape" of each element in the > array. If its a connections component that you are reading, and there are > n vertices per element: > > array = DXNewArray (TYPE_INT, CATEGORY_REAL, 1, n); > npoints = H5Sget_simple_extent_npoints (dataspace); > data = DXGetArrayData (DXAddArrayData (array, 0, (int) npoints, NULL)); > > Each element of the array is a n-vector, and there are npoints of them. > > H5Dread (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,H5P_DEFAULT, data)); > > retval = DXNewField (); > > You need to tell it the element type, which can be done several ways: > > DXSetAttribute((Object)array, "element type", "triangles"); > DXSetComponentValue (retval, "connections", (Object) array); > > Or after its stuck in the field: > > DXSetComponentValue (retval, "connections", (Object) array); > DXSetComponentAttribute(retval, "connections", "element type", > "triangles"); > > DXEndField (retval); > > I understand there's a HDF5 reader available through Cactus - and I think > it was Scott that told me about it.
Ah, excellent.. working great :) Thanks! As an aside, there is an HDF5 reader from Cactus-- which formed the basis for my code. Since HDF5 is only a "container" format, the actual structure of the data from an arbitrary application can vary-- theirs reads the cactuscode thorns' HDF5 output, and this one, when I'm done (hope to have a working version, albeit a simple one on Monday) will read the output from AVS 6.1's WriteHDF5. -- Mike Miller [EMAIL PROTECTED] -> [EMAIL PROTECTED]
signature.asc
Description: This is a digitally signed message part
