VTK  9.2.5
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 
68 
70 
74  vtkGetMacro(NumberOfCells, vtkIdType);
76 
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 
104 
106 
123  void SetDataByteOrder(int);
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:
146  ~vtkFLUENTReader() override;
149 
151 
155  vtkSetMacro(SwapBytes, vtkTypeBool);
156  vtkTypeBool GetSwapBytes() { return this->SwapBytes; }
157  vtkBooleanMacro(SwapBytes, vtkTypeBool);
159 
160  virtual bool OpenCaseFile(const char* filename);
161  virtual bool OpenDataFile(const char* filename);
162  virtual int GetCaseChunk();
163  virtual void GetNumberOfCellZones();
164  virtual int GetCaseIndex();
165  virtual void LoadVariableNames();
166  virtual int GetDataIndex();
167  virtual int GetDataChunk();
168  virtual void GetSpeciesVariableNames();
169 
170  virtual void ParseCaseFile();
171  virtual int GetDimension();
172  virtual void GetLittleEndianFlag();
173  virtual void GetNodesAscii();
174  virtual void GetNodesSinglePrecision();
175  virtual void GetNodesDoublePrecision();
176  virtual void GetCellsAscii();
177  virtual void GetCellsBinary();
178  virtual void GetFacesAscii();
179  virtual void GetFacesBinary();
182  virtual void GetCellTreeAscii();
183  virtual void GetCellTreeBinary();
184  virtual void GetFaceTreeAscii();
185  virtual void GetFaceTreeBinary();
190  virtual void GetPartitionInfo() {}
191  virtual void CleanCells();
192  virtual void PopulateCellNodes();
193  virtual int GetCaseBufferInt(int ptr);
194  virtual float GetCaseBufferFloat(int ptr);
195  virtual double GetCaseBufferDouble(int ptr);
196  virtual void PopulateTriangleCell(int i);
197  virtual void PopulateTetraCell(int i);
198  virtual void PopulateQuadCell(int i);
199  virtual void PopulateHexahedronCell(int i);
200  virtual void PopulatePyramidCell(int i);
201  virtual void PopulateWedgeCell(int i);
202  virtual void PopulatePolyhedronCell(int i);
203  virtual void ParseDataFile();
204  virtual int GetDataBufferInt(int ptr);
205  virtual float GetDataBufferFloat(int ptr);
206  virtual double GetDataBufferDouble(int ptr);
207  virtual void GetData(int dataType);
208  virtual bool ParallelCheckCell(int vtkNotUsed(i)) { return true; }
209 
210  //
211  // Variables
212  //
214  char* FileName;
217 
218  istream* FluentCaseFile;
219  istream* FluentDataFile;
220  stdString* CaseBuffer;
221  stdString* DataBuffer;
222 
231 
232  cellVector* Cells;
233  faceVector* Faces;
234  stdMap* VariableNames;
235  intVector* CellZones;
236  scalarDataVector* ScalarDataChunks;
237  vectorDataVector* VectorDataChunks;
238 
239  intVectorVector* SubSectionZones;
240  intVector* SubSectionIds;
241  intVector* SubSectionSize;
242 
243  stringVector* ScalarVariableNames;
245  stringVector* VectorVariableNames;
247 
250  int DataPass;
253 
254 private:
255  vtkFLUENTReader(const vtkFLUENTReader&) = delete;
256  void operator=(const vtkFLUENTReader&) = delete;
257 };
258 #endif
a 3D cell defined by a set of convex points
Store on/off settings for data arrays, etc.
reads a dataset in Fluent file format
virtual void GetPeriodicShadowFacesBinary()
intVector * SubSectionIds
virtual void GetNumberOfCellZones()
vtkConvexPointSet * ConvexPointSet
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHexahedron * Hexahedron
virtual void GetPartitionInfo()
faceVector * Faces
virtual void ParseDataFile()
~vtkFLUENTReader() override
virtual void PopulateWedgeCell(int i)
stdMap * VariableNames
const char * GetCellArrayName(int index)
Get the name of the cell array with the given index in the input.
virtual void GetData(int dataType)
virtual void GetSpeciesVariableNames()
virtual void GetFaceTreeAscii()
virtual void GetNonconformalGridInterfaceFaceInformationBinary()
vtkPoints * Points
virtual void GetInterfaceFaceParentsAscii()
virtual void GetNodesDoublePrecision()
virtual void CleanCells()
vtkGetFilePathMacro(FileName)
Specify the file name of the Fluent case file to read.
stdString * CaseBuffer
virtual float GetDataBufferFloat(int ptr)
virtual bool OpenDataFile(const char *filename)
virtual void GetCellsBinary()
virtual void GetPeriodicShadowFacesAscii()
stdString * DataBuffer
virtual double GetDataBufferDouble(int ptr)
istream * FluentDataFile
scalarDataVector * ScalarDataChunks
virtual void PopulateCellNodes()
virtual void GetCellTreeBinary()
void SetDataByteOrder(int)
These methods should be used instead of the SwapBytes methods.
void SetDataByteOrderToLittleEndian()
These methods should be used instead of the SwapBytes methods.
virtual int GetDataBufferInt(int ptr)
virtual void PopulateTriangleCell(int i)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
stringVector * VectorVariableNames
vtkTypeBool GetSwapBytes()
Set/Get the byte swapping to explicitly swap the bytes of a file.
vtkTypeBool SwapBytes
const char * GetDataByteOrderAsString()
These methods should be used instead of the SwapBytes methods.
intVectorVector * SubSectionZones
virtual bool ParallelCheckCell(int vtkNotUsed(i))
virtual void PopulatePyramidCell(int i)
virtual void PopulatePolyhedronCell(int i)
virtual int GetCaseBufferInt(int ptr)
virtual void GetInterfaceFaceParentsBinary()
void SetCellArrayStatus(const char *name, int status)
Get/Set whether the cell array with the given name is to be read.
virtual void GetFaceTreeBinary()
static vtkFLUENTReader * New()
vtkPyramid * Pyramid
virtual void GetCellsAscii()
virtual void PopulateHexahedronCell(int i)
int GetCellArrayStatus(const char *name)
Get/Set whether the cell array with the given name is to be read.
intVector * VectorSubSectionIds
void EnableAllCellArrays()
Turn on/off all cell arrays.
int GetNumberOfCellArrays(void)
Get the number of cell arrays available in the input.
virtual double GetCaseBufferDouble(int ptr)
virtual float GetCaseBufferFloat(int ptr)
virtual void GetFacesBinary()
intVector * CellZones
virtual void GetNodesAscii()
virtual int GetCaseIndex()
virtual int GetCaseChunk()
virtual void GetNonconformalGridInterfaceFaceInformationAscii()
int GetDataByteOrder()
These methods should be used instead of the SwapBytes methods.
vtkSetFilePathMacro(FileName)
Specify the file name of the Fluent case file to read.
void SetDataByteOrderToBigEndian()
These methods should be used instead of the SwapBytes methods.
istream * FluentCaseFile
intVector * ScalarSubSectionIds
intVector * SubSectionSize
vtkDataArraySelection * CellDataArraySelection
vtkIdType NumberOfCells
virtual void PopulateQuadCell(int i)
vectorDataVector * VectorDataChunks
virtual void GetLittleEndianFlag()
virtual int GetDataChunk()
virtual void GetNodesSinglePrecision()
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTriangle * Triangle
virtual void ParseCaseFile()
stringVector * ScalarVariableNames
virtual void GetCellTreeAscii()
virtual bool OpenCaseFile(const char *filename)
virtual int GetDimension()
virtual void LoadVariableNames()
virtual void GetFacesAscii()
cellVector * Cells
virtual void PopulateTetraCell(int i)
virtual int GetDataIndex()
void DisableAllCellArrays()
Turn on/off all cell arrays.
a cell that represents a linear 3D hexahedron
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
represent and manipulate 3D points
Definition: vtkPoints.h:149
a 3D cell that represents a linear pyramid
Definition: vtkPyramid.h:106
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:98
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:114
a cell that represents a triangle
Definition: vtkTriangle.h:148
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:96
@ name
Definition: vtkX3D.h:225
@ index
Definition: vtkX3D.h:252
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332