An answer to my own question: Line 21 of product1.dx should have "productarray" in place of "product array". With that change the example loads.
John On Monday 15 December 2003 11:58 am, John F. Gibson wrote: > I'm trying to write opendx-format output functions > for my CFD code, a spectral channel-flow code on > a regular x chebyshev x regular grid. My problem is > that all the irregular grid examples in IBM's > documentation produce errors when I run them in > opendx-4.2 or 4.3. > > Can anyone provide me with a working example > of irregular rectangular grid import, in any format? > Or tell me what's wrong with the following native- > format data file, "product1.dx", taken verbatim from > > > http://www.research.ibm.com/dx/docs/legacyhtml/pages >/usrgu065.htm > > Here's what happens when I try to import > product1.dx: > > [EMAIL PROTECTED] dx -script > ... > Version - 4.3.2 > Memory cache will use 660 MB (40 for small items, > 620 for large) > > 0: worker here [7283] > dx> data = Import("product1.dx", format = "dx"); > 0: ERROR: 36::/Import:0: Invalid data: bad or > missing object type / file 'product1.dx' line 21 dx> > > Line 21 is the "object 3 class product array" line. > > product1.dx > ---------------------------------------------------- >-------- # define a set of irregular points in the xy > plane object 1 class array type float rank 1 shape 3 > items 8 data follows 0.0 0.0 0.0 > 0.0 1.1 0.0 > 1.0 0.2 0.0 > 1.1 1.3 0.0 > 2.2 0.2 0.0 > 2.5 1.1 0.0 > 3.5 0.1 0.0 > 3.4 1.0 0.0 > > > # define a set of regular points in the z direction > object 2 class regulararray count 3 > origin 0.0 0.0 0.0 > delta 0.0 0.0 1.0 > > > # create a product array of the irregular points in > the xy plane and # the regular points in the z > direction > object 3 class product array > term 1 > term 2 > > > # create regular cube connections > object 4 class gridconnections counts 4 2 3 > > > # the data component > object 5 class array type float rank 0 items 24 data > follows 1.0 2.1 2.0 1.0 4.5 6.7 8.1 > 2.0 -0.9 -0.8 1.0 1.2 1.3 0.1 0.3 3.0 > 1.2 3.2 4.1 0.9 2.0 1.0 -0.9 2.0 > > > object "field" class field > component "positions" 3 > component "connections" 4 > component "data" 5 > end > ---------------------------------------------------- >------------------------ > > many thanks, > > John Gibson -- John F. Gibson [EMAIL PROTECTED] 47 Montgomery St. #1 617 441-3609 Cambridge, MA 02140
