87 #ifndef vtkMultiBlockPLOT3DReader_h
88 #define vtkMultiBlockPLOT3DReader_h
90 #include "vtkIOParallelModule.h"
106 class ComputeFunctor;
107 class ComputeTemperatureFunctor;
108 class ComputePressureFunctor;
109 class ComputePressureCoefficientFunctor;
110 class ComputeMachNumberFunctor;
111 class ComputeSoundSpeedFunctor;
112 class ComputeEnthalpyFunctor;
113 class ComputeKinecticEnergyFunctor;
114 class ComputeVelocityMagnitudeFunctor;
115 class ComputeEntropyFunctor;
116 class ComputeSwirlFunctor;
117 class ComputeVelocityFunctor;
118 class ComputeVorticityMagnitudeFunctor;
119 class ComputePressureGradientFunctor;
120 class ComputeVorticityFunctor;
121 class ComputeStrainRateFunctor;
126 friend class Functors::ComputeFunctor;
127 friend class Functors::ComputeTemperatureFunctor;
128 friend class Functors::ComputePressureFunctor;
129 friend class Functors::ComputePressureCoefficientFunctor;
130 friend class Functors::ComputeMachNumberFunctor;
131 friend class Functors::ComputeSoundSpeedFunctor;
132 friend class Functors::ComputeEnthalpyFunctor;
133 friend class Functors::ComputeKinecticEnergyFunctor;
134 friend class Functors::ComputeVelocityMagnitudeFunctor;
135 friend class Functors::ComputeEntropyFunctor;
136 friend class Functors::ComputeSwirlFunctor;
137 friend class Functors::ComputeVelocityFunctor;
138 friend class Functors::ComputeVorticityMagnitudeFunctor;
139 friend class Functors::ComputePressureGradientFunctor;
140 friend class Functors::ComputeVorticityFunctor;
141 friend class Functors::ComputeStrainRateFunctor;
164 vtkGetStringMacro(XYZFileName);
186 vtkSetStringMacro(FunctionFileName);
187 vtkGetStringMacro(FunctionFileName);
292 vtkSetMacro(ByteOrder,
int);
293 vtkGetMacro(ByteOrder,
int);
301 vtkSetMacro(R,
double);
302 vtkGetMacro(R,
double);
309 vtkSetMacro(Gamma,
double);
310 vtkGetMacro(Gamma,
double);
322 vtkSetMacro(PreserveIntermediateFunctions,
bool);
323 vtkGetMacro(PreserveIntermediateFunctions,
bool);
324 vtkBooleanMacro(PreserveIntermediateFunctions,
bool);
332 vtkGetMacro(ScalarFunctionNumber,
int);
341 vtkGetMacro(VectorFunctionNumber,
int);
375 FILE_LITTLE_ENDIAN = 1
432 int ReadQHeader(FILE* fp,
bool checkGrid,
int& nq,
int& nqc,
int& overflow);
abstract superclass for arrays of numeric data
general representation of visualization data
represent and manipulate attribute data in a dataset
a simple class to control print indentation
dynamic, self-adjusting array of int
Composite dataset that organizes datasets into blocks.
void SetFileName(const char *name)
Set/Get the PLOT3D geometry filename.
virtual int OpenFileForDataRead(void *&fp, const char *fname)
vtkDataArray * ComputeSoundSpeed(vtkStructuredGrid *output)
vtkDataArray * NewFloatArray()
int ReadFunctionHeader(FILE *fp, int *nFunctions)
const char * GetByteOrderAsString()
void SetByteOrderToLittleEndian()
const char * GetFileName(int i)
void SetQFileName(const char *name)
Set/Get the PLOT3D solution filename.
int ReadPoints(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output) override
Read the points.
vtkIdType ReadValues(FILE *fp, int n, vtkDataArray *scalar)
virtual int CanReadBinaryFile(const char *fname)
Return 1 if the reader can read the given file name.
vtkMultiBlockDataSet * GetOutput()
Get the output data object for a port on this algorithm.
vtkDataArray * ComputeStrainRate(vtkStructuredGrid *output)
int ReadArrays(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output) override
Read all the arrays (point, cell, field etc.).
void SetVectorFunctionNumber(int num)
Specify the vector function to extract.
vtkDataArray * ComputeEnthalpy(vtkStructuredGrid *output)
int ReadArrays(const std::string &fname, int piece, int npieces, int nghosts, vtkDataObject *output) override
A method that needs to be override by the subclass to provide data arrays.
vtkTypeBool DoublePrecision
vtkDataArray * ComputeVelocity(vtkStructuredGrid *output)
vtkDataArray * ComputeVorticity(vtkStructuredGrid *output)
vtkDataArray * ComputeSwirl(vtkStructuredGrid *output)
vtkDataArray * ComputeMachNumber(vtkStructuredGrid *output)
vtkDataArray * ComputeKineticEnergy(vtkStructuredGrid *output)
void CalculateFileSize(FILE *fp)
virtual int ReadVector(void *vfp, int extent[6], int wextent[6], int numDims, vtkDataArray *vector, vtkTypeUInt64 offset, const vtkMultiBlockPLOT3DReaderRecord ¤tRecord)
int ReadQHeader(FILE *fp, bool checkGrid, int &nq, int &nqc, int &overflow)
virtual void CloseFile(void *fp)
virtual int ReadIntScalar(void *vfp, int extent[6], int wextent[6], vtkDataArray *scalar, vtkTypeUInt64 offset, const vtkMultiBlockPLOT3DReaderRecord ¤tRecord)
int ReadMesh(const std::string &fname, int piece, int npieces, int nghosts, vtkDataObject *output) override
A method that needs to be override by the subclass to provide the mesh (topology).
int CheckFunctionFile(FILE *&fFp)
vtkDataArray * ComputeVelocityMagnitude(vtkStructuredGrid *output)
int ReadPoints(const std::string &fname, int piece, int npieces, int nghosts, vtkDataObject *output) override
A method that needs to be override by the subclass to provide the point coordinates.
int CheckGeometryFile(FILE *&xyzFp)
vtkTypeBool AutoDetectFormat
virtual void SetXYZFileName(const char *)
int AutoDetectionCheck(FILE *fp)
const char * GetFileName()
vtkMultiProcessController * Controller
const char * GetQFileName()
vtkMultiBlockPLOT3DReader()
void RemoveAllFunctions()
int ReadIntBlock(FILE *fp, int n, int *block)
vtkDataArray * CreateFloatArray()
vtkIntArray * FunctionList
vtkDataArray * ComputeTemperature(vtkStructuredGrid *output)
Each of these methods compute a derived quantity.
double GetTimeValue(const std::string &fname) override
Overridden from superclass to do actual reading.
~vtkMultiBlockPLOT3DReader() override
virtual int ReadScalar(void *vfp, int extent[6], int wextent[6], vtkDataArray *scalar, vtkTypeUInt64 offset, const vtkMultiBlockPLOT3DReaderRecord ¤tRecord)
double GetGamma(vtkIdType idx, vtkDataArray *gamma)
bool PreserveIntermediateFunctions
int ReadMesh(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output) override
Read the mesh (connectivity) for a given set of data partitioning, number of ghost levels and time st...
void SetByteOrderToBigEndian()
Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write l...
std::vector< std::string > FunctionNames
vtkDataArray * ComputePressure(vtkStructuredGrid *output)
vtkDataArray * ComputeVorticityMagnitude(vtkStructuredGrid *output)
void AddFunction(int functionNumber)
Specify additional functions to read.
void ClearGeometryCache()
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkDataArray * ComputeEntropy(vtkStructuredGrid *output)
int CheckFile(FILE *&fp, const char *fname)
vtkTypeBool TwoDimensionalGeometry
void SetScalarFunctionNumber(int num)
Specify the scalar function to extract.
int ReadGeometryHeader(FILE *fp)
void MapFunction(int fNumber, vtkStructuredGrid *output)
vtkDataArray * ComputePressureGradient(vtkStructuredGrid *output)
int SkipByteCount(FILE *fp)
void AssignAttribute(int fNumber, vtkStructuredGrid *output, int attributeType)
vtkMultiBlockPLOT3DReaderInternals * Internal
int ReadMetaData(vtkInformation *metadata) override
These methods have to be overwritten from superclass because Plot3D actually uses the XYZ file to rea...
void AddFunctionName(const std::string &name)
static vtkMultiBlockPLOT3DReader * New()
vtkMultiBlockDataSet * GetOutput(int)
int GetNumberOfBlocksInternal(FILE *xyzFp, int allocate)
vtkDataArray * ComputePressureCoefficient(vtkStructuredGrid *output)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetController(vtkMultiProcessController *c)
Set/Get the communicator object (we'll use global World controller if you don't set a different one).
Multiprocessing communication superclass.
Superclass for algorithms that are parallel aware.
const char * GetFileName(int i) const
Returns a particular filename stored by the reader.
topologically regular array of data
dynamic, self-adjusting array of unsigned char