VTK
vtkGAMBITReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGAMBITReader.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 vtkGAMBITReader_h
36 #define vtkGAMBITReader_h
37 
38 #include "vtkIOGeometryModule.h" // For export macro
40 
41 class vtkDoubleArray;
42 class VTKIOGEOMETRY_EXPORT vtkGAMBITReader : public vtkUnstructuredGridAlgorithm
43 {
44 public:
45  static vtkGAMBITReader *New();
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
53  vtkSetStringMacro(FileName);
54  vtkGetStringMacro(FileName);
56 
58 
62  vtkGetMacro(NumberOfCells,int);
64 
66 
70  vtkGetMacro(NumberOfNodes,int);
72 
74 
77  vtkGetMacro(NumberOfNodeFields,int);
78  vtkGetMacro(NumberOfCellFields,int);
80 
81 protected:
83  ~vtkGAMBITReader();
86 
87  char *FileName;
88 
97  ifstream *FileStream;
98 
100  {
101  EDGE = 1,
102  QUAD = 2,
103  TRI = 3,
104  BRICK = 4,
105  PRISM = 5,
106  TETRA = 6,
107  PYRAMID = 7
108  };
109 
110 private:
111  void ReadFile(vtkUnstructuredGrid *output);
112  void ReadGeometry(vtkUnstructuredGrid *output);
113  void ReadNodeData(vtkUnstructuredGrid *output);
114  void ReadCellData(vtkUnstructuredGrid *output);
115 
116  void ReadXYZCoords(vtkDoubleArray *coords);
117 
118  void ReadCellConnectivity(vtkUnstructuredGrid *output);
119  void ReadMaterialTypes(vtkUnstructuredGrid *output);
120  void ReadBoundaryConditionSets(vtkUnstructuredGrid *output);
121 
122  vtkGAMBITReader(const vtkGAMBITReader&) VTK_DELETE_FUNCTION;
123  void operator=(const vtkGAMBITReader&) VTK_DELETE_FUNCTION;
124 };
125 
126 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store vtkAlgorithm input/output information.
int NumberOfBoundaryConditionSets
static vtkUnstructuredGridAlgorithm * New()
int NumberOfCoordinateDirections
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
dynamic, self-adjusting array of double
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int NumberOfVelocityComponents
a simple class to control print indentation
Definition: vtkIndent.h:39
dataset represents arbitrary combinations of all possible cell types
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
Superclass for algorithms that produce only unstructured grid as output.
Store zero or more vtkInformation instances.
ifstream * FileStream
reads a dataset in Fluent GAMBIT neutral file format