VTK
vtkFLUENTReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFLUENTReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
34 #ifndef vtkFLUENTReader_h
35 #define vtkFLUENTReader_h
36 
37 #include "vtkIOGeometryModule.h" // For export macro
39 
41 class vtkPoints;
42 class vtkTriangle;
43 class vtkTetra;
44 class vtkQuad;
45 class vtkHexahedron;
46 class vtkPyramid;
47 class vtkWedge;
48 class vtkConvexPointSet;
49 
51 {
52 public:
53  static vtkFLUENTReader *New();
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
59  vtkSetStringMacro(FileName);
60  vtkGetStringMacro(FileName);
62 
64 
67  vtkGetMacro(NumberOfCells,int);
69 
72 
74  const char* GetCellArrayName(int index);
75 
77 
78  int GetCellArrayStatus(const char* name);
79  void SetCellArrayStatus(const char* name, int status);
81 
83 
87 
89 
103  void SetDataByteOrder(int);
105  //
106  // Structures
107  //
108  struct Cell;
109  struct Face;
110  struct ScalarDataChunk;
111  struct VectorDataChunk;
112  struct stdString;
113  struct intVector;
114  struct doubleVector;
115  struct stringVector;
116  struct cellVector;
117  struct faceVector;
118  struct stdMap;
119  struct scalarDataVector;
120  struct vectorDataVector;
121  struct intVectorVector;
123 
124 protected:
131 
133 
135  vtkSetMacro(SwapBytes,int);
136  int GetSwapBytes() {return this->SwapBytes;}
137  vtkBooleanMacro(SwapBytes,int);
139 
141  char * FileName;
144  virtual bool OpenCaseFile(const char *filename);
145  virtual bool OpenDataFile(const char *filename);
146  virtual int GetCaseChunk ();
147  virtual void GetNumberOfCellZones();
148  virtual int GetCaseIndex();
149  virtual void LoadVariableNames();
150  virtual int GetDataIndex();
151  virtual int GetDataChunk();
152  virtual void GetSpeciesVariableNames();
153 
154  virtual void ParseCaseFile();
155  virtual int GetDimension();
156  virtual void GetLittleEndianFlag();
157  virtual void GetNodesAscii();
158  virtual void GetNodesSinglePrecision();
159  virtual void GetNodesDoublePrecision();
160  virtual void GetCellsAscii();
161  virtual void GetCellsBinary();
162  virtual void GetFacesAscii();
163  virtual void GetFacesBinary();
166  virtual void GetCellTreeAscii();
167  virtual void GetCellTreeBinary();
168  virtual void GetFaceTreeAscii();
169  virtual void GetFaceTreeBinary();
174  virtual void GetPartitionInfo() {}
175  virtual void CleanCells();
176  virtual void PopulateCellNodes();
177  virtual int GetCaseBufferInt(int ptr);
178  virtual float GetCaseBufferFloat(int ptr);
179  virtual double GetCaseBufferDouble(int ptr);
180  virtual void PopulateTriangleCell(int i);
181  virtual void PopulateTetraCell(int i);
182  virtual void PopulateQuadCell(int i);
183  virtual void PopulateHexahedronCell(int i);
184  virtual void PopulatePyramidCell(int i);
185  virtual void PopulateWedgeCell(int i);
186  virtual void PopulatePolyhedronCell(int i);
187  virtual void ParseDataFile();
188  virtual int GetDataBufferInt(int ptr);
189  virtual float GetDataBufferFloat(int ptr);
190  virtual double GetDataBufferDouble(int ptr);
191  virtual void GetData(int dataType);
192  virtual bool ParallelCheckCell(int vtkNotUsed(i)) { return true; }
193 
194  //
195  // Variables
196  //
197  ifstream *FluentCaseFile;
198  ifstream *FluentDataFile;
199  stdString *CaseBuffer;
200  stdString *DataBuffer;
201 
210 
211  cellVector *Cells;
212  faceVector *Faces;
213  stdMap *VariableNames;
214  intVector *CellZones;
215  scalarDataVector *ScalarDataChunks;
216  vectorDataVector *VectorDataChunks;
217 
218  intVectorVector *SubSectionZones;
219  intVector *SubSectionIds;
220  intVector *SubSectionSize;
221 
222  stringVector *ScalarVariableNames;
224  stringVector *VectorVariableNames;
226 
229  int DataPass;
232 
233 private:
234  vtkFLUENTReader(const vtkFLUENTReader&); // Not implemented.
235  void operator=(const vtkFLUENTReader&); // Not implemented.
236 };
237 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkFLUENTReader::GridDimension
int GridDimension
Definition: vtkFLUENTReader.h:228
vtkIOGeometryModule.h
vtkFLUENTReader::Cells
cellVector * Cells
Definition: vtkFLUENTReader.h:211
vtkFLUENTReader::PopulateCellNodes
virtual void PopulateCellNodes()
vtkFLUENTReader::GetCaseBufferFloat
virtual float GetCaseBufferFloat(int ptr)
vtkFLUENTReader::SetDataByteOrderToLittleEndian
void SetDataByteOrderToLittleEndian()
vtkFLUENTReader::DataPass
int DataPass
Definition: vtkFLUENTReader.h:229
vtkFLUENTReader::GetPeriodicShadowFacesAscii
virtual void GetPeriodicShadowFacesAscii()
vtkFLUENTReader::VectorVariableNames
stringVector * VectorVariableNames
Definition: vtkFLUENTReader.h:224
vtkFLUENTReader::SetDataByteOrderToBigEndian
void SetDataByteOrderToBigEndian()
vtkHexahedron
a cell that represents a linear 3D hexahedron
Definition: vtkHexahedron.h:47
vtkConvexPointSet
a 3D cell defined by a set of convex points
Definition: vtkConvexPointSet.h:45
vtkFLUENTReader::NumberOfCells
int NumberOfCells
Definition: vtkFLUENTReader.h:142
vtkFLUENTReader::ScalarVariableNames
stringVector * ScalarVariableNames
Definition: vtkFLUENTReader.h:222
vtkFLUENTReader::SubSectionZones
intVectorVector * SubSectionZones
Definition: vtkFLUENTReader.h:218
vtkFLUENTReader::Points
vtkPoints * Points
Definition: vtkFLUENTReader.h:202
vtkFLUENTReader::DisableAllCellArrays
void DisableAllCellArrays()
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkFLUENTReader::FluentDataFile
ifstream * FluentDataFile
Definition: vtkFLUENTReader.h:198
vtkFLUENTReader::ScalarSubSectionIds
intVector * ScalarSubSectionIds
Definition: vtkFLUENTReader.h:223
vtkFLUENTReader::PopulateTetraCell
virtual void PopulateTetraCell(int i)
vtkFLUENTReader::SetCellArrayStatus
void SetCellArrayStatus(const char *name, int status)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkFLUENTReader::GetData
virtual void GetData(int dataType)
vtkFLUENTReader::EnableAllCellArrays
void EnableAllCellArrays()
vtkFLUENTReader::GetPartitionInfo
virtual void GetPartitionInfo()
Definition: vtkFLUENTReader.h:174
vtkFLUENTReader::SetDataByteOrder
void SetDataByteOrder(int)
vtkPyramid
a 3D cell that represents a linear pyramid
Definition: vtkPyramid.h:49
vtkFLUENTReader::GetFacesBinary
virtual void GetFacesBinary()
VTKIOGEOMETRY_EXPORT
#define VTKIOGEOMETRY_EXPORT
Definition: vtkIOGeometryModule.h:15
vtkFLUENTReader::PopulateQuadCell
virtual void PopulateQuadCell(int i)
vtkFLUENTReader::VectorSubSectionIds
intVector * VectorSubSectionIds
Definition: vtkFLUENTReader.h:225
vtkFLUENTReader::GetDimension
virtual int GetDimension()
vtkFLUENTReader::GetCellsBinary
virtual void GetCellsBinary()
vtkFLUENTReader::LoadVariableNames
virtual void LoadVariableNames()
vtkFLUENTReader::Quad
vtkQuad * Quad
Definition: vtkFLUENTReader.h:205
vtkFLUENTReader::PopulatePolyhedronCell
virtual void PopulatePolyhedronCell(int i)
vtkFLUENTReader::New
static vtkFLUENTReader * New()
vtkDataArraySelection
Store on/off settings for data arrays for a vtkSource.
Definition: vtkDataArraySelection.h:34
vtkFLUENTReader::GetCellsAscii
virtual void GetCellsAscii()
vtkFLUENTReader::ParseCaseFile
virtual void ParseCaseFile()
vtkFLUENTReader::NumberOfScalars
int NumberOfScalars
Definition: vtkFLUENTReader.h:230
vtkFLUENTReader::GetCellArrayStatus
int GetCellArrayStatus(const char *name)
vtkFLUENTReader::ParallelCheckCell
virtual bool ParallelCheckCell(int vtkNotUsed(i))
Definition: vtkFLUENTReader.h:192
vtkgl::name
GLuint const GLchar * name
Definition: vtkgl.h:11983
vtkFLUENTReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkNotUsed
#define vtkNotUsed(x)
Definition: vtkSetGet.h:557
vtkFLUENTReader
reads a dataset in Fluent file format
Definition: vtkFLUENTReader.h:51
vtkFLUENTReader::GetCaseBufferDouble
virtual double GetCaseBufferDouble(int ptr)
vtkFLUENTReader::ParseDataFile
virtual void ParseDataFile()
vtkFLUENTReader::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkFLUENTReader::PopulateHexahedronCell
virtual void PopulateHexahedronCell(int i)
vtkFLUENTReader::GetNumberOfCellArrays
int GetNumberOfCellArrays(void)
vtkWedge
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:49
vtkFLUENTReader::GetDataIndex
virtual int GetDataIndex()
vtkFLUENTReader::GetDataByteOrderAsString
const char * GetDataByteOrderAsString()
vtkFLUENTReader::GetInterfaceFaceParentsBinary
virtual void GetInterfaceFaceParentsBinary()
vtkFLUENTReader::GetFacesAscii
virtual void GetFacesAscii()
vtkFLUENTReader::PopulateTriangleCell
virtual void PopulateTriangleCell(int i)
vtkFLUENTReader::GetDataChunk
virtual int GetDataChunk()
vtkFLUENTReader::GetCellArrayName
const char * GetCellArrayName(int index)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkFLUENTReader::CellDataArraySelection
vtkDataArraySelection * CellDataArraySelection
Definition: vtkFLUENTReader.h:137
vtkFLUENTReader::FileName
char * FileName
Definition: vtkFLUENTReader.h:141
vtkFLUENTReader::SubSectionIds
intVector * SubSectionIds
Definition: vtkFLUENTReader.h:219
vtkFLUENTReader::NumberOfVectors
int NumberOfVectors
Definition: vtkFLUENTReader.h:231
vtkSetStringMacro
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
vtkFLUENTReader::GetFaceTreeBinary
virtual void GetFaceTreeBinary()
vtkFLUENTReader::GetCaseBufferInt
virtual int GetCaseBufferInt(int ptr)
vtkFLUENTReader::PopulateWedgeCell
virtual void PopulateWedgeCell(int i)
vtkFLUENTReader::GetCaseChunk
virtual int GetCaseChunk()
vtkFLUENTReader::GetNonconformalGridInterfaceFaceInformationBinary
virtual void GetNonconformalGridInterfaceFaceInformationBinary()
vtkMultiBlockDataSetAlgorithm.h
vtkFLUENTReader::Hexahedron
vtkHexahedron * Hexahedron
Definition: vtkFLUENTReader.h:206
vtkFLUENTReader::GetDataBufferFloat
virtual float GetDataBufferFloat(int ptr)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkFLUENTReader::GetLittleEndianFlag
virtual void GetLittleEndianFlag()
vtkFLUENTReader::Faces
faceVector * Faces
Definition: vtkFLUENTReader.h:212
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
vtkTriangle
a cell that represents a triangle
Definition: vtkTriangle.h:41
vtkFLUENTReader::Wedge
vtkWedge * Wedge
Definition: vtkFLUENTReader.h:208
vtkFLUENTReader::ScalarDataChunks
scalarDataVector * ScalarDataChunks
Definition: vtkFLUENTReader.h:215
vtkFLUENTReader::GetCellTreeBinary
virtual void GetCellTreeBinary()
vtkFLUENTReader::VectorDataChunks
vectorDataVector * VectorDataChunks
Definition: vtkFLUENTReader.h:216
vtkFLUENTReader::GetNodesSinglePrecision
virtual void GetNodesSinglePrecision()
vtkFLUENTReader::GetNumberOfCellZones
virtual void GetNumberOfCellZones()
vtkFLUENTReader::GetNonconformalGridInterfaceFaceInformationAscii
virtual void GetNonconformalGridInterfaceFaceInformationAscii()
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkFLUENTReader::VariableNames
stdMap * VariableNames
Definition: vtkFLUENTReader.h:213
vtkFLUENTReader::Triangle
vtkTriangle * Triangle
Definition: vtkFLUENTReader.h:203
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkFLUENTReader::SubSectionSize
intVector * SubSectionSize
Definition: vtkFLUENTReader.h:220
vtkFLUENTReader::OpenCaseFile
virtual bool OpenCaseFile(const char *filename)
vtkFLUENTReader::FluentCaseFile
ifstream * FluentCaseFile
Definition: vtkFLUENTReader.h:197
vtkFLUENTReader::PopulatePyramidCell
virtual void PopulatePyramidCell(int i)
vtkFLUENTReader::GetCaseIndex
virtual int GetCaseIndex()
vtkFLUENTReader::GetCellTreeAscii
virtual void GetCellTreeAscii()
vtkFLUENTReader::DataBuffer
stdString * DataBuffer
Definition: vtkFLUENTReader.h:200
vtkFLUENTReader::SwapBytes
int SwapBytes
Definition: vtkFLUENTReader.h:227
vtkFLUENTReader::GetDataBufferDouble
virtual double GetDataBufferDouble(int ptr)
vtkFLUENTReader::GetNodesAscii
virtual void GetNodesAscii()
vtkFLUENTReader::GetDataByteOrder
int GetDataByteOrder()
vtkFLUENTReader::~vtkFLUENTReader
~vtkFLUENTReader()
vtkFLUENTReader::GetInterfaceFaceParentsAscii
virtual void GetInterfaceFaceParentsAscii()
vtkFLUENTReader::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkFLUENTReader::GetPeriodicShadowFacesBinary
virtual void GetPeriodicShadowFacesBinary()
vtkFLUENTReader::OpenDataFile
virtual bool OpenDataFile(const char *filename)
vtkFLUENTReader::GetSwapBytes
int GetSwapBytes()
Definition: vtkFLUENTReader.h:136
vtkFLUENTReader::CellZones
intVector * CellZones
Definition: vtkFLUENTReader.h:214
vtkTetra
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:47
vtkFLUENTReader::GetSpeciesVariableNames
virtual void GetSpeciesVariableNames()
vtkFLUENTReader::CaseBuffer
stdString * CaseBuffer
Definition: vtkFLUENTReader.h:199
vtkFLUENTReader::ConvexPointSet
vtkConvexPointSet * ConvexPointSet
Definition: vtkFLUENTReader.h:209
vtkFLUENTReader::vtkFLUENTReader
vtkFLUENTReader()
vtkFLUENTReader::GetFaceTreeAscii
virtual void GetFaceTreeAscii()
vtkFLUENTReader::GetDataBufferInt
virtual int GetDataBufferInt(int ptr)
vtkFLUENTReader::Tetra
vtkTetra * Tetra
Definition: vtkFLUENTReader.h:204
vtkQuad
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:41
vtkFLUENTReader::Pyramid
vtkPyramid * Pyramid
Definition: vtkFLUENTReader.h:207
vtkFLUENTReader::NumberOfCellArrays
int NumberOfCellArrays
Definition: vtkFLUENTReader.h:143
vtkFLUENTReader::CleanCells
virtual void CleanCells()
vtkFLUENTReader::GetNodesDoublePrecision
virtual void GetNodesDoublePrecision()
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:32