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 
38 
40 class vtkPoints;
41 class vtkTriangle;
42 class vtkTetra;
43 class vtkQuad;
44 class vtkHexahedron;
45 class vtkPyramid;
46 class vtkWedge;
47 class vtkConvexPointSet;
48 
50 {
51 public:
52  static vtkFLUENTReader *New();
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
57 
58  vtkSetStringMacro(FileName);
59  vtkGetStringMacro(FileName);
61 
63 
66  vtkGetMacro(NumberOfCells,int);
68 
70  int GetNumberOfCellArrays(void);
71 
73  const char* GetCellArrayName(int index);
74 
76 
77  int GetCellArrayStatus(const char* name);
78  void SetCellArrayStatus(const char* name, int status);
80 
82 
83  void DisableAllCellArrays();
84  void EnableAllCellArrays();
86 
88 
99  void SetDataByteOrderToBigEndian();
100  void SetDataByteOrderToLittleEndian();
101  int GetDataByteOrder();
102  void SetDataByteOrder(int);
103  const char *GetDataByteOrderAsString();
104  //
105  // Structures
106  //
107  struct Cell;
108  struct Face;
109  struct ScalarDataChunk;
110  struct VectorDataChunk;
111  struct stdString;
112  struct intVector;
113  struct doubleVector;
114  struct stringVector;
115  struct cellVector;
116  struct faceVector;
117  struct stdMap;
118  struct scalarDataVector;
119  struct vectorDataVector;
120  struct intVectorVector;
122 
123 protected:
124  vtkFLUENTReader();
125  ~vtkFLUENTReader();
130 
132 
134  vtkSetMacro(SwapBytes,int);
135  int GetSwapBytes() {return this->SwapBytes;}
136  vtkBooleanMacro(SwapBytes,int);
138 
140  char * FileName;
143  virtual bool OpenCaseFile(const char *filename);
144  virtual bool OpenDataFile(const char *filename);
145  virtual int GetCaseChunk ();
146  virtual void GetNumberOfCellZones();
147  virtual int GetCaseIndex();
148  virtual void LoadVariableNames();
149  virtual int GetDataIndex();
150  virtual int GetDataChunk();
151  virtual void GetSpeciesVariableNames();
152 
153  virtual void ParseCaseFile();
154  virtual int GetDimension();
155  virtual void GetLittleEndianFlag();
156  virtual void GetNodesAscii();
157  virtual void GetNodesSinglePrecision();
158  virtual void GetNodesDoublePrecision();
159  virtual void GetCellsAscii();
160  virtual void GetCellsBinary();
161  virtual void GetFacesAscii();
162  virtual void GetFacesBinary();
163  virtual void GetPeriodicShadowFacesAscii();
164  virtual void GetPeriodicShadowFacesBinary();
165  virtual void GetCellTreeAscii();
166  virtual void GetCellTreeBinary();
167  virtual void GetFaceTreeAscii();
168  virtual void GetFaceTreeBinary();
169  virtual void GetInterfaceFaceParentsAscii();
170  virtual void GetInterfaceFaceParentsBinary();
171  virtual void GetNonconformalGridInterfaceFaceInformationAscii();
172  virtual void GetNonconformalGridInterfaceFaceInformationBinary();
173  virtual void GetPartitionInfo() {};
174  virtual void CleanCells();
175  virtual void PopulateCellNodes();
176  virtual int GetCaseBufferInt(int ptr);
177  virtual float GetCaseBufferFloat(int ptr);
178  virtual double GetCaseBufferDouble(int ptr);
179  virtual void PopulateTriangleCell(int i);
180  virtual void PopulateTetraCell(int i);
181  virtual void PopulateQuadCell(int i);
182  virtual void PopulateHexahedronCell(int i);
183  virtual void PopulatePyramidCell(int i);
184  virtual void PopulateWedgeCell(int i);
185  virtual void PopulatePolyhedronCell(int i);
186  virtual void ParseDataFile();
187  virtual int GetDataBufferInt(int ptr);
188  virtual float GetDataBufferFloat(int ptr);
189  virtual double GetDataBufferDouble(int ptr);
190  virtual void GetData(int dataType);
191  virtual bool ParallelCheckCell(int vtkNotUsed(i)) { return true; }
192 
193  //
194  // Variables
195  //
196  ifstream *FluentCaseFile;
197  ifstream *FluentDataFile;
198  stdString *CaseBuffer;
199  stdString *DataBuffer;
200 
209 
210  cellVector *Cells;
211  faceVector *Faces;
212  stdMap *VariableNames;
213  intVector *CellZones;
214  scalarDataVector *ScalarDataChunks;
215  vectorDataVector *VectorDataChunks;
216 
217  intVectorVector *SubSectionZones;
218  intVector *SubSectionIds;
219  intVector *SubSectionSize;
220 
221  stringVector *ScalarVariableNames;
223  stringVector *VectorVariableNames;
225 
228  int DataPass;
231 
232 private:
233  vtkFLUENTReader(const vtkFLUENTReader&); // Not implemented.
234  void operator=(const vtkFLUENTReader&); // Not implemented.
235 };
236 #endif
scalarDataVector * ScalarDataChunks
intVector * SubSectionSize
vectorDataVector * VectorDataChunks
Store vtkAlgorithm input/output information.
a 3D cell that represents a linear pyramid
Definition: vtkPyramid.h:47
vtkDataArraySelection * CellDataArraySelection
ifstream * FluentDataFile
virtual bool ParallelCheckCell(int vtkNotUsed(i))
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:39
ifstream * FluentCaseFile
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
stdString * DataBuffer
intVectorVector * SubSectionZones
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual void GetPartitionInfo()
vtkTriangle * Triangle
static vtkMultiBlockDataSetAlgorithm * New()
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:45
a simple class to control print indentation
Definition: vtkIndent.h:37
vtkPyramid * Pyramid
stdMap * VariableNames
Store on/off settings for data arrays for a vtkSource.
vtkHexahedron * Hexahedron
cellVector * Cells
reads a dataset in Fluent file format
a cell that represents a linear 3D hexahedron
Definition: vtkHexahedron.h:45
intVector * CellZones
a 3D cell defined by a set of convex points
intVector * ScalarSubSectionIds
intVector * SubSectionIds
a cell that represents a triangle
Definition: vtkTriangle.h:39
void PrintSelf(ostream &os, vtkIndent indent)
faceVector * Faces
stdString * CaseBuffer
Store zero or more vtkInformation instances.
#define VTK_IO_EXPORT
stringVector * VectorVariableNames
vtkConvexPointSet * ConvexPointSet
stringVector * ScalarVariableNames
vtkPoints * Points
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:47
represent and manipulate 3D points
Definition: vtkPoints.h:38
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
intVector * VectorSubSectionIds