Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkPLOT3DReader Class Reference

read PLOT3D data files. More...

#include <vtkPLOT3DReader.h>

Inheritance diagram for vtkPLOT3DReader:

Inheritance graph
[legend]
Collaboration diagram for vtkPLOT3DReader:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetFileFormat (int)
virtual int GetFileFormat ()
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 SetVectorFunctionFileName (const char *)
virtual char * GetVectorFunctionFileName ()
virtual void SetGridNumber (int)
virtual int GetGridNumber ()
virtual void SetScalarFunctionNumber (int)
virtual int GetScalarFunctionNumber ()
virtual void SetVectorFunctionNumber (int)
virtual int GetVectorFunctionNumber ()
void AddFunction (int functionNumber)
void RemoveFunction (int)
void RemoveAllFunctions ()
virtual float GetFsmach ()
virtual float GetAlpha ()
virtual float GetRe ()
virtual float GetTime ()
virtual void SetR (float)
virtual float GetR ()
virtual void SetGamma (float)
virtual float GetGamma ()
virtual void SetUvinf (float)
virtual float GetUvinf ()
virtual void SetVvinf (float)
virtual float GetVvinf ()
virtual void SetWvinf (float)
virtual float GetWvinf ()
virtual int GetNumberOfGrids ()

Static Public Methods

vtkPLOT3DReader * New ()
int IsTypeOf (const char *type)
vtkPLOT3DReader * SafeDownCast (vtkObject *o)

Protected Methods

 vtkPLOT3DReader ()
 ~vtkPLOT3DReader ()
void ExecuteInformation ()
void Execute ()
int GetFileType (FILE *fp)
void MapFunction (int fNumber, vtkPointData *outputPD)
int ReadBinaryGrid (FILE *fp, vtkStructuredGrid *output)
int ReadBinaryGridDimensions (FILE *fp, vtkStructuredGrid *output)
int ReadBinarySolution (FILE *fp, vtkStructuredGrid *output)
int ReadBinaryFunctionFile (FILE *fp, vtkStructuredGrid *output)
int ReadBinaryVectorFunctionFile (FILE *fp, vtkStructuredGrid *output)
void ComputeDensity (vtkPointData *outputPD)
void ComputePressure (vtkPointData *outputPD)
void ComputeTemperature (vtkPointData *outputPD)
void ComputeEnthalpy (vtkPointData *outputPD)
void ComputeInternalEnergy (vtkPointData *outputPD)
void ComputeKineticEnergy (vtkPointData *outputPD)
void ComputeVelocityMagnitude (vtkPointData *outputPD)
void ComputeStagnationEnergy (vtkPointData *outputPD)
void ComputeEntropy (vtkPointData *outputPD)
void ComputeSwirl (vtkPointData *outputPD)
void ComputeVelocity (vtkPointData *outputPD)
void ComputeVorticity (vtkPointData *outputPD)
void ComputeMomentum (vtkPointData *outputPD)
void ComputePressureGradient (vtkPointData *outputPD)

Protected Attributes

int FileFormat
char * XYZFileName
char * QFileName
char * FunctionFileName
char * VectorFunctionFileName
int GridNumber
int ScalarFunctionNumber
int VectorFunctionNumber
int FunctionFileFunctionNumber
vtkIntArrayFunctionList
float * TempStorage
int NumberOfPoints
int NumberOfGrids
float Fsmach
float Alpha
float Re
float Time
float R
float Gamma
float Uvinf
float Vvinf
float Wvinf
vtkPointsGrid
vtkFloatArrayDensity
vtkFloatArrayEnergy
vtkFloatArrayMomentum

Detailed Description

read PLOT3D data files.

Date:
2001/10/30 21:46:04
Revision:
1.46

vtkPLOT3DReader is a reader object that reads PLOT3D formatted files and generates a structured grid on output. PLOT3D is a computer graphics program designed to visualize the grids and solutions of computational fluid dynamics. 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. 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). In addition, the solution file contains the flow density (scalar), flow momentum (vector), and flow energy (scalar).

The reader can generate additional scalars and vectors (or "functions") from this information. To use vtkPLOT3DReader, 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 120 - temperature 130 - enthalpy 140 - internal energy 144 - kinetic energy 153 - velocity magnitude 163 - stagnation energy 170 - entropy 184 - swirl.

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

(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) 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.

The format of the function file is as follows. An integer indicating number of grids, then an integer specifying number of functions per each grid. This is followed by the (integer) dimensions of each grid in the file. Finally, for each grid, and for each function, a float value per each point in the current grid. Note: if both a function from the function file is specified, as well as a scalar from the solution file (or derived from the solution file), the function file takes precedence.

Examples:
vtkPLOT3DReader (Examples)
Tests:
vtkPLOT3DReader (Tests)

Definition at line 124 of file vtkPLOT3DReader.h.


Constructor & Destructor Documentation

vtkPLOT3DReader::vtkPLOT3DReader   [protected]
 

vtkPLOT3DReader::~vtkPLOT3DReader   [protected]
 


Member Function Documentation

vtkPLOT3DReader* vtkPLOT3DReader::New   [static]
 

Instantiate object with no start, end, or progress methods.

Reimplemented from vtkStructuredGridSource.

virtual const char* vtkPLOT3DReader::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkStructuredGridSource.

int vtkPLOT3DReader::IsTypeOf const char *    type [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 vtkStructuredGridSource.

virtual int vtkPLOT3DReader::IsA const char *    type [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 vtkStructuredGridSource.

vtkPLOT3DReader* vtkPLOT3DReader::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkStructuredGridSource.

void vtkPLOT3DReader::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 vtkSource.

virtual void vtkPLOT3DReader::SetFileFormat int    [virtual]
 

Specify the PLOT3D file format to use

virtual int vtkPLOT3DReader::GetFileFormat   [virtual]
 

Specify the PLOT3D file format to use

virtual void vtkPLOT3DReader::SetXYZFileName const char *    [virtual]
 

Set/Get the PLOT3D geometry FileName.

virtual char* vtkPLOT3DReader::GetXYZFileName   [virtual]
 

Set/Get the PLOT3D geometry FileName.

virtual void vtkPLOT3DReader::SetQFileName const char *    [virtual]
 

Set/Get the PLOT3D solution FileName.

virtual char* vtkPLOT3DReader::GetQFileName   [virtual]
 

Set/Get the PLOT3D solution FileName.

virtual void vtkPLOT3DReader::SetFunctionFileName const char *    [virtual]
 

Set/Get the PLOT3D function FileName.

virtual char* vtkPLOT3DReader::GetFunctionFileName   [virtual]
 

Set/Get the PLOT3D function FileName.

virtual void vtkPLOT3DReader::SetVectorFunctionFileName const char *    [virtual]
 

Set/Get the PLOT3D vector FileName.

virtual char* vtkPLOT3DReader::GetVectorFunctionFileName   [virtual]
 

Set/Get the PLOT3D vector FileName.

virtual void vtkPLOT3DReader::SetGridNumber int    [virtual]
 

Specify the grid to read.

virtual int vtkPLOT3DReader::GetGridNumber   [virtual]
 

Specify the grid to read.

virtual void vtkPLOT3DReader::SetScalarFunctionNumber int    [virtual]
 

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

virtual int vtkPLOT3DReader::GetScalarFunctionNumber   [virtual]
 

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

virtual void vtkPLOT3DReader::SetVectorFunctionNumber int    [virtual]
 

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

virtual int vtkPLOT3DReader::GetVectorFunctionNumber   [virtual]
 

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

void vtkPLOT3DReader::AddFunction int    functionNumber [inline]
 

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.

Definition at line 185 of file vtkPLOT3DReader.h.

void vtkPLOT3DReader::RemoveFunction int   
 

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.

void vtkPLOT3DReader::RemoveAllFunctions   [inline]
 

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.

Definition at line 188 of file vtkPLOT3DReader.h.

virtual float vtkPLOT3DReader::GetFsmach   [virtual]
 

Get the free-stream mach number.

virtual float vtkPLOT3DReader::GetAlpha   [virtual]
 

Get the angle of attack.

virtual float vtkPLOT3DReader::GetRe   [virtual]
 

Get the Reynold's number.

virtual float vtkPLOT3DReader::GetTime   [virtual]
 

Get the total integration time.

virtual void vtkPLOT3DReader::SetR float    [virtual]
 

Set/Get the gas constant.

virtual float vtkPLOT3DReader::GetR   [virtual]
 

Set/Get the gas constant.

virtual void vtkPLOT3DReader::SetGamma float    [virtual]
 

Set/Get the ratio of specific heats.

virtual float vtkPLOT3DReader::GetGamma   [virtual]
 

Set/Get the ratio of specific heats.

virtual void vtkPLOT3DReader::SetUvinf float    [virtual]
 

Set/Get the x-component of the free-stream velocity.

virtual float vtkPLOT3DReader::GetUvinf   [virtual]
 

Set/Get the x-component of the free-stream velocity.

virtual void vtkPLOT3DReader::SetVvinf float    [virtual]
 

Set/Get the y-component of the free-stream velocity.

virtual float vtkPLOT3DReader::GetVvinf   [virtual]
 

Set/Get the y-component of the free-stream velocity.

virtual void vtkPLOT3DReader::SetWvinf float    [virtual]
 

Set/Get the z-component of the free-stream velocity.

virtual float vtkPLOT3DReader::GetWvinf   [virtual]
 

Set/Get the z-component of the free-stream velocity.

virtual int vtkPLOT3DReader::GetNumberOfGrids   [virtual]
 

Get the number of grids. This is valid only after a read has been performed.

void vtkPLOT3DReader::ExecuteInformation   [protected, virtual]
 

Reimplemented from vtkSource.

void vtkPLOT3DReader::Execute   [protected, virtual]
 

This method is the old style execute method

Reimplemented from vtkSource.

int vtkPLOT3DReader::GetFileType FILE *    fp [protected]
 

void vtkPLOT3DReader::MapFunction int    fNumber,
vtkPointData   outputPD
[protected]
 

int vtkPLOT3DReader::ReadBinaryGrid FILE *    fp,
vtkStructuredGrid   output
[protected]
 

int vtkPLOT3DReader::ReadBinaryGridDimensions FILE *    fp,
vtkStructuredGrid   output
[protected]
 

int vtkPLOT3DReader::ReadBinarySolution FILE *    fp,
vtkStructuredGrid   output
[protected]
 

int vtkPLOT3DReader::ReadBinaryFunctionFile FILE *    fp,
vtkStructuredGrid   output
[protected]
 

int vtkPLOT3DReader::ReadBinaryVectorFunctionFile FILE *    fp,
vtkStructuredGrid   output
[protected]
 

void vtkPLOT3DReader::ComputeDensity vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputePressure vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputeTemperature vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputeEnthalpy vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputeInternalEnergy vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputeKineticEnergy vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputeVelocityMagnitude vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputeStagnationEnergy vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputeEntropy vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputeSwirl vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputeVelocity vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputeVorticity vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputeMomentum vtkPointData   outputPD [protected]
 

void vtkPLOT3DReader::ComputePressureGradient vtkPointData   outputPD [protected]
 


Member Data Documentation

int vtkPLOT3DReader::FileFormat [protected]
 

Definition at line 258 of file vtkPLOT3DReader.h.

char* vtkPLOT3DReader::XYZFileName [protected]
 

Definition at line 259 of file vtkPLOT3DReader.h.

char* vtkPLOT3DReader::QFileName [protected]
 

Definition at line 260 of file vtkPLOT3DReader.h.

char* vtkPLOT3DReader::FunctionFileName [protected]
 

Definition at line 261 of file vtkPLOT3DReader.h.

char* vtkPLOT3DReader::VectorFunctionFileName [protected]
 

Definition at line 262 of file vtkPLOT3DReader.h.

int vtkPLOT3DReader::GridNumber [protected]
 

Definition at line 265 of file vtkPLOT3DReader.h.

int vtkPLOT3DReader::ScalarFunctionNumber [protected]
 

Definition at line 266 of file vtkPLOT3DReader.h.

int vtkPLOT3DReader::VectorFunctionNumber [protected]
 

Definition at line 267 of file vtkPLOT3DReader.h.

int vtkPLOT3DReader::FunctionFileFunctionNumber [protected]
 

Definition at line 268 of file vtkPLOT3DReader.h.

vtkIntArray* vtkPLOT3DReader::FunctionList [protected]
 

Definition at line 272 of file vtkPLOT3DReader.h.

float* vtkPLOT3DReader::TempStorage [protected]
 

Definition at line 275 of file vtkPLOT3DReader.h.

int vtkPLOT3DReader::NumberOfPoints [protected]
 

Definition at line 276 of file vtkPLOT3DReader.h.

int vtkPLOT3DReader::NumberOfGrids [protected]
 

Definition at line 277 of file vtkPLOT3DReader.h.

float vtkPLOT3DReader::Fsmach [protected]
 

Definition at line 280 of file vtkPLOT3DReader.h.

float vtkPLOT3DReader::Alpha [protected]
 

Definition at line 281 of file vtkPLOT3DReader.h.

float vtkPLOT3DReader::Re [protected]
 

Definition at line 282 of file vtkPLOT3DReader.h.

float vtkPLOT3DReader::Time [protected]
 

Definition at line 283 of file vtkPLOT3DReader.h.

float vtkPLOT3DReader::R [protected]
 

Definition at line 286 of file vtkPLOT3DReader.h.

float vtkPLOT3DReader::Gamma [protected]
 

Definition at line 287 of file vtkPLOT3DReader.h.

float vtkPLOT3DReader::Uvinf [protected]
 

Definition at line 288 of file vtkPLOT3DReader.h.

float vtkPLOT3DReader::Vvinf [protected]
 

Definition at line 289 of file vtkPLOT3DReader.h.

float vtkPLOT3DReader::Wvinf [protected]
 

Definition at line 290 of file vtkPLOT3DReader.h.

vtkPoints* vtkPLOT3DReader::Grid [protected]
 

Definition at line 299 of file vtkPLOT3DReader.h.

vtkFloatArray* vtkPLOT3DReader::Density [protected]
 

Definition at line 300 of file vtkPLOT3DReader.h.

vtkFloatArray* vtkPLOT3DReader::Energy [protected]
 

Definition at line 301 of file vtkPLOT3DReader.h.

vtkFloatArray* vtkPLOT3DReader::Momentum [protected]
 

Definition at line 302 of file vtkPLOT3DReader.h.


The documentation for this class was generated from the following file:
Generated on Thu Mar 28 14:39:01 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001