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 =========================================================================*/
32 #ifndef vtkGAMBITReader_h
33 #define vtkGAMBITReader_h
34 
35 #include "vtkIOGeometryModule.h" // For export macro
37 
38 class vtkDoubleArray;
39 class VTKIOGEOMETRY_EXPORT vtkGAMBITReader : public vtkUnstructuredGridAlgorithm
40 {
41 public:
42  static vtkGAMBITReader *New();
44  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
45 
47 
50  vtkSetStringMacro(FileName);
51  vtkGetStringMacro(FileName);
53 
55 
59  vtkGetMacro(NumberOfCells,int);
61 
63 
67  vtkGetMacro(NumberOfNodes,int);
69 
71 
74  vtkGetMacro(NumberOfNodeFields,int);
75  vtkGetMacro(NumberOfCellFields,int);
77 
78 protected:
80  ~vtkGAMBITReader() VTK_OVERRIDE;
81  int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
82  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
83 
84  char *FileName;
85 
86  int NumberOfNodes;
87  int NumberOfCells;
88  int NumberOfNodeFields;
89  int NumberOfCellFields;
90  int NumberOfElementGroups;
91  int NumberOfBoundaryConditionSets;
92  int NumberOfCoordinateDirections;
93  int NumberOfVelocityComponents;
94  ifstream *FileStream;
95 
97  {
98  EDGE = 1,
99  QUAD = 2,
100  TRI = 3,
101  BRICK = 4,
102  PRISM = 5,
103  TETRA = 6,
104  PYRAMID = 7
105  };
106 
107 private:
108  void ReadFile(vtkUnstructuredGrid *output);
109  void ReadGeometry(vtkUnstructuredGrid *output);
110  void ReadNodeData(vtkUnstructuredGrid *output);
111  void ReadCellData(vtkUnstructuredGrid *output);
112 
113  void ReadXYZCoords(vtkDoubleArray *coords);
114 
115  void ReadCellConnectivity(vtkUnstructuredGrid *output);
116  void ReadMaterialTypes(vtkUnstructuredGrid *output);
117  void ReadBoundaryConditionSets(vtkUnstructuredGrid *output);
118 
119  vtkGAMBITReader(const vtkGAMBITReader&) VTK_DELETE_FUNCTION;
120  void operator=(const vtkGAMBITReader&) VTK_DELETE_FUNCTION;
121 };
122 
123 #endif
Store vtkAlgorithm input/output information.
static vtkUnstructuredGridAlgorithm * New()
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.
a simple class to control print indentation
Definition: vtkIndent.h:33
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.
reads a dataset in Fluent GAMBIT neutral file format