VTK  9.1.20211024
Go to the documentation of this file.
1 /*=========================================================================
3  Program: Visualization Toolkit
4  Module: vtkFLUENTReader.h
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.
10  This software is distributed WITHOUT ANY WARRANTY; without even
12  PURPOSE. See the above copyright notice for more information.
14 =========================================================================*/
35 #ifndef vtkFLUENTReader_h
36 #define vtkFLUENTReader_h
38 #include "vtkIOGeometryModule.h" // For export macro
42 class vtkPoints;
43 class vtkTriangle;
44 class vtkTetra;
45 class vtkQuad;
46 class vtkHexahedron;
47 class vtkPyramid;
48 class vtkWedge;
49 class vtkConvexPointSet;
51 class VTKIOGEOMETRY_EXPORT vtkFLUENTReader : public vtkMultiBlockDataSetAlgorithm
52 {
53 public:
54  static vtkFLUENTReader* New();
56  void PrintSelf(ostream& os, vtkIndent indent) override;
71  vtkGetMacro(NumberOfCells, vtkIdType);
83  const char* GetCellArrayName(int index);
90  int GetCellArrayStatus(const char* name);
91  void SetCellArrayStatus(const char* name, int status);
120  void SetDataByteOrder(int);
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;
141 protected:
143  ~vtkFLUENTReader() override;
152  vtkSetMacro(SwapBytes, vtkTypeBool);
153  vtkTypeBool GetSwapBytes() { return this->SwapBytes; }
154  vtkBooleanMacro(SwapBytes, vtkTypeBool);
157  virtual bool OpenCaseFile(const char* filename);
158  virtual bool OpenDataFile(const char* filename);
159  virtual int GetCaseChunk();
160  virtual void GetNumberOfCellZones();
161  virtual int GetCaseIndex();
162  virtual void LoadVariableNames();
163  virtual int GetDataIndex();
164  virtual int GetDataChunk();
165  virtual void GetSpeciesVariableNames();
167  virtual void ParseCaseFile();
168  virtual int GetDimension();
169  virtual void GetLittleEndianFlag();
170  virtual void GetNodesAscii();
171  virtual void GetNodesSinglePrecision();
172  virtual void GetNodesDoublePrecision();
173  virtual void GetCellsAscii();
174  virtual void GetCellsBinary();
175  virtual void GetFacesAscii();
176  virtual void GetFacesBinary();
179  virtual void GetCellTreeAscii();
180  virtual void GetCellTreeBinary();
181  virtual void GetFaceTreeAscii();
182  virtual void GetFaceTreeBinary();
187  virtual void GetPartitionInfo() {}
188  virtual void CleanCells();
189  virtual void PopulateCellNodes();
190  virtual int GetCaseBufferInt(int ptr);
191  virtual float GetCaseBufferFloat(int ptr);
192  virtual double GetCaseBufferDouble(int ptr);
193  virtual void PopulateTriangleCell(int i);
194  virtual void PopulateTetraCell(int i);
195  virtual void PopulateQuadCell(int i);
196  virtual void PopulateHexahedronCell(int i);
197  virtual void PopulatePyramidCell(int i);
198  virtual void PopulateWedgeCell(int i);
199  virtual void PopulatePolyhedronCell(int i);
200  virtual void ParseDataFile();
201  virtual int GetDataBufferInt(int ptr);
202  virtual float GetDataBufferFloat(int ptr);
203  virtual double GetDataBufferDouble(int ptr);
204  virtual void GetData(int dataType);
205  virtual bool ParallelCheckCell(int vtkNotUsed(i)) { return true; }
207  //
208  // Variables
209  //
211  char* FileName;
215  istream* FluentCaseFile;
216  istream* FluentDataFile;
217  stdString* CaseBuffer;
218  stdString* DataBuffer;
229  cellVector* Cells;
230  faceVector* Faces;
231  stdMap* VariableNames;
232  intVector* CellZones;
233  scalarDataVector* ScalarDataChunks;
234  vectorDataVector* VectorDataChunks;
236  intVectorVector* SubSectionZones;
237  intVector* SubSectionIds;
238  intVector* SubSectionSize;
240  stringVector* ScalarVariableNames;
242  stringVector* VectorVariableNames;
247  int DataPass;
251 private:
252  vtkFLUENTReader(const vtkFLUENTReader&) = delete;
253  void operator=(const vtkFLUENTReader&) = delete;
254 };
255 #endif
a 3D cell defined by a set of convex points
Store on/off settings for data arrays for a vtkSource.
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()
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.
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:113
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:143
a 3D cell that represents a linear pyramid
Definition: vtkPyramid.h:103
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:95
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:111
a cell that represents a triangle
Definition: vtkTriangle.h:145
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:93
@ name
Definition: vtkX3D.h:225
@ index
Definition: vtkX3D.h:252
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332