DESCRIPTIONThis module reads in lattice data in IRIS Explorer lattice format (either ASCII or binary), such as that transcribed by WriteLat or DataScribe modules, or in `plain' ASCII format.
The plain format allows a single file to contain multiple data structures, or steps. The variable nSteps (see below) gives the number of steps in the file. This is used by ReadLat when selecting the data step to be inserted into the output lattice.
The plain file format is as follows. The first line of the file must be
#!/usr/explorer/bin/explorer cxLattice plain 1.0
Comment lines begin with a `#' character, and whitespace is ignored. The file may contain multiple data structures (or steps). The file should contain the following fields, in this order:
- number of dimensions of the input lattice.
- the vector of dimensions of the input lattice.
- the number of data variables at each node of the lattice.
- primitive type of data, represented as an integer. Its value must be 0 for byte, 1 for short, 2 for long, 3 for float, 4 for double.
- type of coordinates, represented as an integer. Its value must be 0 for uniform, 1 for perimeter, 2 for curvilinear.
- the number of data structures in the file.
- the number of coordinate variables. This variable must only be present in the file if the coordinate type is curvilinear.
- coordinate values
- For uniform lattices, these are the bounding box values; for perimeter values these are the values of the edge points. For curvilinear lattices the coordinate values are arranged in row-major format (ie. I varying fastest). See the Module Writer's Guide for a description of lattice coordinate arrays.
- data values
- for step = 1 .. nSteps. Data vector at each node, again with I varying fastest.
Port: File Name
The name of the file to be read.
If the file contains data at multiple time steps, this parameter is used to select the step number, otherwise the widget is hidden. It is only visible when reading a file in the `plain' format.
The output lattice.
KNOWN PROBLEMSThe file browser widget does not correctly browse files on remote machines. The remote filename can be entered in the selection box, but the option menu is inoperable. Only crude error checking is done for plain format files. If the input file is malformed, the module may crash.
SEE ALSOWriteLat, GenericDS.
© The Numerical Algorithms Group Ltd, Oxford UK. 2000