VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkMultiBlockPLOT3DReader Class Reference

read PLOT3D data files More...

#include <vtkMultiBlockPLOT3DReader.h>

Inheritance diagram for vtkMultiBlockPLOT3DReader:
Inheritance graph
[legend]
Collaboration diagram for vtkMultiBlockPLOT3DReader:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { FILE_BIG_ENDIAN = 0, FILE_LITTLE_ENDIAN = 1 }
typedef
vtkMultiBlockDataSetAlgorithm 
Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkMultiBlockPLOT3DReaderNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual int CanReadBinaryFile (const char *fname)
void SetFileName (const char *name)
const char * GetFileName ()
virtual void SetXYZFileName (const char *)
virtual char * GetXYZFileName ()
virtual void SetQFileName (const char *)
virtual char * GetQFileName ()
virtual void SetFunctionFileName (const char *)
virtual char * GetFunctionFileName ()
virtual void SetAutoDetectFormat (int)
virtual int GetAutoDetectFormat ()
virtual void AutoDetectFormatOn ()
virtual void AutoDetectFormatOff ()
virtual void SetBinaryFile (int)
virtual int GetBinaryFile ()
virtual void BinaryFileOn ()
virtual void BinaryFileOff ()
virtual void SetMultiGrid (int)
virtual int GetMultiGrid ()
virtual void MultiGridOn ()
virtual void MultiGridOff ()
virtual void SetHasByteCount (int)
virtual int GetHasByteCount ()
virtual void HasByteCountOn ()
virtual void HasByteCountOff ()
virtual void SetIBlanking (int)
virtual int GetIBlanking ()
virtual void IBlankingOn ()
virtual void IBlankingOff ()
virtual void SetTwoDimensionalGeometry (int)
virtual int GetTwoDimensionalGeometry ()
virtual void TwoDimensionalGeometryOn ()
virtual void TwoDimensionalGeometryOff ()
virtual void SetDoublePrecision (int)
virtual int GetDoublePrecision ()
virtual void DoublePrecisionOn ()
virtual void DoublePrecisionOff ()
virtual void SetForceRead (int)
virtual int GetForceRead ()
virtual void ForceReadOn ()
virtual void ForceReadOff ()
void SetByteOrderToBigEndian ()
void SetByteOrderToLittleEndian ()
virtual void SetByteOrder (int)
virtual int GetByteOrder ()
const char * GetByteOrderAsString ()
virtual void SetR (double)
virtual double GetR ()
virtual void SetGamma (double)
virtual double GetGamma ()
void SetScalarFunctionNumber (int num)
virtual int GetScalarFunctionNumber ()
void SetVectorFunctionNumber (int num)
virtual int GetVectorFunctionNumber ()
void AddFunction (int functionNumber)
void RemoveFunction (int)
void RemoveAllFunctions ()

Static Public Member Functions

static vtkMultiBlockPLOT3DReaderNew ()
static int IsTypeOf (const char *type)
static vtkMultiBlockPLOT3DReaderSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkMultiBlockPLOT3DReader ()
 ~vtkMultiBlockPLOT3DReader ()
vtkDataArrayCreateFloatArray ()
int CheckFile (FILE *&fp, const char *fname)
int CheckGeometryFile (FILE *&xyzFp)
int CheckSolutionFile (FILE *&qFp)
int CheckFunctionFile (FILE *&fFp)
int SkipByteCount (FILE *fp)
int ReadIntBlock (FILE *fp, int n, int *block)
int ReadScalar (FILE *fp, int n, vtkDataArray *scalar)
int ReadVector (FILE *fp, int n, int numDims, vtkDataArray *vector)
int GetNumberOfBlocksInternal (FILE *xyzFp, int allocate)
int ReadGeometryHeader (FILE *fp)
int ReadQHeader (FILE *fp, bool checkGrid, int &nq, int &nqc, int &overflow)
int ReadFunctionHeader (FILE *fp, int *nFunctions)
void CalculateFileSize (FILE *fp)
long EstimateSize (int ni, int nj, int nk)
int AutoDetectionCheck (FILE *fp)
void AssignAttribute (int fNumber, vtkStructuredGrid *output, int attributeType)
void MapFunction (int fNumber, vtkStructuredGrid *output)
void ComputeTemperature (vtkStructuredGrid *output)
void ComputePressure (vtkStructuredGrid *output)
void ComputeEnthalpy (vtkStructuredGrid *output)
void ComputeKineticEnergy (vtkStructuredGrid *output)
void ComputeVelocityMagnitude (vtkStructuredGrid *output)
void ComputeEntropy (vtkStructuredGrid *output)
void ComputeSwirl (vtkStructuredGrid *output)
void ComputeVelocity (vtkStructuredGrid *output)
void ComputeVorticity (vtkStructuredGrid *output)
void ComputePressureGradient (vtkStructuredGrid *output)
void ComputePressureCoefficient (vtkStructuredGrid *output)
void ComputeMachNumber (vtkStructuredGrid *output)
void ComputeSoundSpeed (vtkStructuredGrid *output)
void ComputeVorticityMagnitude (vtkStructuredGrid *output)
void ComputeStrainRate (vtkStructuredGrid *output)
vtkDataArrayNewFloatArray ()
void ClearGeometryCache ()
virtual int FillOutputPortInformation (int port, vtkInformation *info)
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)

Protected Attributes

char * XYZFileName
char * QFileName
char * FunctionFileName
int BinaryFile
int HasByteCount
int TwoDimensionalGeometry
int MultiGrid
int ForceRead
int ByteOrder
int IBlanking
int DoublePrecision
int AutoDetectFormat
long FileSize
double R
double Gamma
double Uvinf
double Vvinf
double Wvinf
vtkIntArrayFunctionList
int ScalarFunctionNumber
int VectorFunctionNumber
vtkMultiBlockPLOT3DReaderInternalsInternal

Detailed Description

read PLOT3D data files

vtkMultiBlockPLOT3DReader is a reader object that reads PLOT3D formatted files and generates structured grid(s) on output. PLOT3D is a computer graphics program designed to visualize the grids and solutions of computational fluid dynamics. This reader also supports the variant of the PLOT3D format used by NASA's OVERFLOW CFD software, including full support for all Q variables. Please see the "PLOT3D User's Manual" available from NASA Ames Research Center, Moffett Field CA.

PLOT3D files consist of a grid file (also known as XYZ file), an optional solution file (also known as a Q file), and an optional function file that contains user created data (currently unsupported). The Q file contains solution information as follows: the four parameters free stream mach number (Fsmach), angle of attack (Alpha), Reynolds number (Re), and total integration time (Time). This information is stored in an array called Properties in the FieldData of each output (tuple 0: fsmach, tuple 1: alpha, tuple 2: re, tuple 3: time). In addition, the solution file contains the flow density (scalar), flow momentum (vector), and flow energy (scalar).

Note that this reader does not support time series data which is usually stored as a series of Q and optionally XYZ files. If you want to read such a file series, use vtkPlot3DMetaReader.

The reader can generate additional scalars and vectors (or "functions") from this information. To use vtkMultiBlockPLOT3DReader, you must specify the particular function number for the scalar and vector you want to visualize. This implementation of the reader provides the following functions. The scalar functions are: -1 - don't read or compute any scalars 100 - density 110 - pressure 111 - pressure coefficient (requires Overflow file with Gamma) 112 - mach number (requires Overflow file with Gamma) 113 - sounds speed (requires Overflow file with Gamma) 120 - temperature 130 - enthalpy 140 - internal energy 144 - kinetic energy 153 - velocity magnitude 163 - stagnation energy 170 - entropy 184 - swirl 211 - vorticity magnitude

The vector functions are: -1 - don't read or compute any vectors 200 - velocity 201 - vorticity 202 - momentum 210 - pressure gradient. 212 - strain rate

(Other functions are described in the PLOT3D spec, but only those listed are implemented here.) Note that by default, this reader creates the density scalar (100), stagnation energy (163) and momentum vector (202) as output. (These are just read in from the solution file.) Please note that the validity of computation is a function of this class's gas constants (R, Gamma) and the equations used. They may not be suitable for your computational domain.

Additionally, you can read other data and associate it as a vtkDataArray into the output's point attribute data. Use the method AddFunction() to list all the functions that you'd like to read. AddFunction() accepts an integer parameter that defines the function number.

See also:
vtkMultiBlockDataSet vtkStructuredGrid vtkPlot3DMetaReader
Examples:
vtkMultiBlockPLOT3DReader (Examples)
Tests:
vtkMultiBlockPLOT3DReader (Tests)

Definition at line 104 of file vtkMultiBlockPLOT3DReader.h.


Member Typedef Documentation

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Definition at line 108 of file vtkMultiBlockPLOT3DReader.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
FILE_BIG_ENDIAN 
FILE_LITTLE_ENDIAN 

Definition at line 256 of file vtkMultiBlockPLOT3DReader.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

static int vtkMultiBlockPLOT3DReader::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

virtual int vtkMultiBlockPLOT3DReader::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

virtual vtkObjectBase* vtkMultiBlockPLOT3DReader::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

void vtkMultiBlockPLOT3DReader::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

void vtkMultiBlockPLOT3DReader::SetFileName ( const char *  name) [inline]

Set/Get the PLOT3D geometry filename.

Definition at line 113 of file vtkMultiBlockPLOT3DReader.h.

const char* vtkMultiBlockPLOT3DReader::GetFileName ( ) [inline]

Set/Get the PLOT3D geometry filename.

Definition at line 114 of file vtkMultiBlockPLOT3DReader.h.

virtual void vtkMultiBlockPLOT3DReader::SetXYZFileName ( const char *  ) [virtual]

Set/Get the PLOT3D geometry filename.

virtual char* vtkMultiBlockPLOT3DReader::GetXYZFileName ( ) [virtual]

Set/Get the PLOT3D geometry filename.

virtual void vtkMultiBlockPLOT3DReader::SetQFileName ( const char *  ) [virtual]

Set/Get the PLOT3D solution filename.

virtual char* vtkMultiBlockPLOT3DReader::GetQFileName ( ) [virtual]

Set/Get the PLOT3D solution filename.

virtual void vtkMultiBlockPLOT3DReader::SetFunctionFileName ( const char *  ) [virtual]

Set/Get the PLOT3D function filename.

Set/Get the PLOT3D function filename.

When this option is turned on, the reader will try to figure out the values of various options such as byte order, byte count etc. automatically. This options works only for binary files. When it is turned on, the reader should be able to read most Plot3D files automatically. The default is OFF for backwards compatibility reasons. For binary files, it is strongly recommended that you turn on AutoDetectFormat and leave the other file format related options untouched.

When this option is turned on, the reader will try to figure out the values of various options such as byte order, byte count etc. automatically. This options works only for binary files. When it is turned on, the reader should be able to read most Plot3D files automatically. The default is OFF for backwards compatibility reasons. For binary files, it is strongly recommended that you turn on AutoDetectFormat and leave the other file format related options untouched.

When this option is turned on, the reader will try to figure out the values of various options such as byte order, byte count etc. automatically. This options works only for binary files. When it is turned on, the reader should be able to read most Plot3D files automatically. The default is OFF for backwards compatibility reasons. For binary files, it is strongly recommended that you turn on AutoDetectFormat and leave the other file format related options untouched.

When this option is turned on, the reader will try to figure out the values of various options such as byte order, byte count etc. automatically. This options works only for binary files. When it is turned on, the reader should be able to read most Plot3D files automatically. The default is OFF for backwards compatibility reasons. For binary files, it is strongly recommended that you turn on AutoDetectFormat and leave the other file format related options untouched.

virtual void vtkMultiBlockPLOT3DReader::SetBinaryFile ( int  ) [virtual]

Is the file to be read written in binary format (as opposed to ascii).

Is the file to be read written in binary format (as opposed to ascii).

virtual void vtkMultiBlockPLOT3DReader::BinaryFileOn ( ) [virtual]

Is the file to be read written in binary format (as opposed to ascii).

virtual void vtkMultiBlockPLOT3DReader::BinaryFileOff ( ) [virtual]

Is the file to be read written in binary format (as opposed to ascii).

virtual void vtkMultiBlockPLOT3DReader::SetMultiGrid ( int  ) [virtual]

Does the file to be read contain information about number of grids. In some PLOT3D files, the first value contains the number of grids (even if there is only 1). If reading such a file, set this to true.

Does the file to be read contain information about number of grids. In some PLOT3D files, the first value contains the number of grids (even if there is only 1). If reading such a file, set this to true.

virtual void vtkMultiBlockPLOT3DReader::MultiGridOn ( ) [virtual]

Does the file to be read contain information about number of grids. In some PLOT3D files, the first value contains the number of grids (even if there is only 1). If reading such a file, set this to true.

virtual void vtkMultiBlockPLOT3DReader::MultiGridOff ( ) [virtual]

Does the file to be read contain information about number of grids. In some PLOT3D files, the first value contains the number of grids (even if there is only 1). If reading such a file, set this to true.

virtual void vtkMultiBlockPLOT3DReader::SetHasByteCount ( int  ) [virtual]

Were the arrays written with leading and trailing byte counts ? Usually, files written by a fortran program will contain these byte counts whereas the ones written by C/C++ won't.

Were the arrays written with leading and trailing byte counts ? Usually, files written by a fortran program will contain these byte counts whereas the ones written by C/C++ won't.

virtual void vtkMultiBlockPLOT3DReader::HasByteCountOn ( ) [virtual]

Were the arrays written with leading and trailing byte counts ? Usually, files written by a fortran program will contain these byte counts whereas the ones written by C/C++ won't.

virtual void vtkMultiBlockPLOT3DReader::HasByteCountOff ( ) [virtual]

Were the arrays written with leading and trailing byte counts ? Usually, files written by a fortran program will contain these byte counts whereas the ones written by C/C++ won't.

virtual void vtkMultiBlockPLOT3DReader::SetIBlanking ( int  ) [virtual]

Is there iblanking (point visibility) information in the file. If there is iblanking arrays, these will be read and assigned to the PointVisibility array of the output.

Is there iblanking (point visibility) information in the file. If there is iblanking arrays, these will be read and assigned to the PointVisibility array of the output.

virtual void vtkMultiBlockPLOT3DReader::IBlankingOn ( ) [virtual]

Is there iblanking (point visibility) information in the file. If there is iblanking arrays, these will be read and assigned to the PointVisibility array of the output.

virtual void vtkMultiBlockPLOT3DReader::IBlankingOff ( ) [virtual]

Is there iblanking (point visibility) information in the file. If there is iblanking arrays, these will be read and assigned to the PointVisibility array of the output.

If only two-dimensional data was written to the file, turn this on.

If only two-dimensional data was written to the file, turn this on.

If only two-dimensional data was written to the file, turn this on.

If only two-dimensional data was written to the file, turn this on.

virtual void vtkMultiBlockPLOT3DReader::SetDoublePrecision ( int  ) [virtual]

Is this file in double precision or single precision. This only matters for binary files. Default is single.

Is this file in double precision or single precision. This only matters for binary files. Default is single.

Is this file in double precision or single precision. This only matters for binary files. Default is single.

Is this file in double precision or single precision. This only matters for binary files. Default is single.

virtual void vtkMultiBlockPLOT3DReader::SetForceRead ( int  ) [virtual]

Try to read a binary file even if the file length seems to be inconsistent with the header information. Use this with caution, if the file length is not the same as calculated from the header. either the file is corrupt or the settings are wrong.

Try to read a binary file even if the file length seems to be inconsistent with the header information. Use this with caution, if the file length is not the same as calculated from the header. either the file is corrupt or the settings are wrong.

virtual void vtkMultiBlockPLOT3DReader::ForceReadOn ( ) [virtual]

Try to read a binary file even if the file length seems to be inconsistent with the header information. Use this with caution, if the file length is not the same as calculated from the header. either the file is corrupt or the settings are wrong.

virtual void vtkMultiBlockPLOT3DReader::ForceReadOff ( ) [virtual]

Try to read a binary file even if the file length seems to be inconsistent with the header information. Use this with caution, if the file length is not the same as calculated from the header. either the file is corrupt or the settings are wrong.

Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations).

Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations).

virtual void vtkMultiBlockPLOT3DReader::SetByteOrder ( int  ) [virtual]

Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations).

Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations).

Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations).

virtual void vtkMultiBlockPLOT3DReader::SetR ( double  ) [virtual]

Set/Get the gas constant. Default is 1.0.

virtual double vtkMultiBlockPLOT3DReader::GetR ( ) [virtual]

Set/Get the gas constant. Default is 1.0.

virtual void vtkMultiBlockPLOT3DReader::SetGamma ( double  ) [virtual]

Set/Get the ratio of specific heats. Default is 1.4.

Set/Get the ratio of specific heats. Default is 1.4.

Specify the scalar function to extract. If ==(-1), then no scalar function is extracted.

Specify the scalar function to extract. If ==(-1), then no scalar function is extracted.

Specify the vector function to extract. If ==(-1), then no vector function is extracted.

Specify the vector function to extract. If ==(-1), then no vector function is extracted.

void vtkMultiBlockPLOT3DReader::AddFunction ( int  functionNumber)

Specify additional functions to read. These are placed into the point data as data arrays. Later on they can be used by labeling them as scalars, etc.

Specify additional functions to read. These are placed into the point data as data arrays. Later on they can be used by labeling them as scalars, etc.

Specify additional functions to read. These are placed into the point data as data arrays. Later on they can be used by labeling them as scalars, etc.

virtual int vtkMultiBlockPLOT3DReader::CanReadBinaryFile ( const char *  fname) [virtual]

Return 1 if the reader can read the given file name. Only meaningful for binary files.

int vtkMultiBlockPLOT3DReader::CheckFile ( FILE *&  fp,
const char *  fname 
) [protected]
int vtkMultiBlockPLOT3DReader::CheckGeometryFile ( FILE *&  xyzFp) [protected]
int vtkMultiBlockPLOT3DReader::CheckSolutionFile ( FILE *&  qFp) [protected]
int vtkMultiBlockPLOT3DReader::CheckFunctionFile ( FILE *&  fFp) [protected]
int vtkMultiBlockPLOT3DReader::SkipByteCount ( FILE *  fp) [protected]
int vtkMultiBlockPLOT3DReader::ReadIntBlock ( FILE *  fp,
int  n,
int block 
) [protected]
int vtkMultiBlockPLOT3DReader::ReadScalar ( FILE *  fp,
int  n,
vtkDataArray scalar 
) [protected]
int vtkMultiBlockPLOT3DReader::ReadVector ( FILE *  fp,
int  n,
int  numDims,
vtkDataArray vector 
) [protected]
int vtkMultiBlockPLOT3DReader::GetNumberOfBlocksInternal ( FILE *  xyzFp,
int  allocate 
) [protected]
int vtkMultiBlockPLOT3DReader::ReadQHeader ( FILE *  fp,
bool  checkGrid,
int nq,
int nqc,
int overflow 
) [protected]
int vtkMultiBlockPLOT3DReader::ReadFunctionHeader ( FILE *  fp,
int nFunctions 
) [protected]
void vtkMultiBlockPLOT3DReader::CalculateFileSize ( FILE *  fp) [protected]
long vtkMultiBlockPLOT3DReader::EstimateSize ( int  ni,
int  nj,
int  nk 
) [protected]
void vtkMultiBlockPLOT3DReader::AssignAttribute ( int  fNumber,
vtkStructuredGrid output,
int  attributeType 
) [protected]
void vtkMultiBlockPLOT3DReader::MapFunction ( int  fNumber,
vtkStructuredGrid output 
) [protected]
virtual int vtkMultiBlockPLOT3DReader::FillOutputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the output port information objects for this algorithm. This is invoked by the first call to GetOutputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

This is called by the superclass. This is the method you should override.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

This is called by the superclass. This is the method you should override.

Reimplemented from vtkMultiBlockDataSetAlgorithm.


Member Data Documentation

Definition at line 321 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 322 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 323 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 325 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 326 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 327 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 328 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 329 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 330 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 331 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 332 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 333 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 335 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 338 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 339 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 340 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 341 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 342 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 345 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 347 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 348 of file vtkMultiBlockPLOT3DReader.h.

Definition at line 359 of file vtkMultiBlockPLOT3DReader.h.


The documentation for this class was generated from the following file: