read_plot3d

Synopsis

This module reads either a formatted or unformatted multiblock PLOT3D data set consisting of the grid and data vector (Q file).

Parameters

The following lists all of the parameters found in the parameter block ReadPlot3dParams, which are accessed by the module ReadPlot3dFile and the UI Macro ReadPlot3dUI.

Name Type Description UI Control

filename_xyz string The selected grid file (x.dat) XYZ (Grid) Filename
filename_q string The selected data file (q.dat) Q (Results) Filename
iblanks integer Indicate presence of iblank values in the data files IBlanks
format integer Select the file format: ASCII, Binary, or Binary with Padding File Format
use_q integer Process Q file; otherwise ignore only building mesh data structure Use Q file data
trigger integer Start the read process Read
dims3d integer Assume data is 3D if selected, if not, assume 2D only 3D
multiblock integer Assume multiblock format or else simple 1-block binary files Multiblock
<none> <none> Clear the filename entries Clear

Ouput Ports

Name Type Description

out Multi_Block (link) Multi-block output containing array of fields
fields field array (mlink) Link to the fields sub-object of the multi-block output

Description

This module reads either a formatted or unformatted multiblock PLOT3D data set consisting of the grid and data vector (Q file). 3D, 2D, ASCII, binary or Fortran unformatted files are handled. No corrections are made for block edge overlap and no co-incident node removal is attempted between blocks. The cells of the output field structure created are all hexahedra. If no Q (result data) is present, visualizations can be made of the mesh file only.

ReadPlot3dFile reads in several of the possible plot3d file types, a multiblock (with or without iblanks) stored in the whole field format, or a single 1-block file. The Q vector is labeled with the default names of the primative variables.

File formats may be ASCII formatted, and two types of binary file. In the "binary" mode, the file is accessed as a continuous stream. In the "unformatted" mode, padding records are assumed at the end of logical blocks, such as caused by FORTRAN I/O, if the padding option is turned on, otherwise straight binary with no padding is assumed.

If non-multiblock is selected, just one block is output, and no leading header is assumed.

The reader automatically checks and detects BigEndian/LittleEndian format mode, and does byte swapping on the fly. This means that data generated on a UNIX machine can be viewed on an Intel PC, or that data generated on a Dec Alpha can be visualized on a Sun or SGI.

The reader is written in an "omethod" style in C, with a multi-block (arrays of fields) output data structure. The DVswitch module can be used to select just one of the blocks for visualization with Main-Page modules, otherwise use the ARR modules for multiblock processing.

Typical Usage: You have to have some idea of what the files contain before reading, or just experiment by pushing various combinations of parameters.

Parameters

&ReadPlot3dFileParams

Reference to the parameter block, which contains real instances of the various toggles and filenames.

filename_xyz

The selected grid file (x.dat)

filename_q

The selected data file (q.dat)

iblanks

A boolean parameter to indicate the presence of iblank values in the data files.

format

Select the file format: ASCII, Binary, or Binary with Padding

use_q

If selected, will try to process Q file; otherwise, will ignore and only build the mesh data structure.

trigger

Button to actually do the read. All other parameter interfaces may be set or changed beforehand, without triggering the read process.

dims3d

Assume data is 3D if selected, if not, assume 2D only

multiblock

Assume multiblock format or else simple 1-block binary files.

Output Ports

out

Multi-block output containing array of fields.

fields

Link to the fields sub-object of the multi-block output.

Utility Macros

The low-level ReadPlot3dFile module is used in the Functional Macro ReadPlot3d and the User Macro read_plot3d. Additionally, the module, the Functional Macro and the UI Macro ReadPlot3dUI have references to the parameter block ReadPlot3dParams. There is a real instance of the parameter block in read_plot3d.

Example

An example application ReadPlot3dEg is provided, which reads the bluntfin plot3d data found in the AVS/Express installation directories, and then renders an orthogonal slice through the dataset.

Note that a link object is used to extract a single field from the field array output of the module.

Files

iac_proj/rdplot3d/rdp3macs.v contains the read_plot3d User Macro, the ReadPlot3d Functional Macro, the ReadPlot3dUI UI Macro, and the example application ReadPlot3dEg V definitions.

Other Notes

The read_plot3dMacs library inherits its process. As this library contains no procedural code, the process is not important. The low-level ReadPlot3dFile module, executes under the process specified in its library, not the process defined in the high-level library.

Authors

Ian Curington, AVS Inc (AVS/Express Port)
Michael J. Rangitsch (AVS5 version, 11 Oct 1994)

Modifications

Paul G. Lever

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL

See Also

ReadPlot3dParams, ReadPlot3dFile, ReadPlot3dUI and ReadPlot3d.

Plot3d_Multi_Block