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 =========================================================================*/
35 #ifndef vtkFLUENTReader_h
36 #define vtkFLUENTReader_h
37 
38 #include "vtkIOGeometryModule.h" // For export macro
40 
42 class vtkPoints;
43 class vtkTriangle;
44 class vtkTetra;
45 class vtkQuad;
46 class vtkHexahedron;
47 class vtkPyramid;
48 class vtkWedge;
49 class vtkConvexPointSet;
50 
51 class VTKIOGEOMETRY_EXPORT vtkFLUENTReader : public vtkMultiBlockDataSetAlgorithm
52 {
53 public:
54  static vtkFLUENTReader *New();
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
59 
62  vtkSetStringMacro(FileName);
63  vtkGetStringMacro(FileName);
65 
67 
71  vtkGetMacro(NumberOfCells,int);
73 
77  int GetNumberOfCellArrays(void);
78 
83  const char* GetCellArrayName(int index);
84 
86 
90  int GetCellArrayStatus(const char* name);
91  void SetCellArrayStatus(const char* name, int status);
93 
95 
98  void DisableAllCellArrays();
99  void EnableAllCellArrays();
101 
103 
117  void SetDataByteOrderToBigEndian();
118  void SetDataByteOrderToLittleEndian();
119  int GetDataByteOrder();
120  void SetDataByteOrder(int);
121  const char *GetDataByteOrderAsString();
122  //
123  // Structures
124  //
125  struct Cell;
126  struct Face;
127  struct ScalarDataChunk;
128  struct VectorDataChunk;
129  struct stdString;
130  struct intVector;
131  struct doubleVector;
132  struct stringVector;
133  struct cellVector;
134  struct faceVector;
135  struct stdMap;
136  struct scalarDataVector;
137  struct vectorDataVector;
138  struct intVectorVector;
140 
141 protected:
142  vtkFLUENTReader();
143  ~vtkFLUENTReader() override;
147  vtkInformationVector *) override;
148 
150 
154  vtkSetMacro(SwapBytes,vtkTypeBool);
155  vtkTypeBool GetSwapBytes() {return this->SwapBytes;}
156  vtkBooleanMacro(SwapBytes,vtkTypeBool);
158 
160  char * FileName;
163  virtual bool OpenCaseFile(const char *filename);
164  virtual bool OpenDataFile(const char *filename);
165  virtual int GetCaseChunk ();
166  virtual void GetNumberOfCellZones();
167  virtual int GetCaseIndex();
168  virtual void LoadVariableNames();
169  virtual int GetDataIndex();
170  virtual int GetDataChunk();
171  virtual void GetSpeciesVariableNames();
172 
173  virtual void ParseCaseFile();
174  virtual int GetDimension();
175  virtual void GetLittleEndianFlag();
176  virtual void GetNodesAscii();
177  virtual void GetNodesSinglePrecision();
178  virtual void GetNodesDoublePrecision();
179  virtual void GetCellsAscii();
180  virtual void GetCellsBinary();
181  virtual void GetFacesAscii();
182  virtual void GetFacesBinary();
183  virtual void GetPeriodicShadowFacesAscii();
184  virtual void GetPeriodicShadowFacesBinary();
185  virtual void GetCellTreeAscii();
186  virtual void GetCellTreeBinary();
187  virtual void GetFaceTreeAscii();
188  virtual void GetFaceTreeBinary();
189  virtual void GetInterfaceFaceParentsAscii();
190  virtual void GetInterfaceFaceParentsBinary();
191  virtual void GetNonconformalGridInterfaceFaceInformationAscii();
192  virtual void GetNonconformalGridInterfaceFaceInformationBinary();
193  virtual void GetPartitionInfo() {}
194  virtual void CleanCells();
195  virtual void PopulateCellNodes();
196  virtual int GetCaseBufferInt(int ptr);
197  virtual float GetCaseBufferFloat(int ptr);
198  virtual double GetCaseBufferDouble(int ptr);
199  virtual void PopulateTriangleCell(int i);
200  virtual void PopulateTetraCell(int i);
201  virtual void PopulateQuadCell(int i);
202  virtual void PopulateHexahedronCell(int i);
203  virtual void PopulatePyramidCell(int i);
204  virtual void PopulateWedgeCell(int i);
205  virtual void PopulatePolyhedronCell(int i);
206  virtual void ParseDataFile();
207  virtual int GetDataBufferInt(int ptr);
208  virtual float GetDataBufferFloat(int ptr);
209  virtual double GetDataBufferDouble(int ptr);
210  virtual void GetData(int dataType);
211  virtual bool ParallelCheckCell(int vtkNotUsed(i)) { return true; }
212 
213  //
214  // Variables
215  //
216  ifstream *FluentCaseFile;
217  ifstream *FluentDataFile;
218  stdString *CaseBuffer;
219  stdString *DataBuffer;
220 
229 
230  cellVector *Cells;
231  faceVector *Faces;
232  stdMap *VariableNames;
233  intVector *CellZones;
234  scalarDataVector *ScalarDataChunks;
235  vectorDataVector *VectorDataChunks;
236 
237  intVectorVector *SubSectionZones;
238  intVector *SubSectionIds;
239  intVector *SubSectionSize;
240 
241  stringVector *ScalarVariableNames;
243  stringVector *VectorVariableNames;
245 
248  int DataPass;
251 
252 private:
253  vtkFLUENTReader(const vtkFLUENTReader&) = delete;
254  void operator=(const vtkFLUENTReader&) = delete;
255 };
256 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkFLUENTReader::GridDimension
int GridDimension
Definition: vtkFLUENTReader.h:247
vtkFLUENTReader::Cells
cellVector * Cells
Definition: vtkFLUENTReader.h:230
vtkFLUENTReader::DataPass
int DataPass
Definition: vtkFLUENTReader.h:248
vtkFLUENTReader::VectorVariableNames
stringVector * VectorVariableNames
Definition: vtkFLUENTReader.h:243
vtkHexahedron
a cell that represents a linear 3D hexahedron
Definition: vtkHexahedron.h:41
vtkConvexPointSet
a 3D cell defined by a set of convex points
Definition: vtkConvexPointSet.h:42
vtkFLUENTReader::NumberOfCells
int NumberOfCells
Definition: vtkFLUENTReader.h:161
vtkFLUENTReader::ScalarVariableNames
stringVector * ScalarVariableNames
Definition: vtkFLUENTReader.h:241
vtkFLUENTReader::SubSectionZones
intVectorVector * SubSectionZones
Definition: vtkFLUENTReader.h:237
vtkFLUENTReader::Points
vtkPoints * Points
Definition: vtkFLUENTReader.h:221
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkFLUENTReader::FluentDataFile
ifstream * FluentDataFile
Definition: vtkFLUENTReader.h:217
vtkFLUENTReader::ScalarSubSectionIds
intVector * ScalarSubSectionIds
Definition: vtkFLUENTReader.h:242
vtkMultiBlockDataSetAlgorithm::New
static vtkMultiBlockDataSetAlgorithm * New()
vtkFLUENTReader::SwapBytes
vtkTypeBool SwapBytes
Definition: vtkFLUENTReader.h:246
vtkFLUENTReader::GetPartitionInfo
virtual void GetPartitionInfo()
Definition: vtkFLUENTReader.h:193
vtkPyramid
a 3D cell that represents a linear pyramid
Definition: vtkPyramid.h:43
vtkFLUENTReader::VectorSubSectionIds
intVector * VectorSubSectionIds
Definition: vtkFLUENTReader.h:244
vtkFLUENTReader::Quad
vtkQuad * Quad
Definition: vtkFLUENTReader.h:224
vtkMultiBlockDataSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkMultiBlockDataSetAlgorithm.h:88
vtkDataArraySelection
Store on/off settings for data arrays for a vtkSource.
Definition: vtkDataArraySelection.h:34
vtkFLUENTReader::NumberOfScalars
int NumberOfScalars
Definition: vtkFLUENTReader.h:249
vtkFLUENTReader::ParallelCheckCell
virtual bool ParallelCheckCell(int vtkNotUsed(i))
Definition: vtkFLUENTReader.h:211
vtkFLUENTReader
reads a dataset in Fluent file format
Definition: vtkFLUENTReader.h:51
vtkWedge
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:43
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkFLUENTReader::CellDataArraySelection
vtkDataArraySelection * CellDataArraySelection
Definition: vtkFLUENTReader.h:156
vtkFLUENTReader::FileName
char * FileName
Definition: vtkFLUENTReader.h:160
vtkFLUENTReader::SubSectionIds
intVector * SubSectionIds
Definition: vtkFLUENTReader.h:238
vtkFLUENTReader::NumberOfVectors
int NumberOfVectors
Definition: vtkFLUENTReader.h:250
vtkFLUENTReader::GetSwapBytes
vtkTypeBool GetSwapBytes()
Definition: vtkFLUENTReader.h:155
vtkMultiBlockDataSetAlgorithm.h
vtkFLUENTReader::Hexahedron
vtkHexahedron * Hexahedron
Definition: vtkFLUENTReader.h:225
vtkFLUENTReader::Faces
faceVector * Faces
Definition: vtkFLUENTReader.h:231
vtkTriangle
a cell that represents a triangle
Definition: vtkTriangle.h:35
vtkFLUENTReader::Wedge
vtkWedge * Wedge
Definition: vtkFLUENTReader.h:227
vtkX3D::name
Definition: vtkX3D.h:219
vtkFLUENTReader::ScalarDataChunks
scalarDataVector * ScalarDataChunks
Definition: vtkFLUENTReader.h:234
vtkFLUENTReader::VectorDataChunks
vectorDataVector * VectorDataChunks
Definition: vtkFLUENTReader.h:235
vtkMultiBlockDataSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkFLUENTReader::VariableNames
stdMap * VariableNames
Definition: vtkFLUENTReader.h:232
vtkFLUENTReader::Triangle
vtkTriangle * Triangle
Definition: vtkFLUENTReader.h:222
vtkFLUENTReader::SubSectionSize
intVector * SubSectionSize
Definition: vtkFLUENTReader.h:239
vtkFLUENTReader::FluentCaseFile
ifstream * FluentCaseFile
Definition: vtkFLUENTReader.h:216
vtkFLUENTReader::DataBuffer
stdString * DataBuffer
Definition: vtkFLUENTReader.h:219
vtkFLUENTReader::CellZones
intVector * CellZones
Definition: vtkFLUENTReader.h:233
vtkTetra
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:41
vtkFLUENTReader::CaseBuffer
stdString * CaseBuffer
Definition: vtkFLUENTReader.h:218
vtkFLUENTReader::ConvexPointSet
vtkConvexPointSet * ConvexPointSet
Definition: vtkFLUENTReader.h:228
vtkX3D::index
Definition: vtkX3D.h:246
vtkFLUENTReader::Tetra
vtkTetra * Tetra
Definition: vtkFLUENTReader.h:223
vtkMultiBlockDataSetAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkMultiBlockDataSetAlgorithm.h:80
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkQuad
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:35
vtkFLUENTReader::Pyramid
vtkPyramid * Pyramid
Definition: vtkFLUENTReader.h:226
vtkFLUENTReader::NumberOfCellArrays
int NumberOfCellArrays
Definition: vtkFLUENTReader.h:162
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:32