VTK  9.3.1
vtkGAMBITReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
23 #ifndef vtkGAMBITReader_h
24 #define vtkGAMBITReader_h
25 
26 #include "vtkIOGeometryModule.h" // For export macro
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkDoubleArray;
31 class VTKIOGEOMETRY_EXPORT vtkGAMBITReader : public vtkUnstructuredGridAlgorithm
32 {
33 public:
34  static vtkGAMBITReader* New();
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
39 
42  vtkSetFilePathMacro(FileName);
43  vtkGetFilePathMacro(FileName);
45 
47 
51  vtkGetMacro(NumberOfCells, int);
53 
55 
59  vtkGetMacro(NumberOfNodes, int);
61 
63 
66  vtkGetMacro(NumberOfNodeFields, int);
67  vtkGetMacro(NumberOfCellFields, int);
69 
70 protected:
72  ~vtkGAMBITReader() override;
75 
76  char* FileName;
77 
86  istream* FileStream;
87 
89  {
90  EDGE = 1,
91  QUAD = 2,
92  TRI = 3,
93  BRICK = 4,
94  PRISM = 5,
95  TETRA = 6,
96  PYRAMID = 7
97  };
98 
99 private:
100  void ReadFile(vtkUnstructuredGrid* output);
101  void ReadGeometry(vtkUnstructuredGrid* output);
102  void ReadNodeData(vtkUnstructuredGrid* output);
103  void ReadCellData(vtkUnstructuredGrid* output);
104 
105  void ReadXYZCoords(vtkDoubleArray* coords);
106 
107  void ReadCellConnectivity(vtkUnstructuredGrid* output);
108  void ReadMaterialTypes(vtkUnstructuredGrid* output);
109  void ReadBoundaryConditionSets(vtkUnstructuredGrid* output);
110 
111  vtkGAMBITReader(const vtkGAMBITReader&) = delete;
112  void operator=(const vtkGAMBITReader&) = delete;
113 };
114 
115 VTK_ABI_NAMESPACE_END
116 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
istream * FileStream
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:28
dataset represents arbitrary combinations of all possible cell types
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