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