VTK  9.0.20201130
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, vtkIdType);
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;
146 
148 
152  vtkSetMacro(SwapBytes, vtkTypeBool);
153  vtkTypeBool GetSwapBytes() { return this->SwapBytes; }
154  vtkBooleanMacro(SwapBytes, vtkTypeBool);
156 
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();
166 
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();
177  virtual void GetPeriodicShadowFacesAscii();
178  virtual void GetPeriodicShadowFacesBinary();
179  virtual void GetCellTreeAscii();
180  virtual void GetCellTreeBinary();
181  virtual void GetFaceTreeAscii();
182  virtual void GetFaceTreeBinary();
183  virtual void GetInterfaceFaceParentsAscii();
184  virtual void GetInterfaceFaceParentsBinary();
185  virtual void GetNonconformalGridInterfaceFaceInformationAscii();
186  virtual void GetNonconformalGridInterfaceFaceInformationBinary();
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; }
206 
207  //
208  // Variables
209  //
211  char* FileName;
214 
215  istream* FluentCaseFile;
216  istream* FluentDataFile;
217  stdString* CaseBuffer;
218  stdString* DataBuffer;
219 
228 
229  cellVector* Cells;
230  faceVector* Faces;
231  stdMap* VariableNames;
232  intVector* CellZones;
233  scalarDataVector* ScalarDataChunks;
234  vectorDataVector* VectorDataChunks;
235 
236  intVectorVector* SubSectionZones;
237  intVector* SubSectionIds;
238  intVector* SubSectionSize;
239 
240  stringVector* ScalarVariableNames;
242  stringVector* VectorVariableNames;
244 
247  int DataPass;
250 
251 private:
252  vtkFLUENTReader(const vtkFLUENTReader&) = delete;
253  void operator=(const vtkFLUENTReader&) = delete;
254 };
255 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkFLUENTReader::GridDimension
int GridDimension
Definition: vtkFLUENTReader.h:246
vtkFLUENTReader::Cells
cellVector * Cells
Definition: vtkFLUENTReader.h:229
vtkFLUENTReader::DataPass
int DataPass
Definition: vtkFLUENTReader.h:247
vtkFLUENTReader::VectorVariableNames
stringVector * VectorVariableNames
Definition: vtkFLUENTReader.h:242
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
vtkIossUtilities::GetData
vtkSmartPointer< vtkDataArray > GetData(const Ioss::GroupingEntity *entity, const std::string &fieldname, Ioss::Transform *transform=nullptr, Cache *cache=nullptr, const std::string &cachekey=std::string())
Returns a VTK array for a given field (fieldname) on the chosen block (or set) entity.
vtkIdType
int vtkIdType
Definition: vtkType.h:330
vtkFLUENTReader::ScalarVariableNames
stringVector * ScalarVariableNames
Definition: vtkFLUENTReader.h:240
vtkFLUENTReader::SubSectionZones
intVectorVector * SubSectionZones
Definition: vtkFLUENTReader.h:236
vtkFLUENTReader::Points
vtkPoints * Points
Definition: vtkFLUENTReader.h:220
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkFLUENTReader::ScalarSubSectionIds
intVector * ScalarSubSectionIds
Definition: vtkFLUENTReader.h:241
vtkMultiBlockDataSetAlgorithm::New
static vtkMultiBlockDataSetAlgorithm * New()
vtkFLUENTReader::SwapBytes
vtkTypeBool SwapBytes
Definition: vtkFLUENTReader.h:245
vtkFLUENTReader::GetPartitionInfo
virtual void GetPartitionInfo()
Definition: vtkFLUENTReader.h:187
vtkPyramid
a 3D cell that represents a linear pyramid
Definition: vtkPyramid.h:43
vtkFLUENTReader::NumberOfCells
vtkIdType NumberOfCells
Definition: vtkFLUENTReader.h:212
vtkFLUENTReader::VectorSubSectionIds
intVector * VectorSubSectionIds
Definition: vtkFLUENTReader.h:243
vtkFLUENTReader::Quad
vtkQuad * Quad
Definition: vtkFLUENTReader.h:223
vtkFLUENTReader::FluentCaseFile
istream * FluentCaseFile
Definition: vtkFLUENTReader.h:215
vtkMultiBlockDataSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkMultiBlockDataSetAlgorithm.h:89
vtkDataArraySelection
Store on/off settings for data arrays for a vtkSource.
Definition: vtkDataArraySelection.h:34
vtkFLUENTReader::NumberOfScalars
int NumberOfScalars
Definition: vtkFLUENTReader.h:248
vtkFLUENTReader::ParallelCheckCell
virtual bool ParallelCheckCell(int vtkNotUsed(i))
Definition: vtkFLUENTReader.h:205
vtkFLUENTReader::FluentDataFile
istream * FluentDataFile
Definition: vtkFLUENTReader.h:216
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:210
vtkFLUENTReader::FileName
char * FileName
Definition: vtkFLUENTReader.h:211
vtkFLUENTReader::SubSectionIds
intVector * SubSectionIds
Definition: vtkFLUENTReader.h:237
vtkFLUENTReader::NumberOfVectors
int NumberOfVectors
Definition: vtkFLUENTReader.h:249
vtkFLUENTReader::GetSwapBytes
vtkTypeBool GetSwapBytes()
Definition: vtkFLUENTReader.h:153
vtkMultiBlockDataSetAlgorithm.h
vtkFLUENTReader::Hexahedron
vtkHexahedron * Hexahedron
Definition: vtkFLUENTReader.h:224
vtkFLUENTReader::Faces
faceVector * Faces
Definition: vtkFLUENTReader.h:230
vtkTriangle
a cell that represents a triangle
Definition: vtkTriangle.h:35
vtkFLUENTReader::Wedge
vtkWedge * Wedge
Definition: vtkFLUENTReader.h:226
vtkX3D::name
Definition: vtkX3D.h:225
vtkFLUENTReader::ScalarDataChunks
scalarDataVector * ScalarDataChunks
Definition: vtkFLUENTReader.h:233
vtkFLUENTReader::VectorDataChunks
vectorDataVector * VectorDataChunks
Definition: vtkFLUENTReader.h:234
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:73
vtkFLUENTReader::VariableNames
stdMap * VariableNames
Definition: vtkFLUENTReader.h:231
vtkFLUENTReader::Triangle
vtkTriangle * Triangle
Definition: vtkFLUENTReader.h:221
vtkFLUENTReader::SubSectionSize
intVector * SubSectionSize
Definition: vtkFLUENTReader.h:238
vtkFLUENTReader::DataBuffer
stdString * DataBuffer
Definition: vtkFLUENTReader.h:218
vtkFLUENTReader::CellZones
intVector * CellZones
Definition: vtkFLUENTReader.h:232
vtkTetra
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:41
vtkFLUENTReader::CaseBuffer
stdString * CaseBuffer
Definition: vtkFLUENTReader.h:217
vtkFLUENTReader::ConvexPointSet
vtkConvexPointSet * ConvexPointSet
Definition: vtkFLUENTReader.h:227
vtkX3D::index
Definition: vtkX3D.h:252
vtkFLUENTReader::Tetra
vtkTetra * Tetra
Definition: vtkFLUENTReader.h:222
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:225
vtkFLUENTReader::NumberOfCellArrays
int NumberOfCellArrays
Definition: vtkFLUENTReader.h:213
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:32